From e9c34cc04caf6da09787959d7076da382b9f9bdd Mon Sep 17 00:00:00 2001 From: Ykkrosh Date: Thu, 17 Jan 2008 23:07:26 +0000 Subject: [PATCH] VS2008 compatibility This was SVN commit r5561. --- source/graphics/ObjectManager.cpp | 8 ++++---- source/graphics/ObjectManager.h | 6 ++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/source/graphics/ObjectManager.cpp b/source/graphics/ObjectManager.cpp index 31dadd96f7..7d51493079 100644 --- a/source/graphics/ObjectManager.cpp +++ b/source/graphics/ObjectManager.cpp @@ -24,14 +24,14 @@ struct second_equals template 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) diff --git a/source/graphics/ObjectManager.h b/source/graphics/ObjectManager.h index 3d805aa1e4..697c3f6067 100644 --- a/source/graphics/ObjectManager.h +++ b/source/graphics/ObjectManager.h @@ -25,6 +25,8 @@ public: CStr ActorName; std::vector ActorVariation; + + bool operator< (const CObjectManager::ObjectKey& a) const; }; public: @@ -61,8 +63,4 @@ private: std::map m_ObjectBases; }; - -// Global comparison operator -bool operator< (const CObjectManager::ObjectKey& a, const CObjectManager::ObjectKey& b); - #endif