diff options
-rw-r--r-- | include/mcolor.h | 1 | ||||
-rw-r--r-- | lib/mcolor.cc | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/mcolor.h b/include/mcolor.h index 1202572..6be0a5a 100644 --- a/include/mcolor.h +++ b/include/mcolor.h @@ -10,6 +10,7 @@ namespace mogltk { ColorP(const Color & = WHITE); ColorP(Uint8, Uint8, Uint8, Uint8); bool operator==(const ColorP &); + Color * operator->(); void Bind(); void Norm(); Uint32 toSDL(SDL_PixelFormat * = 0); diff --git a/lib/mcolor.cc b/lib/mcolor.cc index 1c13717..7932fb8 100644 --- a/lib/mcolor.cc +++ b/lib/mcolor.cc @@ -39,3 +39,7 @@ void mogltk::ColorP::Norm() { bool mogltk::ColorP::operator==(const ColorP & nc) { return c == nc.c; } + +Color * mogltk::ColorP::operator->() { + return &c; +} |