Removed two harmless warning

testing <0 of a unsigned int
This commit is contained in:
Paolo Cignoni 2016-06-14 15:30:11 +02:00
parent 32333eba24
commit c9ebf323fa
2 changed files with 5 additions and 5 deletions

View File

@ -65,7 +65,7 @@ namespace vcg
ATT_NAMES(unsigned int att) ATT_NAMES(unsigned int att)
{ {
if ((att < ATT_VERTPOSITION) || (att >= ATT_NAMES::enumArity())) if (att >= ATT_NAMES::enumArity())
throw Exception("Out of range value\n"); throw Exception("Out of range value\n");
else else
_val = att; _val = att;
@ -309,7 +309,7 @@ namespace vcg
INT_ATT_NAMES(unsigned int att) INT_ATT_NAMES(unsigned int att)
:ATT_NAMES() :ATT_NAMES()
{ {
if ((att < INT_ATT_NAMES::ATT_VERTPOSITION) || (att >= INT_ATT_NAMES::enumArity())) if (att >= INT_ATT_NAMES::enumArity())
throw Exception("Out of range value\n"); throw Exception("Out of range value\n");
else else
_val = att; _val = att;

View File

@ -1910,7 +1910,7 @@ namespace vcg
void setBufferPointer( INT_ATT_NAMES boname) const void setBufferPointer( INT_ATT_NAMES boname) const
{ {
unsigned int ii = boname; unsigned int ii = boname;
if ((ii < INT_ATT_NAMES::ATT_VERTPOSITION) || (ii >= INT_ATT_NAMES::enumArity())) if (ii >= INT_ATT_NAMES::enumArity())
return; return;
GLBufferObject* cbo = _bo[ii]; GLBufferObject* cbo = _bo[ii];
if (cbo == NULL) if (cbo == NULL)
@ -1948,7 +1948,7 @@ namespace vcg
void disableClientState( INT_ATT_NAMES boname,const RendAtts& req) const void disableClientState( INT_ATT_NAMES boname,const RendAtts& req) const
{ {
if ((boname < INT_ATT_NAMES::ATT_VERTPOSITION) || (boname >= INT_ATT_NAMES::enumArity())) if (boname >= INT_ATT_NAMES::enumArity())
return; return;
switch(boname) switch(boname)