Utils/Console: Fix testServer build
[senf.git] / senf / Utils / Console / STLSupport.ct
index 08116a0..108b974 100644 (file)
@@ -40,12 +40,7 @@ template <class Collection>
 prefix_ std::string
 senf::console::detail::CollectionArgumentTraitsBase<Collection>::description()
 {
-    std::string type (prettyName(typeid(Collection)));
-    std::string::size_type e (type.find('<'));
-    if (e == std::string::npos) e = type.size();
-    std::string::size_type b (type.rfind(':', e));
-    if (b == std::string::npos) b = 0; else ++b;
-    return type.substr(b,e-b) + "<" 
+    return senf::prettyBaseName(typeid(Collection)) + "<" 
         + ArgumentTraits<typename Collection::value_type>::description() + ">";
 }
 
@@ -120,12 +115,7 @@ parse(ParseCommandInfo::TokensRange const & tokens, Collection & out)
 template <class Collection>
 prefix_ std::string senf::console::detail::MapArgumentTraits<Collection>::description()
 {
-    std::string type (prettyName(typeid(Collection)));
-    std::string::size_type e (type.find('<'));
-    if (e == std::string::npos) e = type.size();
-    std::string::size_type b (type.rfind(':', e));
-    if (b == std::string::npos) b = 0; else ++b;
-    return type.substr(b,e-b) + "<" 
+    return senf::prettyBaseName(typeid(Collection)) + "<" 
         + ArgumentTraits<typename Collection::key_type>::description() + ","
         + ArgumentTraits<typename Collection::mapped_type>::description() + ">";
 }