Azathoth42

not memory leak

Nov 9th, 2015
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. std::vector<std::shared_ptr<App::Node>> AStar::findPath(std::vector<std::shared_ptr<App::Node>> nodes, std::shared_ptr<App::Node> start, std::shared_ptr<App::Node> end)
  2.         {
  3.                 std::shared_ptr<NodeWrapper> current;
  4.                 //jádro algoritmu, celé zakomentované
  5.                 //...
  6.                 std::vector<std::shared_ptr<NodeWrapper>> way = current->getWay();
  7.  
  8. //              hydrating path from node wrappers
  9.         auto path = std::vector<std::shared_ptr<App::Node>>(2);
  10.         path[0] = start;
  11.         path[1] = end;
  12.  
  13.                 return path;
  14.         }
Advertisement
Add Comment
Please, Sign In to add comment