From 8bf56a288f1c9e828c9a4c2bd48057de2231f5e0 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 17 Feb 2003 16:36:35 +0000 Subject: allocate colors right away instead of delaying it, since they get allocated out of the rendercontrol, and it will never fail. --- otk/rendercolor.hh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'otk/rendercolor.hh') diff --git a/otk/rendercolor.hh b/otk/rendercolor.hh index 1f24b3c9..5076167f 100644 --- a/otk/rendercolor.hh +++ b/otk/rendercolor.hh @@ -37,13 +37,10 @@ private: unsigned char _green; unsigned char _blue; - mutable unsigned long _pixel; - mutable GC _gc; + unsigned long _pixel; + GC _gc; - mutable bool _allocated; - mutable bool _created; - - void create() const; + void create(); public: static void initialize(); @@ -58,8 +55,8 @@ public: inline unsigned char red() const { return _red; } inline unsigned char green() const { return _green; } inline unsigned char blue() const { return _blue; } - unsigned long pixel() const; - GC gc() const; + unsigned long pixel() const { return _pixel; } + GC gc() const { return _gc; } }; } -- cgit v1.2.3