Rewrote no_conversion to use std::copy. It's much nicer that way, and

avoids GCC 3.2 giving warnings about implicit typenames.
This commit is contained in:
jez_higgins 2002-09-20 09:46:35 +00:00
parent 2a5e9736c0
commit f16e2a30fb

View file

@ -41,6 +41,7 @@
#include <locale>
#include <sstream>
#include <algorithm>
template<typename charT,
typename traitsT = std::char_traits<charT>,
@ -127,8 +128,7 @@ private:
stringT no_conversion(const fromStringT& str)
{
stringT dest;
for(fromStringT::const_iterator i = str.begin(); i != str.end(); ++i)
dest += static_cast<charT>(*i);
std::copy(str.begin(), str.end(), std::back_inserter(dest));
return dest;
} // no_conversion
@ -224,9 +224,8 @@ public:
private:
toStringT no_conversion(const stringT& str)
{
toStringT dest;
for(stringT::const_iterator i = str.begin(); i != str.end(); ++i)
dest += static_cast<toCharT>(*i);
stringT dest;
std::copy(str.begin(), str.end(), std::back_inserter(dest));
return dest;
} // no_conversion