summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-09 22:42:29 (UTC)
committer simon <simon>2002-12-09 22:42:29 (UTC)
commit8641065755bbb1e2ff96e7fb964d4b0cd91c65b6 (patch) (unidiff)
treeecd14e4692538748ee59cba633c71024ebb7808d
parent421f5d6b87f509430836fb2c60b57f9266371121 (diff)
downloadopie-8641065755bbb1e2ff96e7fb964d4b0cd91c65b6.zip
opie-8641065755bbb1e2ff96e7fb964d4b0cd91c65b6.tar.gz
opie-8641065755bbb1e2ff96e7fb964d4b0cd91c65b6.tar.bz2
- ok, next try for that allocator. stupid gcc2 :(
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.h13
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
@@ -32,6 +32,17 @@
32#include <vector> 32#include <vector>
33#include <memory> 33#include <memory>
34 34
35namespace
36{
37 struct simpleAndStupidAllocator
38 {
39 static void *allocate( size_t amount )
40 { return ::operator new( amount ); }
41 static void deallocate( void *p, size_t )
42 { ::operator delete( p ); }
43 };
44}
45
35class MediaWidget : public QWidget 46class MediaWidget : public QWidget
36{ 47{
37 Q_OBJECT 48 Q_OBJECT
@@ -55,7 +66,7 @@ public:
55#if defined( _CC_GNU_ ) 66#if defined( _CC_GNU_ )
56 // use that allocator to avoid the default allocator that on gcc2 requires libstdc++ because 67 // use that allocator to avoid the default allocator that on gcc2 requires libstdc++ because
57 // in the BAD_ALLOC macro it uses std::cerr and friends :-( 68 // in the BAD_ALLOC macro it uses std::cerr and friends :-(
58 typedef std::vector<Button, std::__allocator<Button, std::__new_alloc> > ButtonVector; 69 typedef std::vector<Button, std::__allocator<Button, simpleAndStupidAllocator> > ButtonVector;
59#else 70#else
60 typedef std::vector<Button> ButtonVector; 71 typedef std::vector<Button> ButtonVector;
61#endif 72#endif