From a95c219c97e0cdbe80537da0bf75bc6ad34dcb79 Mon Sep 17 00:00:00 2001 From: mattn Date: Thu, 19 Jun 2008 11:56:48 +0000 Subject: [PATCH] * renamed class LoadModule into CLoadModule because LoadModule is already a registered function on windows * fixed some other windows compilation problems git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@256 8a3a26a2-13c4-0310-b231-cf6edde360e5 --- libs/traverselib.h | 15 ++++++++++++--- radiant/mainframe.cpp | 6 +++--- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/libs/traverselib.h b/libs/traverselib.h index 1cd0a95..183113b 100644 --- a/libs/traverselib.h +++ b/libs/traverselib.h @@ -52,6 +52,11 @@ public: m_observer->insert(node); return *this; } + TraversableObserverInsertOutputIterator& operator=(const NodeSmartReference& node) + { + m_observer->insert(node); + return *this; + } TraversableObserverInsertOutputIterator& operator*() { return *this; } TraversableObserverInsertOutputIterator& operator++() { return *this; } TraversableObserverInsertOutputIterator& operator++(int) { return *this; } @@ -77,18 +82,22 @@ public: m_observer->erase(node); return *this; } + TraversableObserverEraseOutputIterator& operator=(const NodeSmartReference& node) + { + m_observer->erase(node); + return *this; + } TraversableObserverEraseOutputIterator& operator*() { return *this; } TraversableObserverEraseOutputIterator& operator++() { return *this; } TraversableObserverEraseOutputIterator& operator++(int) { return *this; } }; - typedef UnsortedSet UnsortedNodeSet; /// \brief Calls \p observer->\c insert for each node that exists only in \p other and \p observer->\c erase for each node that exists only in \p self inline void nodeset_diff(const UnsortedNodeSet& self, const UnsortedNodeSet& other, scene::Traversable::Observer* observer) { - std::vector sorted(self.begin(), self.end()); - std::vector other_sorted(other.begin(), other.end()); + std::vector sorted(self.begin(), self.end()); + std::vector other_sorted(other.begin(), other.end()); std::sort(sorted.begin(), sorted.end()); std::sort(other_sorted.begin(), other_sorted.end()); diff --git a/radiant/mainframe.cpp b/radiant/mainframe.cpp index 3379730..ad0035e 100644 --- a/radiant/mainframe.cpp +++ b/radiant/mainframe.cpp @@ -502,11 +502,11 @@ void gamemode_set(const char* gamemode) #include "os/dir.h" -class LoadModule +class CLoadModule { const char* m_path; public: - LoadModule(const char* path) : m_path(path) + CLoadModule(const char* path) : m_path(path) { } void operator()(const char* name) const @@ -532,7 +532,7 @@ const char* const c_library_extension = void Radiant_loadModules(const char* path) { - Directory_forEach(path, MatchFileExtension(c_library_extension, LoadModule(path))); + Directory_forEach(path, MatchFileExtension(c_library_extension, CLoadModule(path))); } void Radiant_loadModulesFromRoot(const char* directory)