Fixed Geometry::removePrimitiveSet method so that it no longer emits a warning when

removing 0 elements form an empty primtive set list.
This commit is contained in:
Robert Osfield
2008-01-21 12:00:10 +00:00
parent fea3595b43
commit 5c6869ccc9

View File

@@ -867,7 +867,9 @@ bool Geometry::insertPrimitiveSet(unsigned int i,PrimitiveSet* primitiveset)
bool Geometry::removePrimitiveSet(unsigned int i, unsigned int numElementsToRemove)
{
if (i<_primitives.size() && numElementsToRemove>0)
if (numElementsToRemove==0) return false;
if (i<_primitives.size())
{
if (i+numElementsToRemove<=_primitives.size())
{