-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.h | 13 |
1 files changed, 12 insertions, 1 deletions
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 @@ -33,4 +33,15 @@ #include <memory> +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 { @@ -56,5 +67,5 @@ public: // 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<Button, std::__allocator<Button, std::__new_alloc> > ButtonVector; + typedef std::vector<Button, std::__allocator<Button, simpleAndStupidAllocator> > ButtonVector; #else typedef std::vector<Button> ButtonVector; |