Core: Pass by const reference for simple objects replaced with pass by value

This commit is contained in:
Spp-
2011-08-01 14:23:27 +02:00
parent 1fc1da842e
commit acd0fc79f6
63 changed files with 263 additions and 263 deletions
+3 -3
View File
@@ -99,7 +99,7 @@ class NGrid
return i_cells[x][y];
}
const uint32& GetGridId(void) const { return i_gridId; }
const uint32 GetGridId(void) const { return i_gridId; }
void SetGridId(const uint32 id) const { i_gridId = id; }
grid_state_t GetGridState(void) const { return i_cellstate; }
void SetGridState(grid_state_t s) { i_cellstate = s; }
@@ -140,7 +140,7 @@ class NGrid
getGridType(x, y).Visit(visitor);
}
template<class T, class TT> void Visit(const uint32 &x, const uint32 &y, TypeContainerVisitor<T, TypeMapContainer<TT> > &visitor)
template<class T, class TT> void Visit(const uint32 x, const uint32 y, TypeContainerVisitor<T, TypeMapContainer<TT> > &visitor)
{
getGridType(x, y).Visit(visitor);
}
@@ -166,7 +166,7 @@ class NGrid
private:
GridType& getGridType(const uint32& x, const uint32& y)
GridType& getGridType(const uint32 x, const uint32 y)
{
ASSERT(x < N);
ASSERT(y < N);