aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/locale_independent_float.cpp
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2010-01-28 11:32:39 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2013-01-05 17:17:46 +0100
commit271c7cabf5e16a1afed560b9f707b3955b3ec725 (patch)
tree026b6678c6973205e32698af795830d58c5121d6 /src/utils/locale_independent_float.cpp
parent2adaea29500b412c342838e22df2f8b4ac2eb02d (diff)
downloadusdx-271c7cabf5e16a1afed560b9f707b3955b3ec725.tar.gz
usdx-271c7cabf5e16a1afed560b9f707b3955b3ec725.tar.xz
usdx-271c7cabf5e16a1afed560b9f707b3955b3ec725.zip
converted all strings and chars to wstrings and wchar_ts
all strings with displayable content are now the wide strings for proper unicode handling added boost dependency for proper reading unicode from files
Diffstat (limited to 'src/utils/locale_independent_float.cpp')
-rw-r--r--src/utils/locale_independent_float.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/utils/locale_independent_float.cpp b/src/utils/locale_independent_float.cpp
index e0015cee..606ec998 100644
--- a/src/utils/locale_independent_float.cpp
+++ b/src/utils/locale_independent_float.cpp
@@ -38,7 +38,7 @@ namespace usdx
{
}
- LocaleIndependentFloat::LocaleIndependentFloat(std::string& value)
+ LocaleIndependentFloat::LocaleIndependentFloat(std::wstring& value)
{
this->operator=(value);
}
@@ -65,27 +65,27 @@ namespace usdx
return *this;
}
- LocaleIndependentFloat& LocaleIndependentFloat::operator= (std::string& value)
+ LocaleIndependentFloat& LocaleIndependentFloat::operator= (std::wstring& value)
{
- std::size_t found = value.find(',');
- if (found != std::string::npos) {
- value[found] = '.';
+ std::size_t found = value.find(L',');
+ if (found != std::wstring::npos) {
+ value[found] = L'.';
}
- std::istringstream str(value);
+ std::wistringstream str(value);
str >> this->value;
return *this;
}
- std::istream& operator>> (std::istream& is, LocaleIndependentFloat& float_value)
+ std::wistream& operator>> (std::wistream& is, LocaleIndependentFloat& float_value)
{
return is >> &float_value;
}
- std::istream& operator>> (std::istream& is, LocaleIndependentFloat* float_value)
+ std::wistream& operator>> (std::wistream& is, LocaleIndependentFloat* float_value)
{
- std::string str_value;
+ std::wstring str_value;
is >> str_value;
*float_value = str_value;