1
0
forked from 0ad/0ad

VS2008 compatibility

This was SVN commit r5561.
This commit is contained in:
Ykkrosh 2008-01-17 23:07:26 +00:00
parent 4df9e47976
commit e9c34cc04c
2 changed files with 6 additions and 8 deletions

View File

@ -24,14 +24,14 @@ struct second_equals
template<typename S> bool operator()(const S& v) { return v.second == x; }
};
bool operator< (const CObjectManager::ObjectKey& a, const CObjectManager::ObjectKey& b)
bool CObjectManager::ObjectKey::operator< (const CObjectManager::ObjectKey& a) const
{
if (a.ActorName < b.ActorName)
if (ActorName < a.ActorName)
return true;
else if (a.ActorName > b.ActorName)
else if (ActorName > a.ActorName)
return false;
else
return a.ActorVariation < b.ActorVariation;
return ActorVariation < a.ActorVariation;
}
CObjectManager::CObjectManager(CMeshManager& meshManager, CSkeletonAnimManager& skeletonAnimManager)

View File

@ -25,6 +25,8 @@ public:
CStr ActorName;
std::vector<u8> ActorVariation;
bool operator< (const CObjectManager::ObjectKey& a) const;
};
public:
@ -61,8 +63,4 @@ private:
std::map<CStr, CObjectBase*> m_ObjectBases;
};
// Global comparison operator
bool operator< (const CObjectManager::ObjectKey& a, const CObjectManager::ObjectKey& b);
#endif