reverting r681

This commit is contained in:
Artem Pavlenko 2008-04-06 09:23:17 +00:00
parent 49208998c6
commit ab29b03833
3 changed files with 15 additions and 18 deletions

View file

@ -40,10 +40,10 @@ namespace mapnik {
:abgr_(0xffffffff) {} :abgr_(0xffffffff) {}
Color(int red,int green,int blue,int alpha=0xff) Color(int red,int green,int blue,int alpha=0xff)
: abgr_(((alpha&0xff) << 24 | : abgr_((alpha&0xff) << 24 |
(blue&0xff)) << 16 | (blue&0xff) << 16 |
((green&0xff) << 8 | (green&0xff) << 8 |
(red&0xff))) {} red&0xff) {}
explicit Color(int rgba) explicit Color(int rgba)
: abgr_(rgba) {} : abgr_(rgba) {}
@ -88,7 +88,7 @@ namespace mapnik {
} }
inline void set_alpha(unsigned int a) inline void set_alpha(unsigned int a)
{ {
abgr_ = (abgr_ & 0x00ffffff) | ((a&0xff) << 24); abgr_ = (abgr_ & 0x00ffffff | (a&0xff) << 24);
} }
inline unsigned int rgba() const inline unsigned int rgba() const

View file

@ -145,10 +145,7 @@ namespace mapnik
else else
{ {
const char* b=wkb_+pos_; const char* b=wkb_+pos_;
n = (((b[3]&0xff) | n = b[3]&0xff | (b[2]&0xff)<<8 | (b[1]&0xff)<<16 | (b[0]&0xff)<<24;
(b[2]&0xff)) << 8 |
((b[1]&0xff) << 16 |
(b[0]&0xff)) << 24);
} }
pos_+=4; pos_+=4;
@ -169,14 +166,14 @@ namespace mapnik
// but not in C++ yet // but not in C++ yet
// this is not quite portable // this is not quite portable
const char* b= wkb_+pos_; const char* b= wkb_+pos_;
long long n = (((long long)b[7]&0xff) | long long n = (long long)b[7]&0xff |
((long long)b[6]&0xff)<<8 | ((long long)b[6]&0xff)<<8 |
((long long)b[5]&0xff)<<16 | ((long long)b[5]&0xff)<<16 |
((long long)b[4]&0xff)<<24 | ((long long)b[4]&0xff)<<24 |
((long long)b[3]&0xff)<<32 | ((long long)b[3]&0xff)<<32 |
((long long)b[2]&0xff)<<40 | ((long long)b[2]&0xff)<<40 |
((long long)b[1]&0xff)<<48 | ((long long)b[1]&0xff)<<48 |
((long long)b[0]&0xff)<<56); ((long long)b[0]&0xff)<<56;
memcpy(&d,&n,8); memcpy(&d,&n,8);
} }
pos_+=8; pos_+=8;

View file

@ -354,7 +354,7 @@ const char* TiXmlBase::SkipWhiteSpace( const char* p, TiXmlEncoding encoding )
} }
else else
{ {
while ((*p && IsWhiteSpace( *p )) || *p == '\n' || *p =='\r' ) while ( *p && IsWhiteSpace( *p ) || *p == '\n' || *p =='\r' )
++p; ++p;
} }