]> git.tdb.fi Git - libs/core.git/commitdiff
Fix some more style warnings
authorMikko Rasa <tdb@tdb.fi>
Sun, 8 Jun 2008 23:15:05 +0000 (23:15 +0000)
committerMikko Rasa <tdb@tdb.fi>
Sun, 8 Jun 2008 23:15:05 +0000 (23:15 +0000)
source/utf8.cpp

index 2d0458f3254b96c69ff827c0f2e86f5a44ab220b..08dd69a664e97dace581bd3324c049217d184a24 100644 (file)
@@ -34,7 +34,7 @@ void Utf8::Encoder::encode_char(UnicodeChar ch, string &buf)
                utf[0]=0xFF<<(8-bytes) | ch>>(bytes*6-6);
                for(unsigned j=bytes-1; j>0; --j)
                {
-                       utf[j]=0x80 | ch&0x3F;
+                       utf[j]=0x80 | (ch&0x3F);
                        ch>>=6;
                }
 
@@ -79,7 +79,7 @@ UnicodeChar Utf8::Decoder::decode_char(const string &str, string::const_iterator
                                i=j;
                                return result;
                        }
-                       result=result<<6 | (*j++)&0x3F;
+                       result=(result<<6) | ((*j++)&0x3F);
                }
 
                if(k<bytes)