use make_shared where appropriate

This commit is contained in:
Martin Michelsen
2023-11-30 10:24:27 -08:00
parent c833b575e4
commit 956e890ad6
33 changed files with 279 additions and 305 deletions
+2 -2
View File
@@ -321,7 +321,7 @@ Proxy session commands:\n\
}
} else if (command_name == "add-license") {
shared_ptr<License> l(new License());
auto l = make_shared<License>();
for (const string& token : split(command_args, ' ')) {
if (starts_with(token, "bb-username=")) {
@@ -376,7 +376,7 @@ Proxy session commands:\n\
uint32_t serial_number = stoul(tokens[0]);
tokens.erase(tokens.begin());
auto orig_l = this->state->license_index->get(serial_number);
shared_ptr<License> l(new License(*orig_l));
auto l = make_shared<License>(*orig_l);
this->state->license_index->remove(orig_l->serial_number);
try {