refactor(Core/Misc): enforce east-const style and add codestyle check (#26492)

Co-authored-by: Ludwig <sudlud@users.noreply.github.com>
This commit is contained in:
Kitzunu
2026-07-21 06:13:51 +02:00
committed by GitHub
parent 9a9924ed43
commit 8eb009fdfc
361 changed files with 1016 additions and 980 deletions

View File

@@ -100,7 +100,7 @@ float CONF_flat_height_delta_limit = 0.005f; // If max - min less this value - s
float CONF_flat_liquid_delta_limit = 0.001f; // If max - min less this value - liquid surface is flat
// List MPQ for extract from
const char* CONF_mpq_list[] =
char const* CONF_mpq_list[] =
{
"common.MPQ",
"common-2.MPQ",
@@ -113,10 +113,10 @@ const char* CONF_mpq_list[] =
"patch-5.MPQ",
};
static const char* const langs[] = {"enGB", "enUS", "deDE", "esES", "frFR", "koKR", "zhCN", "zhTW", "enCN", "enTW", "esMX", "ruRU" };
static char const* const langs[] = {"enGB", "enUS", "deDE", "esES", "frFR", "koKR", "zhCN", "zhTW", "enCN", "enTW", "esMX", "ruRU" };
#define LANG_COUNT 12
void CreateDir( const std::string& Path )
void CreateDir( std::string const& Path )
{
if (chdir(Path.c_str()) == 0)
{
@@ -141,7 +141,7 @@ void CreateDir( const std::string& Path )
}
}
bool FileExists( const char* FileName )
bool FileExists( char const* FileName )
{
int fp = _open(FileName, OPEN_FLAGS);
if (fp != -1)
@@ -1071,7 +1071,7 @@ void ExtractDBCFiles(int locale, bool basicLocale)
// extract DBCs
uint32 count = 0;
for (const auto & dbcfile : dbcfiles)
for (auto const& dbcfile : dbcfiles)
{
string filename = path;
filename += (dbcfile.c_str() + strlen("DBFilesClient\\"));

View File

@@ -37,7 +37,7 @@ public:
Exception(std::string message): message(std::move(message))
{ }
virtual ~Exception() = default;
const std::string& getMessage() {return message;}
std::string const& getMessage() {return message;}
private:
std::string message;
};
@@ -67,7 +67,7 @@ public:
assert(field < file.fieldCount);
return *reinterpret_cast<int*>(offset + field * 4);
}
[[nodiscard]] const char* getString(std::size_t field) const
[[nodiscard]] char const* getString(std::size_t field) const
{
assert(field < file.fieldCount);
std::size_t stringOffset = getUInt(field);
@@ -97,16 +97,16 @@ public:
}
/// Return address of current instance
Record const& operator*() const { return record; }
const Record* operator->() const
Record const* operator->() const
{
return &record;
}
/// Comparison
bool operator==(const Iterator& b) const
bool operator==(Iterator const& b) const
{
return record.offset == b.record.offset;
}
bool operator!=(const Iterator& b) const
bool operator!=(Iterator const& b) const
{
return record.offset != b.record.offset;
}

View File

@@ -21,7 +21,7 @@
ArchiveSet gOpenArchives;
MPQArchive::MPQArchive(const char* filename)
MPQArchive::MPQArchive(char const* filename)
{
int result = libmpq__archive_open(&mpq_a, filename, -1);
printf("Opening %s\n", filename);
@@ -59,7 +59,7 @@ void MPQArchive::close()
libmpq__archive_close(mpq_a);
}
MPQFile::MPQFile(const char* filename):
MPQFile::MPQFile(char const* filename):
eof(false),
buffer(nullptr),
pointer(0),

View File

@@ -33,7 +33,7 @@ class MPQArchive
public:
mpq_archive_s* mpq_a;
MPQArchive(const char* filename);
MPQArchive(char const* filename);
~MPQArchive() { close(); }
void close();
@@ -78,11 +78,11 @@ class MPQFile
libmpq__off_t pointer, size;
// disable copying
MPQFile(const MPQFile& /*f*/) {}
void operator=(const MPQFile& /*f*/) {}
MPQFile(MPQFile const& /*f*/) {}
void operator=(MPQFile const& /*f*/) {}
public:
MPQFile(const char* filename); // filenames are not case sensitive
MPQFile(char const* filename); // filenames are not case sensitive
~MPQFile() { close(); }
std::size_t read(void* dest, std::size_t bytes);
std::size_t getSize() { return size; }

View File

@@ -33,12 +33,12 @@ namespace MMAP
return {x, y};
}
bool isCurrentDirectory(const std::string& pathStr) {
bool isCurrentDirectory(std::string const& pathStr) {
try {
const std::filesystem::path givenPath = std::filesystem::canonical(std::filesystem::absolute(pathStr));
const std::filesystem::path currentPath = std::filesystem::canonical(std::filesystem::current_path());
return givenPath == currentPath;
} catch (const std::filesystem::filesystem_error& e) {
} catch (std::filesystem::filesystem_error const& e) {
std::cerr << "Filesystem error: " << e.what() << "\n";
return false;
}
@@ -74,8 +74,8 @@ namespace MMAP
ResolvedMeshConfig Config::GetConfigForTile(uint32 mapID, uint32 tileX, uint32 tileY) const
{
const MapOverride* mapOverride = nullptr;
const TileOverride* tileOverride = nullptr;
MapOverride const* mapOverride = nullptr;
TileOverride const* tileOverride = nullptr;
// Lookup map and tile overrides
if (auto mapIt = _maps.find(mapID); mapIt != _maps.end())
@@ -102,39 +102,39 @@ namespace MMAP
// Resolve vertex settings
int vertexPerMap = resolveInt(
[](const TileOverride*) { return std::optional<int>{}; },
[](const MapOverride* m) { return m->vertexPerMapEdge; },
[](TileOverride const*) { return std::optional<int>{}; },
[](MapOverride const* m) { return m->vertexPerMapEdge; },
_global.vertexPerMapEdge
);
int vertexPerTile = resolveInt(
[](const TileOverride*) { return std::optional<int>{}; },
[](const MapOverride* m) { return m->vertexPerTileEdge; },
[](TileOverride const*) { return std::optional<int>{}; },
[](MapOverride const* m) { return m->vertexPerTileEdge; },
_global.vertexPerTileEdge
);
ResolvedMeshConfig config;
config.walkableSlopeAngle = resolveFloat(
[](const TileOverride* t) { return t->walkableSlopeAngle; },
[](const MapOverride* m) { return m->walkableSlopeAngle; },
[](TileOverride const* t) { return t->walkableSlopeAngle; },
[](MapOverride const* m) { return m->walkableSlopeAngle; },
_global.walkableSlopeAngle
);
config.walkableRadius = resolveInt(
[](const TileOverride* t) { return t->walkableRadius; },
[](const MapOverride* m) { return m->walkableRadius; },
[](TileOverride const* t) { return t->walkableRadius; },
[](MapOverride const* m) { return m->walkableRadius; },
_global.walkableRadius
);
config.walkableHeight = resolveInt(
[](const TileOverride* t) { return t->walkableHeight; },
[](const MapOverride* m) { return m->walkableHeight; },
[](TileOverride const* t) { return t->walkableHeight; },
[](MapOverride const* m) { return m->walkableHeight; },
_global.walkableHeight
);
config.walkableClimb = resolveInt(
[](const TileOverride* t) { return t->walkableClimb; },
[](const MapOverride* m) { return m->walkableClimb; },
[](TileOverride const* t) { return t->walkableClimb; },
[](MapOverride const* m) { return m->walkableClimb; },
_global.walkableClimb
);
@@ -168,19 +168,19 @@ namespace MMAP
fkyaml::node mmapsNode = root["mmapsConfig"];
auto tryFloat = [](const fkyaml::node& n, const char* key, float& out)
auto tryFloat = [](fkyaml::node const& n, char const* key, float& out)
{
if (n.contains(key)) out = n[key].get_value<float>();
};
auto tryInt = [](const fkyaml::node& n, const char* key, int& out)
auto tryInt = [](fkyaml::node const& n, char const* key, int& out)
{
if (n.contains(key)) out = n[key].get_value<int>();
};
auto tryBoolean = [](const fkyaml::node& n, const char* key, bool& out)
auto tryBoolean = [](fkyaml::node const& n, char const* key, bool& out)
{
if (n.contains(key)) out = n[key].get_value<bool>();
};
auto tryString = [](const fkyaml::node& n, const char* key, std::string& out)
auto tryString = [](fkyaml::node const& n, char const* key, std::string& out)
{
if (n.contains(key)) out = n[key].get_value<std::string>();
};

View File

@@ -32,7 +32,7 @@ namespace std
template <>
struct hash<std::pair<uint32_t, uint32_t>>
{
std::size_t operator()(const std::pair<uint32_t, uint32_t>& p) const noexcept
std::size_t operator()(std::pair<uint32_t, uint32_t> const& p) const noexcept
{
return std::hash<uint64_t>()((static_cast<uint64_t>(p.first) << 32) | p.second);
}

View File

@@ -30,7 +30,7 @@ namespace MMAP
rcFreePolyMeshDetail(polyMeshDetail);
}
void IntermediateValues::writeIV(const std::string& dataPath, uint32 mapID, uint32 tileX, uint32 tileY)
void IntermediateValues::writeIV(std::string const& dataPath, uint32 mapID, uint32 tileX, uint32 tileY)
{
char fileName[512];
char tileString[25];
@@ -70,7 +70,7 @@ namespace MMAP
#undef DEBUG_WRITE
}
void IntermediateValues::debugWrite(FILE* file, const rcHeightfield* mesh)
void IntermediateValues::debugWrite(FILE* file, rcHeightfield const* mesh)
{
if (!file || !mesh)
return;
@@ -108,7 +108,7 @@ namespace MMAP
}
}
void IntermediateValues::debugWrite(FILE* file, const rcCompactHeightfield* chf)
void IntermediateValues::debugWrite(FILE* file, rcCompactHeightfield const* chf)
{
if (!file | !chf)
return;
@@ -147,7 +147,7 @@ namespace MMAP
fwrite(chf->areas, sizeof(unsigned char), chf->spanCount, file);
}
void IntermediateValues::debugWrite(FILE* file, const rcContourSet* cs)
void IntermediateValues::debugWrite(FILE* file, rcContourSet const* cs)
{
if (!file || !cs)
return;
@@ -168,7 +168,7 @@ namespace MMAP
}
}
void IntermediateValues::debugWrite(FILE* file, const rcPolyMesh* mesh)
void IntermediateValues::debugWrite(FILE* file, rcPolyMesh const* mesh)
{
if (!file || !mesh)
return;
@@ -187,7 +187,7 @@ namespace MMAP
fwrite(mesh->regs, sizeof(unsigned short), mesh->npolys, file);
}
void IntermediateValues::debugWrite(FILE* file, const rcPolyMeshDetail* mesh)
void IntermediateValues::debugWrite(FILE* file, rcPolyMeshDetail const* mesh)
{
if (!file || !mesh)
return;
@@ -200,7 +200,7 @@ namespace MMAP
fwrite(mesh->meshes, sizeof(int), mesh->nmeshes * 4, file);
}
void IntermediateValues::generateObjFile(const std::string& dataPath, uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData)
void IntermediateValues::generateObjFile(std::string const& dataPath, uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData)
{
std::string objFileName = Acore::StringFormat(
"{}/meshes/map{:03}{:02}{:02}.obj",

View File

@@ -35,15 +35,15 @@ namespace MMAP
IntermediateValues() {}
~IntermediateValues();
void writeIV(const std::string& dataPath, uint32 mapID, uint32 tileX, uint32 tileY);
void writeIV(std::string const& dataPath, uint32 mapID, uint32 tileX, uint32 tileY);
void debugWrite(FILE* file, const rcHeightfield* mesh);
void debugWrite(FILE* file, const rcCompactHeightfield* chf);
void debugWrite(FILE* file, const rcContourSet* cs);
void debugWrite(FILE* file, const rcPolyMesh* mesh);
void debugWrite(FILE* file, const rcPolyMeshDetail* mesh);
void debugWrite(FILE* file, rcHeightfield const* mesh);
void debugWrite(FILE* file, rcCompactHeightfield const* chf);
void debugWrite(FILE* file, rcContourSet const* cs);
void debugWrite(FILE* file, rcPolyMesh const* mesh);
void debugWrite(FILE* file, rcPolyMeshDetail const* mesh);
void generateObjFile(const std::string& dataPath, uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData);
void generateObjFile(std::string const& dataPath, uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData);
};
}
#endif

View File

@@ -1058,7 +1058,7 @@ namespace MMAP
return header.recastConfig == desiredRecastConfig;
}
rcConfig MapBuilder::getRecastConfig(const ResolvedMeshConfig &cfg, float bmin[3], float bmax[3]) const
rcConfig MapBuilder::getRecastConfig(ResolvedMeshConfig const& cfg, float bmin[3], float bmax[3]) const
{
rcConfig config;
memset(&config, 0, sizeof(rcConfig));

View File

@@ -137,7 +137,7 @@ namespace MMAP
// builds list of maps, then builds all of mmap tiles (based on the skip settings)
void buildMaps(Optional<uint32> mapID);
const Config& getConfig() const { return *m_config; }
Config const& getConfig() const { return *m_config; }
private:
// builds all mmap tiles for the specified map id (ignores skip settings)
void buildMap(uint32 mapID);
@@ -156,7 +156,7 @@ namespace MMAP
bool isTransportMap(uint32 mapID) const;
bool isContinentMap(uint32 mapID) const;
rcConfig getRecastConfig(const ResolvedMeshConfig &cfg, float bmin[3], float bmax[3]) const;
rcConfig getRecastConfig(ResolvedMeshConfig const& cfg, float bmin[3], float bmax[3]) const;
uint32 percentageDone(uint32 totalTiles, uint32 totalTilesDone) const;
uint32 currentPercentageDone() const;

View File

@@ -41,7 +41,7 @@ namespace MMAP
return boost::dll::program_location().parent_path().string();
}
inline bool matchWildcardFilter(const char* filter, const char* str)
inline bool matchWildcardFilter(char const* filter, char const* str)
{
if (!filter || !str)
return false;
@@ -101,7 +101,7 @@ namespace MMAP
FindClose(hFind);
#else
const char* p = dirpath.c_str();
char const* p = dirpath.c_str();
DIR* dirp = opendir(p);
struct dirent* dp;

View File

@@ -24,7 +24,7 @@
using namespace MMAP;
bool checkDirectories(const std::string &dataDirPath, bool debugOutput)
bool checkDirectories(std::string const& dataDirPath, bool debugOutput)
{
std::vector<std::string> dirFiles;
@@ -152,7 +152,7 @@ bool handleArgs(int argc, char** argv,
return true;
}
int finish(const char* message, int returnValue)
int finish(char const* message, int returnValue)
{
printf("%s", message);
getchar(); // Wait for user input

View File

@@ -86,7 +86,7 @@ namespace MMAP
uint32 const MAP_VERSION_MAGIC = 9;
TerrainBuilder::TerrainBuilder(const std::string &dataDirPath, bool skipLiquid) :
TerrainBuilder::TerrainBuilder(std::string const& dataDirPath, bool skipLiquid) :
m_skipLiquid (skipLiquid),
m_mapsPath((std::filesystem::path(dataDirPath) / "maps").string()),
m_vmapsPath((std::filesystem::path(dataDirPath) / "vmaps").string())
@@ -929,12 +929,12 @@ namespace MMAP
/**************************************************************************/
void TerrainBuilder::loadOffMeshConnections(uint32 mapID, uint32 tileX, uint32 tileY,
MeshData& meshData,
const std::vector<std::string>& offMeshLines)
std::vector<std::string> const& offMeshLines)
{
if (offMeshLines.empty())
return;
for (const std::string& line : offMeshLines)
for (std::string const& line : offMeshLines)
{
float p0[3], p1[3];
uint32 mid, tx, ty;

View File

@@ -76,14 +76,14 @@ namespace MMAP
class TerrainBuilder
{
public:
TerrainBuilder(const std::string &mapsPath, bool skipLiquid);
TerrainBuilder(std::string const& mapsPath, bool skipLiquid);
~TerrainBuilder();
TerrainBuilder(const TerrainBuilder& tb) = delete;
TerrainBuilder(TerrainBuilder const& tb) = delete;
void loadMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData);
bool loadVMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData);
void loadOffMeshConnections(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData, const std::vector<std::string>& offMeshLines);
void loadOffMeshConnections(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData, std::vector<std::string> const& offMeshLines);
[[nodiscard]] bool usesLiquids() const { return !m_skipLiquid; }

View File

@@ -25,7 +25,7 @@
char const* GetPlainName(char const* FileName)
{
const char* szTemp;
char const* szTemp;
if ((szTemp = strrchr(FileName, '\\')) != nullptr)
FileName = szTemp + 1;

View File

@@ -72,7 +72,7 @@ public:
*/
};
const char* GetPlainName(const char* FileName);
char const* GetPlainName(char const* FileName);
char* GetPlainName(char* FileName);
char* GetExtension(char* FileName);
void fixnamen(char* name, std::size_t len);

View File

@@ -39,7 +39,7 @@ public:
Exception(std::string message): message(std::move(message))
{ }
virtual ~Exception() = default;
const std::string& getMessage() {return message;}
std::string const& getMessage() {return message;}
private:
std::string message;
};
@@ -57,7 +57,7 @@ public:
class Record
{
public:
Record& operator= (const Record& r)
Record& operator= (Record const& r)
{
file = r.file;
offset = r.offset;
@@ -83,7 +83,7 @@ public:
assert(ofs < file.recordSize);
return *reinterpret_cast<unsigned char*>(offset + ofs);
}
[[nodiscard]] const char* getString(std::size_t field) const
[[nodiscard]] char const* getString(std::size_t field) const
{
assert(field < file.fieldCount);
std::size_t stringOffset = getUInt(field);
@@ -115,16 +115,16 @@ public:
}
/// Return address of current instance
Record const& operator*() const { return record; }
const Record* operator->() const
Record const* operator->() const
{
return &record;
}
/// Comparison
bool operator==(const Iterator& b) const
bool operator==(Iterator const& b) const
{
return record.offset == b.record.offset;
}
bool operator!=(const Iterator& b) const
bool operator!=(Iterator const& b) const
{
return record.offset != b.record.offset;
}

View File

@@ -80,7 +80,7 @@ void ExtractGameobjectModels()
fwrite(VMAP::RAW_VMAP_MAGIC, 1, 8, model_list);
for (const auto & it : dbc)
for (auto const& it : dbc)
{
path = it.getString(1);

View File

@@ -67,7 +67,7 @@ bool Model::open()
return true;
}
bool Model::ConvertToVMAPModel(const char* outfilename)
bool Model::ConvertToVMAPModel(char const* outfilename)
{
int N[12] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
FILE* output = fopen(outfilename, "wb");

View File

@@ -22,7 +22,7 @@
ArchiveSet gOpenArchives;
MPQArchive::MPQArchive(const char* filename)
MPQArchive::MPQArchive(char const* filename)
{
int result = libmpq__archive_open(&mpq_a, filename, -1);
printf("Opening %s\n", filename);
@@ -65,7 +65,7 @@ void MPQArchive::close()
libmpq__archive_close(mpq_a);
}
MPQFile::MPQFile(const char* filename):
MPQFile::MPQFile(char const* filename):
eof(false),
buffer(nullptr),
pointer(0),

View File

@@ -32,7 +32,7 @@ class MPQArchive
public:
mpq_archive_s* mpq_a;
MPQArchive(const char* filename);
MPQArchive(char const* filename);
~MPQArchive() { if (isOpened()) close(); }
void GetFileListTo(vector<string>& filelist)
@@ -79,11 +79,11 @@ class MPQFile
libmpq__off_t pointer, size;
// disable copying
MPQFile(const MPQFile& /*f*/) {}
void operator=(const MPQFile& /*f*/) {}
MPQFile(MPQFile const& /*f*/) {}
void operator=(MPQFile const& /*f*/) {}
public:
MPQFile(const char* filename); // filenames are not case sensitive
MPQFile(char const* filename); // filenames are not case sensitive
~MPQFile() { close(); }
std::size_t read(void* dest, std::size_t bytes);
std::size_t getSize() { return size; }

View File

@@ -28,9 +28,9 @@ public:
Vec3D(float x0 = 0.0f, float y0 = 0.0f, float z0 = 0.0f) : x(x0), y(y0), z(z0) {}
Vec3D(const Vec3D& v) : x(v.x), y(v.y), z(v.z) {}
Vec3D(Vec3D const& v) : x(v.x), y(v.y), z(v.z) {}
Vec3D& operator= (const Vec3D& v)
Vec3D& operator= (Vec3D const& v)
{
x = v.x;
y = v.y;
@@ -38,19 +38,19 @@ public:
return *this;
}
Vec3D operator+ (const Vec3D& v) const
Vec3D operator+ (Vec3D const& v) const
{
Vec3D r(x + v.x, y + v.y, z + v.z);
return r;
}
Vec3D operator- (const Vec3D& v) const
Vec3D operator- (Vec3D const& v) const
{
Vec3D r(x - v.x, y - v.y, z - v.z);
return r;
}
float operator* (const Vec3D& v) const
float operator* (Vec3D const& v) const
{
return x * v.x + y * v.y + z * v.z;
}
@@ -61,18 +61,18 @@ public:
return r;
}
friend Vec3D operator* (float d, const Vec3D& v)
friend Vec3D operator* (float d, Vec3D const& v)
{
return v * d;
}
Vec3D operator% (const Vec3D& v) const
Vec3D operator% (Vec3D const& v) const
{
Vec3D r(y * v.z - z * v.y, z * v.x - x * v.z, x * v.y - y * v.x);
return r;
}
Vec3D& operator+= (const Vec3D& v)
Vec3D& operator+= (Vec3D const& v)
{
x += v.x;
y += v.y;
@@ -80,7 +80,7 @@ public:
return *this;
}
Vec3D& operator-= (const Vec3D& v)
Vec3D& operator-= (Vec3D const& v)
{
x -= v.x;
y -= v.y;
@@ -125,7 +125,7 @@ public:
return in;
}
friend std::ostream& operator<<(std::ostream& out, const Vec3D& v)
friend std::ostream& operator<<(std::ostream& out, Vec3D const& v)
{
out << v.x << " " << v.y << " " << v.z;
return out;
@@ -151,28 +151,28 @@ public:
Vec2D(float x0 = 0.0f, float y0 = 0.0f) : x(x0), y(y0) {}
Vec2D(const Vec2D& v) : x(v.x), y(v.y) {}
Vec2D(Vec2D const& v) : x(v.x), y(v.y) {}
Vec2D& operator= (const Vec2D& v)
Vec2D& operator= (Vec2D const& v)
{
x = v.x;
y = v.y;
return *this;
}
Vec2D operator+ (const Vec2D& v) const
Vec2D operator+ (Vec2D const& v) const
{
Vec2D r(x + v.x, y + v.y);
return r;
}
Vec2D operator- (const Vec2D& v) const
Vec2D operator- (Vec2D const& v) const
{
Vec2D r(x - v.x, y - v.y);
return r;
}
float operator* (const Vec2D& v) const
float operator* (Vec2D const& v) const
{
return x * v.x + y * v.y;
}
@@ -183,19 +183,19 @@ public:
return r;
}
friend Vec2D operator* (float d, const Vec2D& v)
friend Vec2D operator* (float d, Vec2D const& v)
{
return v * d;
}
Vec2D& operator+= (const Vec2D& v)
Vec2D& operator+= (Vec2D const& v)
{
x += v.x;
y += v.y;
return *this;
}
Vec2D& operator-= (const Vec2D& v)
Vec2D& operator-= (Vec2D const& v)
{
x -= v.x;
y -= v.y;

View File

@@ -76,7 +76,7 @@ uint32 GenerateUniqueObjectId(uint32 clientId, uint16 clientDoodadId)
// Local testing functions
bool FileExists(const char* file)
bool FileExists(char const* file)
{
if (FILE* n = fopen(file, "rb"))
{
@@ -362,7 +362,7 @@ bool fillArchiveNameVector(std::vector<std::string>& pArchiveNames)
return true;
}
bool processArgv(int argc, char** argv, const char* versionString)
bool processArgv(int argc, char** argv, char const* versionString)
{
bool result = true;
hasInputPathParam = false;
@@ -427,7 +427,7 @@ bool processArgv(int argc, char** argv, const char* versionString)
int main(int argc, char** argv)
{
bool success = true;
const char* versionString = "V4.00 2012_02";
char const* versionString = "V4.00 2012_02";
// Use command line arguments, when some
if (!processArgv(argc, argv, versionString))

View File

@@ -37,12 +37,12 @@ enum ModelFlags
struct WMODoodadData;
extern const char * szWorkDirWmo;
extern char const* szWorkDirWmo;
extern std::unordered_map<std::string, WMODoodadData> WmoDoodads;
uint32 GenerateUniqueObjectId(uint32 clientId, uint16 clientDoodadId);
bool FileExists(const char* file);
bool FileExists(char const* file);
void strToLower(char* str);
bool ExtractSingleWmo(std::string& fname);

View File

@@ -65,7 +65,7 @@ namespace WMO
}
/* for whatever reason a certain company just can't stick to one coordinate system... */
static inline Vec3D fixCoords(const Vec3D& v) { return Vec3D(v.z, v.x, v.y); }
static inline Vec3D fixCoords(Vec3D const& v) { return Vec3D(v.z, v.x, v.y); }
struct WMODoodadData
{