Added returns to avoid fall through between case statements

This commit is contained in:
Robert Osfield 2018-01-11 08:51:08 +00:00
parent 6bd2d9054e
commit 0cee5f5d27

View File

@ -135,11 +135,13 @@ int ShapeAttribute::compare(const osgSim::ShapeAttribute& sa) const
{
if (_string<sa._string) return -1;
if (sa._string<_string) return 1;
return 0;
}
case DOUBLE:
{
if (_double<sa._double) return -1;
if (sa._double<_double) return 1;
return 0;
}
case INTEGER:
case UNKNOWN:
@ -147,6 +149,7 @@ int ShapeAttribute::compare(const osgSim::ShapeAttribute& sa) const
{
if (_integer<sa._integer) return -1;
if (sa._integer<_integer) return 1;
return 0;
}
}
return 0;