Skip to content
Browse files

reverting r681

  • Loading branch information...
1 parent 4920899 commit ab29b03833ed6434b17b26043b4aed4525297e1d @artemp artemp committed Apr 6, 2008
Showing with 15 additions and 18 deletions.
  1. +5 −5 include/mapnik/color.hpp
  2. +9 −12 src/wkb.cpp
  3. +1 −1 tinyxml/tinyxmlparser.cpp
View
10 include/mapnik/color.hpp
@@ -40,10 +40,10 @@ namespace mapnik {
:abgr_(0xffffffff) {}
Color(int red,int green,int blue,int alpha=0xff)
- : abgr_(((alpha&0xff) << 24 |
- (blue&0xff)) << 16 |
- ((green&0xff) << 8 |
- (red&0xff))) {}
+ : abgr_((alpha&0xff) << 24 |
+ (blue&0xff) << 16 |
+ (green&0xff) << 8 |
+ red&0xff) {}
explicit Color(int rgba)
: abgr_(rgba) {}
@@ -88,7 +88,7 @@ namespace mapnik {
}
inline void set_alpha(unsigned int a)
{
- abgr_ = (abgr_ & 0x00ffffff) | ((a&0xff) << 24);
+ abgr_ = (abgr_ & 0x00ffffff | (a&0xff) << 24);
}
inline unsigned int rgba() const
View
21 src/wkb.cpp
@@ -145,10 +145,7 @@ namespace mapnik
else
{
const char* b=wkb_+pos_;
- n = (((b[3]&0xff) |
- (b[2]&0xff)) << 8 |
- ((b[1]&0xff) << 16 |
- (b[0]&0xff)) << 24);
+ n = b[3]&0xff | (b[2]&0xff)<<8 | (b[1]&0xff)<<16 | (b[0]&0xff)<<24;
}
pos_+=4;
@@ -169,14 +166,14 @@ namespace mapnik
// but not in C++ yet
// this is not quite portable
const char* b= wkb_+pos_;
- long long n = (((long long)b[7]&0xff) |
- ((long long)b[6]&0xff)<<8 |
- ((long long)b[5]&0xff)<<16 |
- ((long long)b[4]&0xff)<<24 |
- ((long long)b[3]&0xff)<<32 |
- ((long long)b[2]&0xff)<<40 |
- ((long long)b[1]&0xff)<<48 |
- ((long long)b[0]&0xff)<<56);
+ long long n = (long long)b[7]&0xff |
+ ((long long)b[6]&0xff)<<8 |
+ ((long long)b[5]&0xff)<<16 |
+ ((long long)b[4]&0xff)<<24 |
+ ((long long)b[3]&0xff)<<32 |
+ ((long long)b[2]&0xff)<<40 |
+ ((long long)b[1]&0xff)<<48 |
+ ((long long)b[0]&0xff)<<56;
memcpy(&d,&n,8);
}
pos_+=8;
View
2 tinyxml/tinyxmlparser.cpp
@@ -354,7 +354,7 @@ const char* TiXmlBase::SkipWhiteSpace( const char* p, TiXmlEncoding encoding )
}
else
{
- while ((*p && IsWhiteSpace( *p )) || *p == '\n' || *p =='\r' )
+ while ( *p && IsWhiteSpace( *p ) || *p == '\n' || *p =='\r' )
++p;
}

0 comments on commit ab29b03

Please sign in to comment.
Something went wrong with that request. Please try again.