From 8641065755bbb1e2ff96e7fb964d4b0cd91c65b6 Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 09 Dec 2002 22:42:29 +0000 Subject: - ok, next try for that allocator. stupid gcc2 :( --- diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h index df03b22..a9dddf8 100644 --- a/noncore/multimedia/opieplayer2/mediawidget.h +++ b/noncore/multimedia/opieplayer2/mediawidget.h @@ -32,6 +32,17 @@ #include #include +namespace +{ + struct simpleAndStupidAllocator + { + static void *allocate( size_t amount ) + { return ::operator new( amount ); } + static void deallocate( void *p, size_t ) + { ::operator delete( p ); } + }; +} + class MediaWidget : public QWidget { Q_OBJECT @@ -55,7 +66,7 @@ public: #if defined( _CC_GNU_ ) // use that allocator to avoid the default allocator that on gcc2 requires libstdc++ because // in the BAD_ALLOC macro it uses std::cerr and friends :-( - typedef std::vector > ButtonVector; + typedef std::vector > ButtonVector; #else typedef std::vector