From c5a641a335f198435cd84f0e5e45dbab94089a81 Mon Sep 17 00:00:00 2001 From: lordjaxom Date: Fri, 28 Jan 2005 21:26:34 +0000 Subject: - fixup of template handling, which is obviously too broken to work everywhere --- bitmap.h | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) (limited to 'bitmap.h') diff --git a/bitmap.h b/bitmap.h index 446a94a..be29363 100644 --- a/bitmap.h +++ b/bitmap.h @@ -1,5 +1,5 @@ /* - * $Id: bitmap.h,v 1.6 2005/01/27 17:31:35 lordjaxom Exp $ + * $Id: bitmap.h,v 1.7 2005/01/28 21:26:34 lordjaxom Exp $ */ #ifndef VDR_TEXT2SKIN_BITMAP_H @@ -50,15 +50,18 @@ inline bool tBitmapSpec::operator==(const tBitmapSpec &Src) const class cText2SkinBitmap; -template<> -void cxCache::Delete(const tBitmapSpec &Key, - cText2SkinBitmap *&Data); -template<> -void cxCache::Reset(cText2SkinBitmap *&Data); +class cBitmapCache: public cxCache { +protected: + virtual void DeleteObject(const tBitmapSpec &Key, cText2SkinBitmap *&Data); + virtual void ResetObject(cText2SkinBitmap *&Data); + +public: + cBitmapCache(uint MaxItems): cxCache(MaxItems) {} +}; class cText2SkinBitmap { private: - static cxCache mCache; + static cBitmapCache mCache; std::vector mBitmaps; int mCurrent; @@ -96,16 +99,4 @@ inline void cText2SkinBitmap::SetColor(int Index, tColor Color) { mBitmaps[mCurrent]->SetColor(Index, Color); } -template<> -void cxCache::Delete(const tBitmapSpec &Key, cText2SkinBitmap *&Data) -{ - delete Data; -} - -template<> -void cxCache::Reset(cText2SkinBitmap *&Data) -{ - Data->Reset(); -} - #endif // VDR_TEXT2SKIN_BITMAP_H -- cgit v1.2.3