From 2371b93b3dc6b9cdbf240e5139816c94657ff370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Wed, 22 Feb 2012 23:22:41 +0100 Subject: [PATCH] move sortable to top level --- library/Core.cpp | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/library/Core.cpp b/library/Core.cpp index efcbb07d4..4b58cf49a 100644 --- a/library/Core.cpp +++ b/library/Core.cpp @@ -173,6 +173,21 @@ void fHKthread(void * iodata) } } +struct sortable +{ + bool recolor; + string name; + string description; + //FIXME: Nuke when MSVC stops failing at being C++11 compliant + sortable(bool recolor_,const string& name_,const string & description_): recolor(recolor_), name(name_), description(description_){}; + bool operator <(const sortable & rhs) const + { + if( name < rhs.name ) + return true; + return false; + }; +}; + static void runInteractiveCommand(Core *core, PluginManager *plug_mgr, int &clueless_counter, const string &command) { Console & con = core->con; @@ -364,21 +379,7 @@ static void runInteractiveCommand(Core *core, PluginManager *plug_mgr, int &clue "\n" "plugins:\n" ); - struct sortable - { - bool recolor; - string name; - string description; - //FIXME: Nuke when MSVC stops failing at being C++11 compliant - sortable(bool recolor_,const string& name_,const string & description_): recolor(recolor_), name(name_), description(description_){}; - bool operator <(const sortable & rhs) const - { - if( name < rhs.name ) - return true; - return false; - }; - }; - set out; + std::set out; for(size_t i = 0; i < plug_mgr->size();i++) { const Plugin * plug = (plug_mgr->operator[](i));