use smart pointer to avoid memory issue

This commit is contained in:
faraphel 2024-12-23 11:09:33 +01:00
parent 9c413c0edd
commit a0060c8fa8
5 changed files with 21 additions and 19 deletions

View file

@ -1,4 +1,5 @@
#pragma once
#include <memory>
#include <string>
#include <vector>
@ -34,7 +35,7 @@ public:
* Get all the nodes of the project
* @return all the nodes of the project
*/
[[nodiscard]] std::vector<GnsNode> getNodes() const;
[[nodiscard]] std::vector<std::shared_ptr<GnsNode>> getNodes() const;
private:
const GnsServer* server;