Skip to content

Commit 8e60b37

Browse files
committed
East const.
1 parent d4095f7 commit 8e60b37

File tree

20 files changed

+47
-47
lines changed

20 files changed

+47
-47
lines changed

contrib/mmap/src/MapBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ namespace MMAP
3636
bool skipBattlegrounds,
3737
bool debug,
3838
bool quick,
39-
const char* offMeshFilePath,
39+
char const* offMeshFilePath,
4040
uint8 threads) :
4141
m_terrainBuilder(nullptr),
4242
m_debug(debug),

contrib/mmap/src/TerrainBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ namespace MMAP
995995
}
996996

997997
/**************************************************************************/
998-
void TerrainBuilder::loadOffMeshConnections(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData, const char* offMeshFilePath)
998+
void TerrainBuilder::loadOffMeshConnections(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData, char const* offMeshFilePath)
999999
{
10001000
// no meshfile input given?
10011001
if (offMeshFilePath == nullptr)

contrib/mmap/src/generator.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ bool handleArgs(int argc, char** argv,
111111
bool& silent,
112112
bool& quick,
113113
bool& buildOnlyGameobjectModels,
114-
const char*& offMeshInputPath,
115-
const char*& configInputPath,
114+
char const*& offMeshInputPath,
115+
char const*& configInputPath,
116116
int& threads)
117117
{
118118
char* param = nullptr;
@@ -217,7 +217,7 @@ bool handleArgs(int argc, char** argv,
217217
return true;
218218
}
219219

220-
int finish(const char* message, int returnValue)
220+
int finish(char const* message, int returnValue)
221221
{
222222
printf("%s", message);
223223
getchar();
@@ -240,8 +240,8 @@ int main(int argc, char** argv)
240240
bool quick = false;
241241
int threads = 0;
242242

243-
const char* offMeshInputPath = "offmesh.txt";
244-
const char* configInputPath = "config.json";
243+
char const* offMeshInputPath = "offmesh.txt";
244+
char const* configInputPath = "config.json";
245245

246246
bool validParam = handleArgs(argc, argv, mapId, tileX, tileY, skipLiquid, skipContinents, skipJunkMaps, skipBattlegrounds, debug, silent, quick, buildOnlyGameobjectModels, offMeshInputPath, configInputPath, threads);
247247

src/framework/GameSystem/NGrid.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ class NGrid
109109
return i_cells[x][y];
110110
}
111111

112-
const uint32& GetGridId() const { return i_gridId; }
113-
void SetGridId(const uint32 id) { i_gridId = id; }
112+
uint32 const& GetGridId() const { return i_gridId; }
113+
void SetGridId(uint32 const id) { i_gridId = id; }
114114
grid_state_t GetGridState() const { return i_cellstate; }
115115
void SetGridState(grid_state_t s) { i_cellstate = s; }
116116
uint32 getX() const { return i_x; }
@@ -134,13 +134,13 @@ class NGrid
134134
void UpdateTimeTracker(time_t diff) { i_GridInfo.UpdateTimeTracker(diff); }
135135

136136
template<class SPECIFIC_OBJECT>
137-
void AddWorldObject(const uint32 x, const uint32 y, SPECIFIC_OBJECT *obj)
137+
void AddWorldObject(uint32 const x, uint32 const y, SPECIFIC_OBJECT *obj)
138138
{
139139
getGridType(x, y).AddWorldObject(obj);
140140
}
141141

142142
template<class SPECIFIC_OBJECT>
143-
void RemoveWorldObject(const uint32 x, const uint32 y, SPECIFIC_OBJECT *obj)
143+
void RemoveWorldObject(uint32 const x, uint32 const y, SPECIFIC_OBJECT *obj)
144144
{
145145
getGridType(x, y).RemoveWorldObject(obj);
146146
}
@@ -154,7 +154,7 @@ class NGrid
154154
}
155155

156156
template<class T, class TT>
157-
void Visit(const uint32 &x, const uint32 &y, TypeContainerVisitor<T, TypeMapContainer<TT> > &visitor)
157+
void Visit(uint32 const &x, uint32 const &y, TypeContainerVisitor<T, TypeMapContainer<TT> > &visitor)
158158
{
159159
getGridType(x, y).Visit(visitor);
160160
}
@@ -170,20 +170,20 @@ class NGrid
170170
}
171171

172172
template<class SPECIFIC_OBJECT>
173-
bool AddGridObject(const uint32 x, const uint32 y, SPECIFIC_OBJECT *obj)
173+
bool AddGridObject(uint32 const x, uint32 const y, SPECIFIC_OBJECT *obj)
174174
{
175175
return getGridType(x, y).AddGridObject(obj);
176176
}
177177

178178
template<class SPECIFIC_OBJECT>
179-
bool RemoveGridObject(const uint32 x, const uint32 y, SPECIFIC_OBJECT *obj)
179+
bool RemoveGridObject(uint32 const x, uint32 const y, SPECIFIC_OBJECT *obj)
180180
{
181181
return getGridType(x, y).RemoveGridObject(obj);
182182
}
183183

184184
private:
185185

186-
GridType& getGridType(const uint32& x, const uint32& y)
186+
GridType& getGridType(uint32 const& x, uint32 const& y)
187187
{
188188
assert(x < N);
189189
assert(y < N);

src/game/Anticheat/MovementAnticheat/MovementAnticheat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
using namespace Geometry;
1818

19-
const char* GetMovementCheatName(CheatType flagId)
19+
char const* GetMovementCheatName(CheatType flagId)
2020
{
2121
switch (flagId)
2222
{

src/game/Anticheat/MovementAnticheat/MovementAnticheat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ enum CheatType
5656
};
5757

5858
#define CHEATS_UPDATE_INTERVAL 4000
59-
const char* GetMovementCheatName(CheatType type);
59+
char const* GetMovementCheatName(CheatType type);
6060

6161
class Player;
6262
class MovementInfo;

src/game/Chat/Chat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1411,7 +1411,7 @@ void ChatHandler::LoadRbacPermissions()
14111411
}
14121412
}
14131413

1414-
bool ChatHandler::SetPermissionMaskForCommandInTable(ChatCommand* commandTable, const char* text, uint32 permissionId)
1414+
bool ChatHandler::SetPermissionMaskForCommandInTable(ChatCommand* commandTable, char const* text, uint32 permissionId)
14151415
{
14161416
std::string fullcommand = text; // original `text` can't be used. It content destroyed in command code processing.
14171417

src/game/Chat/Chat.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ class ChatHandler
178178

179179
void SendGlobalSysMessage(char const* str);
180180

181-
static bool SetPermissionMaskForCommandInTable(ChatCommand* table, const char* text, uint32 permissionId);
182-
static bool SetDataForCommandInTable(ChatCommand *table, const char* text, uint8 security, std::string const& help, uint8 flags);
181+
static bool SetPermissionMaskForCommandInTable(ChatCommand* table, char const* text, uint32 permissionId);
182+
static bool SetDataForCommandInTable(ChatCommand *table, char const* text, uint8 security, std::string const& help, uint8 flags);
183183
void ExecuteCommand(char const* text);
184184
bool ShowHelpForCommand(ChatCommand *table, char const* cmd);
185185
bool ShowHelpForSubCommands(ChatCommand *table, char const* cmd);

src/game/Objects/MirrorTimer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ bool MirrorTimer::Update(uint32 diff)
116116
if (!m_tracker.Passed())
117117
return true;
118118

119-
const uint32 interval = m_tracker.GetInterval();
120-
const uint32 overflow = (m_tracker.GetCurrent() - interval);
119+
uint32 const interval = m_tracker.GetInterval();
120+
uint32 const overflow = (m_tracker.GetCurrent() - interval);
121121

122122
m_tracker.SetCurrent(interval);
123123

@@ -135,7 +135,7 @@ bool MirrorTimer::Update(uint32 diff)
135135
}
136136
else // Timer regenerating
137137
{
138-
const uint32 current = m_tracker.GetCurrent();
138+
uint32 const current = m_tracker.GetCurrent();
139139

140140
if (current > diff)
141141
{

src/game/Objects/Object.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,7 +1564,7 @@ float WorldObject::GetSizeFactorForDistance(WorldObject const* obj, SizeFactor d
15641564
return sizefactor;
15651565
}
15661566

1567-
float WorldObject::GetDistance(const WorldObject* obj, SizeFactor distcalc) const
1567+
float WorldObject::GetDistance(WorldObject const* obj, SizeFactor distcalc) const
15681568
{
15691569
ASSERT(obj);
15701570
float dx = GetPositionX() - obj->GetPositionX();
@@ -1644,7 +1644,7 @@ bool WorldObject::IsInMap(WorldObject const* obj) const
16441644
return IsInWorld() && obj->IsInWorld() && (FindMap() == obj->FindMap());
16451645
}
16461646

1647-
bool WorldObject::_IsWithinDist(WorldObject const* obj, float const dist2compare, const bool is3D, SizeFactor distcalc) const
1647+
bool WorldObject::_IsWithinDist(WorldObject const* obj, float const dist2compare, bool const is3D, SizeFactor distcalc) const
16481648
{
16491649
ASSERT(obj);
16501650
float const dx = GetPositionX() - obj->GetPositionX();

0 commit comments

Comments
 (0)