From 2d74e0c77658870249249eefbb2f1d4e5d6b7fec Mon Sep 17 00:00:00 2001 From: Paul Fd Date: Tue, 10 Mar 2020 17:55:22 +0100 Subject: [PATCH] absl's make unique --- src/sfizz/effects/Lofi.cpp | 6 +++--- src/sfizz/sfizz.cpp | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/sfizz/effects/Lofi.cpp b/src/sfizz/effects/Lofi.cpp index 60b66949..f29d9950 100644 --- a/src/sfizz/effects/Lofi.cpp +++ b/src/sfizz/effects/Lofi.cpp @@ -37,7 +37,7 @@ #include "Lofi.h" #include "Opcode.h" -#include +#include "absl/memory/memory.h" #include #include #include @@ -79,7 +79,7 @@ namespace fx { std::unique_ptr Lofi::makeInstance(absl::Span members) { - auto fx = std::make_unique(); + auto fx = absl::make_unique(); for (const Opcode& opcode : members) { switch (opcode.lettersOnlyHash) { @@ -92,7 +92,7 @@ namespace fx { } } - return fx; + return std::move(fx); } /// diff --git a/src/sfizz/sfizz.cpp b/src/sfizz/sfizz.cpp index 9115f318..61e5a0c5 100644 --- a/src/sfizz/sfizz.cpp +++ b/src/sfizz/sfizz.cpp @@ -6,10 +6,11 @@ #include "Synth.h" #include "sfizz.hpp" +#include "absl/memory/memory.h" sfz::Sfizz::Sfizz() { - synth = std::make_unique(); + synth = absl::make_unique(); } sfz::Sfizz::~Sfizz()