use make_shared where appropriate
This commit is contained in:
+2
-2
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user