aboutsummaryrefslogtreecommitdiff
path: root/src/server/collision/Models/ModelInstance.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2011-03-08 16:42:00 +0100
committerShauren <shauren.trinity@gmail.com>2011-03-08 16:42:00 +0100
commite5347a3bdadc5468916a11f9da5c9561f955f79a (patch)
treea01fd9010a6eb3e40f1d89103738a3cd5fbe96de /src/server/collision/Models/ModelInstance.cpp
parent00f2ded757f2fe47ca40d3c5269008e6fa39aa21 (diff)
Core: Fixed warnings:
C4100: 'variable' : unreferenced formal parameter C4701: potentially uninitialized local variable C4389: '!=' : signed/unsigned mismatch C4245: 'argument' : conversion from 'X' to 'Y', signed/unsigned mismatch
Diffstat (limited to 'src/server/collision/Models/ModelInstance.cpp')
-rw-r--r--src/server/collision/Models/ModelInstance.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/collision/Models/ModelInstance.cpp b/src/server/collision/Models/ModelInstance.cpp
index 57e1e42d579..e9258fdb522 100644
--- a/src/server/collision/Models/ModelInstance.cpp
+++ b/src/server/collision/Models/ModelInstance.cpp
@@ -153,7 +153,7 @@ namespace VMAP
bool ModelSpawn::readFromFile(FILE *rf, ModelSpawn &spawn)
{
- uint32 check=0, nameLen;
+ uint32 check = 0, nameLen;
check += fread(&spawn.flags, sizeof(uint32), 1, rf);
// EoF?
if (!check)
@@ -176,13 +176,13 @@ namespace VMAP
spawn.iBound = G3D::AABox(bLow, bHigh);
}
check += fread(&nameLen, sizeof(uint32), 1, rf);
- if(check != (has_bound ? 17 : 11))
+ if (check != uint32(has_bound ? 17 : 11))
{
std::cout << "Error reading ModelSpawn!\n";
return false;
}
char nameBuff[500];
- if (nameLen>500) // file names should never be that long, must be file error
+ if (nameLen > 500) // file names should never be that long, must be file error
{
std::cout << "Error reading ModelSpawn, file name too long!\n";
return false;
@@ -207,16 +207,16 @@ namespace VMAP
check += fwrite(&spawn.iRot, sizeof(float), 3, wf);
check += fwrite(&spawn.iScale, sizeof(float), 1, wf);
bool has_bound = (spawn.flags & MOD_HAS_BOUND);
- if(has_bound) // only WMOs have bound in MPQ, only available after computation
+ if (has_bound) // only WMOs have bound in MPQ, only available after computation
{
check += fwrite(&spawn.iBound.low(), sizeof(float), 3, wf);
check += fwrite(&spawn.iBound.high(), sizeof(float), 3, wf);
}
uint32 nameLen = spawn.name.length();
check += fwrite(&nameLen, sizeof(uint32), 1, wf);
- if(check != (has_bound ? 17 : 11)) return false;
+ if (check != uint32(has_bound ? 17 : 11)) return false;
check = fwrite(spawn.name.c_str(), sizeof(char), nameLen, wf);
- if(check != nameLen) return false;
+ if (check != nameLen) return false;
return true;
}