Utils/Console: Introduce senf::console::str()
[senf.git] / senf / Utils / Console / Utility.ct
index 14b5094..771e36d 100644 (file)
@@ -39,7 +39,7 @@ parse(ParseCommandInfo::TokensRange const & tokens, type & out)
     if (tokens.size() != 1)
         throw senf::console::SyntaxErrorException("parameter syntax error");
     std::string v (tokens.begin()[0].value());
-    unsigned i (v.find(':'));
+    std::string::size_type i (v.find(':'));
     try {
         if (i == std::string::npos)
             out.low = out.high = boost::lexical_cast<T>(v);
@@ -73,9 +73,9 @@ template <class T>
 prefix_ void senf::console::ReturnValueTraits< senf::console::ValueRange<T> >::
 format(type const & value, std::ostream & os)
 {
-    os << value.low;
+    os << senf::console::str(value.low);
     if (value.low != value.high)
-        os << ':' << value.high;
+        os << ':' << senf::console::str(value.high);
 }
 
 ///////////////////////////////ct.e////////////////////////////////////////