|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r78304 - trunk/boost/locale
From: artyomtnk_at_[hidden]
Date: 2012-05-02 09:28:05
Author: artyom
Date: 2012-05-02 09:28:03 EDT (Wed, 02 May 2012)
New Revision: 78304
URL: http://svn.boost.org/trac/boost/changeset/78304
Log:
Closing #6635, patch applied
Text files modified:
trunk/boost/locale/utf.hpp | 38 +++++++++++++++++++-------------------
1 files changed, 19 insertions(+), 19 deletions(-)
Modified: trunk/boost/locale/utf.hpp
==============================================================================
--- trunk/boost/locale/utf.hpp (original)
+++ trunk/boost/locale/utf.hpp 2012-05-02 09:28:03 EDT (Wed, 02 May 2012)
@@ -280,23 +280,23 @@
template<typename Iterator>
static Iterator encode(code_point value,Iterator out)
{
- if(value <=0x7F) {
- *out++ = value;
+ if(value <= 0x7F) {
+ *out++ = static_cast<char_type>(value);
}
- else if(value <=0x7FF) {
- *out++=(value >> 6) | 0xC0;
- *out++=(value & 0x3F) | 0x80;
- }
- else if(BOOST_LOCALE_LIKELY(value <=0xFFFF)) {
- *out++=(value >> 12) | 0xE0;
- *out++=((value >> 6) & 0x3F) | 0x80;
- *out++=(value & 0x3F) | 0x80;
+ else if(value <= 0x7FF) {
+ *out++ = static_cast<char_type>((value >> 6) | 0xC0);
+ *out++ = static_cast<char_type>((value & 0x3F) | 0x80);
+ }
+ else if(BOOST_LOCALE_LIKELY(value <= 0xFFFF)) {
+ *out++ = static_cast<char_type>((value >> 12) | 0xE0);
+ *out++ = static_cast<char_type>(((value >> 6) & 0x3F) | 0x80);
+ *out++ = static_cast<char_type>((value & 0x3F) | 0x80);
}
else {
- *out++=(value >> 18) | 0xF0;
- *out++=((value >> 12) & 0x3F) | 0x80;
- *out++=((value >> 6) & 0x3F) | 0x80;
- *out++=(value & 0x3F) | 0x80;
+ *out++ = static_cast<char_type>((value >> 18) | 0xF0);
+ *out++ = static_cast<char_type>(((value >> 12) & 0x3F) | 0x80);
+ *out++ = static_cast<char_type>(((value >> 6) & 0x3F) | 0x80);
+ *out++ = static_cast<char_type>((value & 0x3F) | 0x80);
}
return out;
}
@@ -380,12 +380,12 @@
static It encode(code_point u,It out)
{
if(BOOST_LOCALE_LIKELY(u<=0xFFFF)) {
- *out++ = u;
+ *out++ = static_cast<char_type>(u);
}
else {
- u-=0x10000;
- *out++=0xD800 | (u>>10);
- *out++=0xDC00 | (u & 0x3FF);
+ u -= 0x10000;
+ *out++ = static_cast<char_type>(0xD800 | (u>>10));
+ *out++ = static_cast<char_type>(0xDC00 | (u & 0x3FF));
}
return out;
}
@@ -434,7 +434,7 @@
template<typename It>
static It encode(code_point u,It out)
{
- *out++ = u;
+ *out++ = static_cast<char_type>(u);
return out;
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk