summaryrefslogtreecommitdiff
path: root/src/pathfinder.cpp
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-04-20 00:12:52 +0200
committerGitHub <noreply@github.com>2017-04-20 00:12:52 +0200
commitf98bbe193e0093aca8d8957cec82fdbd28639915 (patch)
tree19879fbca595d4e8cddfa8d7d069b7f78016a713 /src/pathfinder.cpp
parentf3fe62a0bf9e775b3e6e838f104ab605a2238792 (diff)
downloadminetest-f98bbe193e0093aca8d8957cec82fdbd28639915.tar.gz
minetest-f98bbe193e0093aca8d8957cec82fdbd28639915.tar.bz2
minetest-f98bbe193e0093aca8d8957cec82fdbd28639915.zip
Fix various copy instead of const ref reported by cppcheck (part 3) (#5616)
* Also remove 2 non declared but defined functions * Make some functions around const ref changes const
Diffstat (limited to 'src/pathfinder.cpp')
-rw-r--r--src/pathfinder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pathfinder.cpp b/src/pathfinder.cpp
index ee06db630..16c5678ee 100644
--- a/src/pathfinder.cpp
+++ b/src/pathfinder.cpp
@@ -111,7 +111,7 @@ public:
* @param dir direction to set cost for
* @cost cost to set
*/
- void setCost(v3s16 dir, PathCost cost);
+ void setCost(v3s16 dir, const PathCost &cost);
bool valid; /**< node is on surface */
bool target; /**< node is target position */
@@ -496,7 +496,7 @@ PathCost PathGridnode::getCost(v3s16 dir)
}
/******************************************************************************/
-void PathGridnode::setCost(v3s16 dir, PathCost cost)
+void PathGridnode::setCost(v3s16 dir, const PathCost &cost)
{
if (dir.X > 0) {
directions[DIR_XP] = cost;