From: mattn Date: Thu, 19 Jun 2008 11:56:48 +0000 (+0000) Subject: * renamed class LoadModule into CLoadModule because LoadModule is already a registere... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f98b3b3e7bb45c0c07713021236cb626759fd768;p=xonotic%2Fnetradiant.git * renamed class LoadModule into CLoadModule because LoadModule is already a registered function on windows * fixed some other windows compilation problems git-svn-id: https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/trunk@256 8a3a26a2-13c4-0310-b231-cf6edde360e5 --- diff --git a/libs/traverselib.h b/libs/traverselib.h index 1cd0a95e..183113b8 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 33797301..ad0035eb 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)