absl's make unique
This commit is contained in:
parent
624f014dec
commit
2d74e0c776
2 changed files with 5 additions and 4 deletions
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
#include "Lofi.h"
|
||||
#include "Opcode.h"
|
||||
#include <memory>
|
||||
#include "absl/memory/memory.h"
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <cmath>
|
||||
|
|
@ -79,7 +79,7 @@ namespace fx {
|
|||
|
||||
std::unique_ptr<Effect> Lofi::makeInstance(absl::Span<const Opcode> members)
|
||||
{
|
||||
auto fx = std::make_unique<Lofi>();
|
||||
auto fx = absl::make_unique<Lofi>();
|
||||
|
||||
for (const Opcode& opcode : members) {
|
||||
switch (opcode.lettersOnlyHash) {
|
||||
|
|
@ -92,7 +92,7 @@ namespace fx {
|
|||
}
|
||||
}
|
||||
|
||||
return fx;
|
||||
return std::move(fx);
|
||||
}
|
||||
|
||||
///
|
||||
|
|
|
|||
|
|
@ -6,10 +6,11 @@
|
|||
|
||||
#include "Synth.h"
|
||||
#include "sfizz.hpp"
|
||||
#include "absl/memory/memory.h"
|
||||
|
||||
sfz::Sfizz::Sfizz()
|
||||
{
|
||||
synth = std::make_unique<sfz::Synth>();
|
||||
synth = absl::make_unique<sfz::Synth>();
|
||||
}
|
||||
|
||||
sfz::Sfizz::~Sfizz()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue