Rip std::make_unique

This commit is contained in:
Jeremy Rifkin 2025-01-31 00:16:24 -06:00
parent ceb21428cc
commit 061ed96d97
No known key found for this signature in database
GPG Key ID: 19AA8270105E8EB4

View File

@ -197,12 +197,12 @@ namespace cpptrace {
} }
}; };
formatter::formatter() : pimpl(std::make_unique<formatter::impl>()) {} formatter::formatter() : pimpl(std::unique_ptr<impl>(new impl)) {}
formatter::~formatter() = default; formatter::~formatter() = default;
formatter::formatter(const formatter& other) : pimpl(std::make_unique<formatter::impl>(*other.pimpl)) {} formatter::formatter(const formatter& other) : pimpl(std::unique_ptr<impl>(new impl(*other.pimpl))) {}
formatter& formatter::operator=(const formatter& other) { formatter& formatter::operator=(const formatter& other) {
pimpl = std::make_unique<formatter::impl>(*other.pimpl); pimpl = std::unique_ptr<impl>(new impl(*other.pimpl));
return *this; return *this;
} }