From:
[email protected]
Package: gtkpool
Severity: normal
Tags: patch
When building 'gtkpool' with gcc-3.4 I get the following error:
application.cpp:70: note: try removing the parentheses around the type-id application.cpp:71: error: array bound forbidden after parenthesized type-id application.cpp:71: note: try removing the parentheses around the type-id application.cpp:72: error: array bound forbidden after parenthesized type-id application.cpp:72: note: try removing the parentheses around the type-id application.cpp:73: error: array bound forbidden after parenthesized type-id application.cpp:73: note: try removing the parentheses around the type-id application.cpp:74: error: array bound forbidden after parenthesized type-id application.cpp:74: note: try removing the parentheses around the type-id application.cpp: In member function `void Application::mouse_down(double, double)':
application.cpp:539: error: cannot convert `__gnu_cxx::__normal_iterator<Ball*, std::vector<Ball, std::allocator<Ball> > >' to `Ball*' in assignment
make[4]: *** [application.o] Error 1
make[4]: Leaving directory `/gtkpool-0.5.0/gtkpool'
With the attached patch 'gtkpool' can be compiled using gcc-3.4.
Regards
Andreas Jochens
diff -urN ../tmp-orig/gtkpool-0.5.0/gtkpool/application.cpp ./gtkpool/application.cpp
--- ../tmp-orig/gtkpool-0.5.0/gtkpool/application.cpp 2004-08-17 17:38:25.753610345 +0200
+++ ./gtkpool/application.cpp 2004-08-17 17:38:19.629541345 +0200
@@ -67,11 +67,11 @@
message_colours[14] = new GdkColor;
buf_pixmap = NULL;
- table_pixmaps = new (GdkPixmap *)[4];
- balls_pixmaps = new (GdkPixmap *)[NUM_BALLS];
- balls_pixmap_masks = new (GdkBitmap *)[NUM_BALLS];
- balls_big_pixmaps = new (GdkPixmap *)[NUM_BALLS];
- balls_big_pixmap_masks = new (GdkBitmap *)[NUM_BALLS];
+ table_pixmaps = new GdkPixmap *[4];
+ balls_pixmaps = new GdkPixmap *[NUM_BALLS];
+ balls_pixmap_masks = new GdkBitmap *[NUM_BALLS];
+ balls_big_pixmaps = new GdkPixmap *[NUM_BALLS];
+ balls_big_pixmap_masks = new GdkBitmap *[NUM_BALLS];
running = true; placing_cue = false;
sunk_tf = collide_tf = bounce_tf = false;
connected = false;
@@ -530,7 +530,7 @@
bb = find_if(balls.begin(), balls.end(), pointer_selects( x, y, hit_moving));
if(bb != balls.end())
{
-#if _CPP_CSTDLIB == 1
+