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

View File

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