From 0fb8646198ca0507b031ed10dabd9f4a72e926c6 Mon Sep 17 00:00:00 2001 From: tycho Date: Tue, 15 Dec 2015 10:44:29 +0000 Subject: Delete copy and move constructors from cPath cPath is not safe to copy or move due to pointers into the std::map m_Map. --- src/Mobs/Path.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Mobs/Path.h b/src/Mobs/Path.h index 410d6fec5..158853a8c 100644 --- a/src/Mobs/Path.h +++ b/src/Mobs/Path.h @@ -76,6 +76,13 @@ public: /** Creates a dummy path which does nothing except returning false when isValid is called. */ cPath(); + /** delete default constructors */ + cPath(const cPath & a_other) = delete; + cPath(cPath && a_other) = delete; + + cPath & operator=(const cPath & a_other) = delete; + cPath & operator=(cPath && a_other) = delete; + /** Performs part of the path calculation and returns the appropriate status. If NEARBY_FOUND is returned, it means that the destination is not reachable, but a nearby destination is reachable. If the user likes the alternative destination, they can call AcceptNearbyPath to treat the path as found, -- cgit v1.2.3