Fixed signedness to avoid strange error messages.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@797 dfc29bdd-3216-0410-991c-e03cc46cb475
master
hybrid 2007-07-17 21:57:10 +00:00
parent 732a14ae70
commit 80148ed319
2 changed files with 5 additions and 5 deletions

View File

@ -1048,14 +1048,14 @@ u32 CNullDriver::getMaximalPrimitiveCount()
//! checks triangle count and print warning if wrong
bool CNullDriver::checkPrimitiveCount(s32 prmCount)
bool CNullDriver::checkPrimitiveCount(u32 prmCount)
{
s32 m = getMaximalPrimitiveCount();
u32 m = getMaximalPrimitiveCount();
if ((prmCount-1) > m)
if (prmCount > m)
{
char tmp[1024];
sprintf(tmp,"Could not draw triangles, too many primitives(%d), maxium is %d.", prmCount, m);
sprintf(tmp,"Could not draw triangles, too many primitives(%u), maxium is %u.", prmCount, m);
os::Printer::log(tmp, ELL_ERROR);
return false;
}

View File

@ -420,7 +420,7 @@ namespace video
virtual video::ITexture* createDeviceDependentTexture(IImage* surface, const char* name);
//! checks triangle count and print warning if wrong
bool checkPrimitiveCount(s32 prmcnt);
bool checkPrimitiveCount(u32 prmcnt);
// adds a material renderer and drops it afterwards. To be used for internal creation
s32 addAndDropMaterialRenderer(IMaterialRenderer* m);