use smart pointer when creating an object with an instance of the creator
This commit is contained in:
parent
a0060c8fa8
commit
f1ee437f04
6 changed files with 12 additions and 10 deletions
|
@ -39,7 +39,7 @@ std::vector<std::shared_ptr<GnsProject>> GnsServer::getProjects() const {
|
|||
projects.reserve(data.size());
|
||||
for (const auto& project_data : data)
|
||||
projects.emplace_back(std::make_shared<GnsProject>(
|
||||
this,
|
||||
shared_from_this(),
|
||||
project_data["project_id"]
|
||||
));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue