Permalink
Browse files

Core: Fix some silly warnings (some stupid remnants from old times th…

…at has bugged me enough)

No need to recompiling anything, it's just a visual change to make the compilers STFU about variable initializations
  • Loading branch information...
1 parent 8ef48ec commit 1d7105914a8bf3c5ffda4f1c59f9a98576c1bcd2 @click click committed Nov 27, 2012
View
@@ -123,14 +123,16 @@
#define SFMT_PARITY 0x00000001, 0x00000000, 0x00000000, 0x5986f054 // Period certification vector
#endif
-// Functions used by SFMTRand::RandomInitByArray
+// Functions used by SFMTRand::RandomInitByArray (UNUSED AND COMMENTED OUT)
+/*
static uint32_t func1(uint32_t x) {
return (x ^ (x >> 27)) * 1664525U;
}
static uint32_t func2(uint32_t x) {
return (x ^ (x >> 27)) * 1566083941U;
}
+*/
// Subfunction for the sfmt algorithm
static inline __m128i sfmt_recursion(__m128i const &a, __m128i const &b,
@@ -59,8 +59,8 @@ class DBCFile
}
private:
Record(DBCFile &file, unsigned char *offset): file(file), offset(offset) {}
- unsigned char *offset;
DBCFile &file;
+ unsigned char *offset;
friend class DBCFile;
friend class DBCFile::Iterator;
@@ -109,6 +109,11 @@ struct MapChunkHeader
class ADTFile
{
+private:
+ //size_t mcnk_offsets[256], mcnk_sizes[256];
+ MPQFile ADT;
+ //mcell Mcell;
+ string Adtfilename;
public:
ADTFile(char* filename);
~ADTFile();
@@ -126,11 +131,6 @@ class ADTFile
return Mcell;
}
*/
-private:
- //size_t mcnk_offsets[256], mcnk_sizes[256];
- MPQFile ADT;
- //mcell Mcell;
- string Adtfilename;
};
const char * GetPlainName(const char * FileName);
@@ -30,6 +30,15 @@ Vec3D fixCoordSystem(Vec3D v);
class Model
{
+private:
+ void _unload()
+ {
+ delete[] vertices;
+ delete[] indices;
+ vertices = NULL;
+ indices = NULL;
+ }
+ std::string filename;
public:
ModelHeader header;
Vec3D* vertices;
@@ -40,17 +49,6 @@ class Model
Model(std::string& filename);
~Model() { _unload(); }
-
-private:
- void _unload()
- {
- delete[] vertices;
- delete[] indices;
- vertices = NULL;
- indices = NULL;
- }
-
- std::string filename;
};
class ModelInstance
@@ -63,7 +61,7 @@ class ModelInstance
unsigned int d1, scale;
float w, sc;
- ModelInstance() : model(NULL), d1(0), scale(0), w(0.0f), sc(0.0f), id(0) {}
+ ModelInstance() : model(NULL), id(0), d1(0), scale(0), w(0.0f), sc(0.0f) {}
ModelInstance(MPQFile& f, char const* ModelInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE* pDirfile);
};
@@ -35,7 +35,7 @@ WDTFile::WDTFile(char* file_name, char* file_name1) : WDT(file_name), gWmoInstan
filename.append(file_name1,strlen(file_name1));
}
-bool WDTFile::init(char *map_id, unsigned int mapID)
+bool WDTFile::init(char */*map_id*/, unsigned int mapID)
{
if (WDT.isEof())
{
@@ -10,6 +10,9 @@ class ADTFile;
class WDTFile
{
+private:
+ MPQFile WDT;
+ string filename;
public:
WDTFile(char* file_name, char* file_name1);
~WDTFile(void);
@@ -19,10 +22,6 @@ class WDTFile
int gnWMO;
ADTFile* GetMap(int x, int z);
-
-private:
- MPQFile WDT;
- string filename;
};
#endif
@@ -44,9 +44,11 @@ static inline Vec3D fixCoords(const Vec3D &v){ return Vec3D(v.z, v.x, v.y); }
class WMORoot
{
+private:
+ std::string filename;
public:
- uint32 nTextures, nGroups, nP, nLights, nModels, nDoodads, nDoodadSets, RootWMOID, liquidType;
unsigned int col;
+ uint32 nTextures, nGroups, nP, nLights, nModels, nDoodads, nDoodadSets, RootWMOID, liquidType;
float bbcorn1[3];
float bbcorn2[3];
@@ -55,8 +57,6 @@ class WMORoot
bool open();
bool ConvertToVMAPRootWmo(FILE* output);
-private:
- std::string filename;
};
struct WMOLiquidHeader
@@ -77,9 +77,22 @@ struct WMOLiquidVert
class WMOGroup
{
+private:
+ std::string filename;
public:
// MOGP
- int groupName, descGroupName, mogpFlags;
+
+ char* MOPY;
+ uint16* MOVI;
+ uint16* MoviEx;
+ float* MOVT;
+ uint16* MOBA;
+ int* MobaEx;
+ WMOLiquidHeader* hlq;
+ WMOLiquidVert* LiquEx;
+ char* LiquBytes;
+ int groupName, descGroupName;
+ int mogpFlags;
float bbcorn1[3];
float bbcorn2[3];
uint16 moprIdx;
@@ -92,25 +105,13 @@ class WMOGroup
int LiquEx_size;
unsigned int nVertices; // number when loaded
int nTriangles; // number when loaded
- char* MOPY;
- uint16* MOVI;
- uint16* MoviEx;
- float* MOVT;
- uint16* MOBA;
- int* MobaEx;
- WMOLiquidHeader* hlq;
- WMOLiquidVert* LiquEx;
- char* LiquBytes;
uint32 liquflags;
WMOGroup(std::string const& filename);
~WMOGroup();
bool open();
int ConvertToVMAPGroupWmo(FILE* output, WMORoot* rootWMO, bool preciseVectorData);
-
-private:
- std::string filename;
};
class WMOInstance
@@ -121,10 +122,10 @@ class WMOInstance
int currx;
int curry;
WMOGroup* wmo;
+ int doodadset;
Vec3D pos;
Vec3D pos2, pos3, rot;
uint32 indx, id, d2, d3;
- int doodadset;
WMOInstance(MPQFile&f , char const* WmoInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE* pDirfile);

0 comments on commit 1d71059

Please sign in to comment.