summaryrefslogtreecommitdiff
path: root/src/utfstring.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-10-27 04:44:46 +0000
committerMike Buland <eichlan@xagasoft.com>2011-10-27 04:44:46 +0000
commit9906ffe3c54875133448134c09ec12a0949d48cd (patch)
tree0542fef3d27e796700b87b44394a3ad31dd5b852 /src/utfstring.cpp
parent411f240da34bab53cd18aa8b7ba09834ede49b1c (diff)
parent029b5d159023f4dad607359dbfaa2479e21fe9e5 (diff)
downloadlibbu++-9906ffe3c54875133448134c09ec12a0949d48cd.tar.gz
libbu++-9906ffe3c54875133448134c09ec12a0949d48cd.tar.bz2
libbu++-9906ffe3c54875133448134c09ec12a0949d48cd.tar.xz
libbu++-9906ffe3c54875133448134c09ec12a0949d48cd.zip
Reorg'd! I merged in the release-fixup branch and fixed all random warnings.
I also cleaned up the build script, the symlink generation is faster and looks nicer, there's one think left to fix there, but it's not too bad.
Diffstat (limited to 'src/utfstring.cpp')
-rw-r--r--src/utfstring.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utfstring.cpp b/src/utfstring.cpp
index 3f57618..19d3ddc 100644
--- a/src/utfstring.cpp
+++ b/src/utfstring.cpp
@@ -121,7 +121,7 @@ void Bu::UtfString::setUtf8( const Bu::String &sInput )
121 121
122void Bu::UtfString::setUtf16( const Bu::String &sInput ) 122void Bu::UtfString::setUtf16( const Bu::String &sInput )
123{ 123{
124 Bu::String::const_iterator i = sInput.begin(); 124// Bu::String::const_iterator i = sInput.begin();
125 if( (uint8_t)*sInput.begin() == 0xFF && 125 if( (uint8_t)*sInput.begin() == 0xFF &&
126 (uint8_t)*(sInput.begin()+1) == 0xFE ) 126 (uint8_t)*(sInput.begin()+1) == 0xFE )
127 { 127 {
@@ -311,9 +311,9 @@ void Bu::UtfString::writeUtf8( Bu::Stream &sOut )
311 // 111 111111 111111 111111 311 // 111 111111 111111 111111
312 uByte = (chr>>18)|0xF0; 312 uByte = (chr>>18)|0xF0;
313 sOut.write( &uByte, 1 ); 313 sOut.write( &uByte, 1 );
314 uByte = (chr>>12)&0x3F|0x80; 314 uByte = ((chr>>12)&0x3F)|0x80;
315 sOut.write( &uByte, 1 ); 315 sOut.write( &uByte, 1 );
316 uByte = (chr>>6)&0x3F|0x80; 316 uByte = ((chr>>6)&0x3F)|0x80;
317 sOut.write( &uByte, 1 ); 317 sOut.write( &uByte, 1 );
318 uByte = (chr&0x3F)|0x80; 318 uByte = (chr&0x3F)|0x80;
319 sOut.write( &uByte, 1 ); 319 sOut.write( &uByte, 1 );
@@ -324,7 +324,7 @@ void Bu::UtfString::writeUtf8( Bu::Stream &sOut )
324 // 1111 111111 111111 324 // 1111 111111 111111
325 uByte = (chr>>12)|0xE0; 325 uByte = (chr>>12)|0xE0;
326 sOut.write( &uByte, 1 ); 326 sOut.write( &uByte, 1 );
327 uByte = (chr>>6)&0x3F|0x80; 327 uByte = ((chr>>6)&0x3F)|0x80;
328 sOut.write( &uByte, 1 ); 328 sOut.write( &uByte, 1 );
329 uByte = (chr&0x3F)|0x80; 329 uByte = (chr&0x3F)|0x80;
330 sOut.write( &uByte, 1 ); 330 sOut.write( &uByte, 1 );