mirror of
https://github.com/jezhiggins/arabica
synced 2024-11-17 07:48:50 +01:00
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:
parent
2a5e9736c0
commit
f16e2a30fb
1 changed files with 4 additions and 5 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue