From: g0dil Date: Mon, 18 May 2009 13:41:31 +0000 (+0000) Subject: Utils/Logger: Remove unneeded implemenatation detail (SelectName) X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=f9a4c0220f2106091d833af051de89e255f40308;p=senf.git Utils/Logger: Remove unneeded implemenatation detail (SelectName) git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1214 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Utils/Logger/StreamRegistry.cci b/Utils/Logger/StreamRegistry.cci index 02f0151..531b0e0 100644 --- a/Utils/Logger/StreamRegistry.cci +++ b/Utils/Logger/StreamRegistry.cci @@ -34,24 +34,19 @@ /////////////////////////////////////////////////////////////////////////// // senf::log::StreamRegistry -prefix_ std::string const & -senf::log::StreamRegistry::SelectName::operator()(Registry::value_type const & v) - const -{ - return v.first; -} - prefix_ senf::log::StreamRegistry::StreamRegistry() {} prefix_ senf::log::StreamRegistry::iterator senf::log::StreamRegistry::begin() { - return boost::make_transform_iterator(registry_.begin(), SelectName()); + return boost::make_transform_iterator(registry_.begin(), + ::__gnu_cxx::select1st()); } prefix_ senf::log::StreamRegistry::iterator senf::log::StreamRegistry::end() { - return boost::make_transform_iterator(registry_.end(), SelectName()); + return boost::make_transform_iterator(registry_.end(), + ::__gnu_cxx::select1st()); } prefix_ void senf::log::StreamRegistry::registerStream(detail::StreamBase const & stream) diff --git a/Utils/Logger/StreamRegistry.hh b/Utils/Logger/StreamRegistry.hh index 1d098db..48e5c59 100644 --- a/Utils/Logger/StreamRegistry.hh +++ b/Utils/Logger/StreamRegistry.hh @@ -29,6 +29,7 @@ // Custom includes #include #include +#include #include #include "Levels.hh" #include "../singleton.hh" @@ -55,14 +56,9 @@ namespace log { { typedef std::map Registry; - struct SelectName - { - typedef std::string result_type; - std::string const & operator()(Registry::value_type const & v) const; - }; - public: - typedef boost::transform_iterator iterator; + typedef boost::transform_iterator< ::__gnu_cxx::select1st, + Registry::const_iterator > iterator; # ifdef DOXYGEN // Hmm ... doxygen does not understand 'using declarations' ...