Added returns to avoid fall through between case statements
This commit is contained in:
parent
6bd2d9054e
commit
0cee5f5d27
@ -135,11 +135,13 @@ int ShapeAttribute::compare(const osgSim::ShapeAttribute& sa) const
|
|||||||
{
|
{
|
||||||
if (_string<sa._string) return -1;
|
if (_string<sa._string) return -1;
|
||||||
if (sa._string<_string) return 1;
|
if (sa._string<_string) return 1;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
case DOUBLE:
|
case DOUBLE:
|
||||||
{
|
{
|
||||||
if (_double<sa._double) return -1;
|
if (_double<sa._double) return -1;
|
||||||
if (sa._double<_double) return 1;
|
if (sa._double<_double) return 1;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
case INTEGER:
|
case INTEGER:
|
||||||
case UNKNOWN:
|
case UNKNOWN:
|
||||||
@ -147,6 +149,7 @@ int ShapeAttribute::compare(const osgSim::ShapeAttribute& sa) const
|
|||||||
{
|
{
|
||||||
if (_integer<sa._integer) return -1;
|
if (_integer<sa._integer) return -1;
|
||||||
if (sa._integer<_integer) return 1;
|
if (sa._integer<_integer) return 1;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user