From 89cb4070bf10f7143df9a40aed89693b029f7e2e Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 23 Feb 2006 02:31:25 +0000 Subject: Made number of colours in a palette dynamic so that large numbers of colours will work. --- include/Platform.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/Platform.h b/include/Platform.h index 9ff15013c..395ebf83d 100644 --- a/include/Platform.h +++ b/include/Platform.h @@ -236,12 +236,15 @@ class Window; // Forward declaration for Palette */ class Palette { int used; - enum {numEntries = 100}; - ColourPair entries[numEntries]; + int size; + ColourPair *entries; #if PLAT_GTK void *allocatedPalette; // GdkColor * int allocatedLen; #endif + // Private so Palette objects can not be copied + Palette(const Palette &) {} + Palette &operator=(const Palette &) { return *this; } public: #if PLAT_WIN void *hpal; -- cgit v1.2.3