use smart pointer when creating an object with an instance of the creator

This commit is contained in:
faraphel 2024-12-23 13:12:46 +01:00
parent a0060c8fa8
commit f1ee437f04
6 changed files with 12 additions and 10 deletions

View file

@ -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"]
));