Added returns to avoid fall through between case statements
This commit is contained in:
parent
5f7b388c16
commit
559dad93b8
@ -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