diff options
Diffstat (limited to 'include/d/d_drawlist.h')
| -rw-r--r-- | include/d/d_drawlist.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/d/d_drawlist.h b/include/d/d_drawlist.h index 6ab8c6c9..58ed7da0 100644 --- a/include/d/d_drawlist.h +++ b/include/d/d_drawlist.h @@ -151,8 +151,14 @@ public: virtual void draw(); void setAlpha(u8 i_alpha) { mBlack.a = i_alpha; } - void setBlackColor(GXColor& c) { mBlack = c; } - void setWhiteColor(GXColor& c) { mWhite = c; } + void setBlackColor(GXColor& i_color) { mBlack = i_color; } + void setWhiteColor(GXColor& i_color) { mWhite = i_color; } + // some calls to these functions define i_color inline which is illegal in C++ for a non-const + // reference parameter - we add these overloads to enable standard compiler compatibility +#if !__MWERKS__ + void setBlackColor(const GXColor& i_color) { mBlack = const_cast<GXColor&>(i_color); } + void setWhiteColor(const GXColor& i_color) { mWhite = const_cast<GXColor&>(i_color); } +#endif public: struct TexEntry { |
