]> git.tdb.fi Git - libs/core.git/blobdiff - source/strings/lexicalcast.cpp
Use C++11 features with containers
[libs/core.git] / source / strings / lexicalcast.cpp
index f5b3a95ee9af7ea0db2e1865b709dadf77dbf1de..2fc4be35c182f2d3dde801212580b2329df7a4b1 100644 (file)
@@ -113,7 +113,7 @@ T str_to_int(const string &s, const Fmt &f)
        if(s.empty())
                throw lexical_error("conversion of '' to integer");
 
-       string::const_iterator i = s.begin();
+       auto i = s.begin();
 
        // See if the input starts with a sign
        bool neg = false;
@@ -389,7 +389,7 @@ T str_to_flt(const string &s, const Fmt &)
        if(s.empty())
                throw lexical_error("conversion of '' to floating-point");
 
-       string::const_iterator i = s.begin();
+       auto i = s.begin();
 
        // See if the input starts with a sign
        bool neg = false;