Fixed warnings

This commit is contained in:
Robert Osfield
2004-08-02 13:57:47 +00:00
parent 9b33dee6ac
commit ebad31c3dd
6 changed files with 46 additions and 9 deletions

View File

@@ -19,9 +19,12 @@ using namespace osg;
int PointSprite::compare(const StateAttribute& sa) const
{
// check the types are equal and then create the rhs variable
// used by the COMPARE_StateAttribute_Paramter macro's below.
COMPARE_StateAttribute_Types(PointSprite,sa)
if (this==&sa) return 0;\
const std::type_info* type_lhs = &typeid(*this);\
const std::type_info* type_rhs = &typeid(sa);\
if (type_lhs->before(*type_rhs)) return -1;\
if (*type_lhs != *type_rhs) return 1;\
return 0; // passed all the above comparison macro's, must be equal.
}