mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 13:16:23 +00:00
refactor(Core): apply clang-tidy modernize-use-default-member-init (#3827)
This commit is contained in:
@@ -17,14 +17,13 @@ namespace MMAP
|
||||
// this class gathers all debug info holding and output
|
||||
struct IntermediateValues
|
||||
{
|
||||
rcHeightfield* heightfield;
|
||||
rcCompactHeightfield* compactHeightfield;
|
||||
rcContourSet* contours;
|
||||
rcPolyMesh* polyMesh;
|
||||
rcPolyMeshDetail* polyMeshDetail;
|
||||
rcHeightfield* heightfield{nullptr};
|
||||
rcCompactHeightfield* compactHeightfield{nullptr};
|
||||
rcContourSet* contours{nullptr};
|
||||
rcPolyMesh* polyMesh{nullptr};
|
||||
rcPolyMeshDetail* polyMeshDetail{nullptr};
|
||||
|
||||
IntermediateValues() : heightfield(nullptr), compactHeightfield(nullptr),
|
||||
contours(nullptr), polyMesh(nullptr), polyMeshDetail(nullptr) {}
|
||||
IntermediateValues() {}
|
||||
~IntermediateValues();
|
||||
|
||||
void writeIV(uint32 mapID, uint32 tileX, uint32 tileY);
|
||||
|
||||
@@ -25,15 +25,14 @@ namespace DisableMgr
|
||||
|
||||
struct MmapTileHeader
|
||||
{
|
||||
uint32 mmapMagic;
|
||||
uint32 mmapMagic{MMAP_MAGIC};
|
||||
uint32 dtVersion;
|
||||
uint32 mmapVersion;
|
||||
uint32 size;
|
||||
char usesLiquids;
|
||||
char padding[3];
|
||||
uint32 mmapVersion{MMAP_VERSION};
|
||||
uint32 size{0};
|
||||
char usesLiquids{true};
|
||||
char padding[3]{};
|
||||
|
||||
MmapTileHeader() : mmapMagic(MMAP_MAGIC), dtVersion(DT_NAVMESH_VERSION),
|
||||
mmapVersion(MMAP_VERSION), size(0), usesLiquids(true), padding() {}
|
||||
MmapTileHeader() : dtVersion(DT_NAVMESH_VERSION) {}
|
||||
};
|
||||
|
||||
// All padding fields must be handled and initialized to ensure mmaps_generator will produce binary-identical *.mmtile files
|
||||
@@ -50,7 +49,7 @@ namespace MMAP
|
||||
MapBuilder::MapBuilder(float maxWalkableAngle, bool skipLiquid,
|
||||
bool skipContinents, bool skipJunkMaps, bool skipBattlegrounds,
|
||||
bool debugOutput, bool bigBaseUnit, const char* offMeshFilePath) :
|
||||
m_terrainBuilder (nullptr),
|
||||
|
||||
m_debugOutput (debugOutput),
|
||||
m_offMeshFilePath (offMeshFilePath),
|
||||
m_skipContinents (skipContinents),
|
||||
@@ -58,7 +57,7 @@ namespace MMAP
|
||||
m_skipBattlegrounds (skipBattlegrounds),
|
||||
m_maxWalkableAngle (maxWalkableAngle),
|
||||
m_bigBaseUnit (bigBaseUnit),
|
||||
m_rcContext (nullptr),
|
||||
|
||||
_cancelationToken (false)
|
||||
{
|
||||
m_terrainBuilder = new TerrainBuilder(skipLiquid);
|
||||
|
||||
@@ -27,13 +27,13 @@ namespace MMAP
|
||||
{
|
||||
struct MapTiles
|
||||
{
|
||||
MapTiles() : m_mapId(uint32(-1)), m_tiles(nullptr) {}
|
||||
MapTiles() : m_mapId(uint32(-1)) {}
|
||||
|
||||
MapTiles(uint32 id, std::set<uint32>* tiles) : m_mapId(id), m_tiles(tiles) {}
|
||||
~MapTiles() = default;
|
||||
|
||||
uint32 m_mapId;
|
||||
std::set<uint32>* m_tiles;
|
||||
std::set<uint32>* m_tiles{nullptr};
|
||||
|
||||
bool operator==(uint32 id)
|
||||
{
|
||||
@@ -45,7 +45,7 @@ namespace MMAP
|
||||
|
||||
struct Tile
|
||||
{
|
||||
Tile() : chf(nullptr), solid(nullptr), cset(nullptr), pmesh(nullptr), dmesh(nullptr) {}
|
||||
Tile() {}
|
||||
~Tile()
|
||||
{
|
||||
rcFreeCompactHeightfield(chf);
|
||||
@@ -54,11 +54,11 @@ namespace MMAP
|
||||
rcFreePolyMesh(pmesh);
|
||||
rcFreePolyMeshDetail(dmesh);
|
||||
}
|
||||
rcCompactHeightfield* chf;
|
||||
rcHeightfield* solid;
|
||||
rcContourSet* cset;
|
||||
rcPolyMesh* pmesh;
|
||||
rcPolyMeshDetail* dmesh;
|
||||
rcCompactHeightfield* chf{nullptr};
|
||||
rcHeightfield* solid{nullptr};
|
||||
rcContourSet* cset{nullptr};
|
||||
rcPolyMesh* pmesh{nullptr};
|
||||
rcPolyMeshDetail* dmesh{nullptr};
|
||||
};
|
||||
|
||||
class MapBuilder
|
||||
@@ -116,7 +116,7 @@ namespace MMAP
|
||||
// percentageDone - method to calculate percentage
|
||||
uint32 percentageDone(uint32 totalTiles, uint32 totalTilesDone);
|
||||
|
||||
TerrainBuilder* m_terrainBuilder;
|
||||
TerrainBuilder* m_terrainBuilder{nullptr};
|
||||
TileList m_tiles;
|
||||
|
||||
bool m_debugOutput;
|
||||
@@ -133,7 +133,7 @@ namespace MMAP
|
||||
std::atomic<uint32> m_totalTilesBuilt;
|
||||
|
||||
// build performance - not really used for now
|
||||
rcContext* m_rcContext;
|
||||
rcContext* m_rcContext{nullptr};
|
||||
|
||||
std::vector<std::thread> _workerThreads;
|
||||
ProducerConsumerQueue<uint32> _queue;
|
||||
|
||||
Reference in New Issue
Block a user