mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
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
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user