paul wisehart wrote: > On Fri, May 18, 2007 at 04:23:36AM +0000, Josh Lawrence wrote: >> ... >> c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -I/usr/X11R6/include >> -DQT_THREAD_SUPPORT -D_REENTRANT -O2 -fno-exceptions -fno-check-new >> -c mathexpr.cpp >> mathexpr.cpp: In function `void SimplifyStr(char*&)': >> mathexpr.cpp:435: error: ISO C++ forbids initialization in array new >> ... > > On line 435 of mathexpr.cpp there is: > s=new char[1](0); > > thats not valid c++, but it seems to compile in 3.3 but not 3.4. attached patch makes rtmix compile w/ gcc4.1 and QT3.3.7 % cd .../rtmix-source/ % patch -p1 < /tmp/rtmix-0.75rg.diff #robin
--- rtmix-0.75/rtmix/colortableitem.h 2003-10-03 09:01:52.000000000 +0200 +++ rtmix-0.75-rg/rtmix/colortableitem.h 2007-03-31 16:29:10.000000000 +0200 @@ -30,7 +30,7 @@ ~ColorTableItem(); private: - void ColorTableItem::paint( QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected ); + void paint( QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected ); QColor color; }; --- rtmix-0.75/rtmix/qtabledisplay.h 2003-10-03 09:01:52.000000000 +0200 +++ rtmix-0.75-rg/rtmix/qtabledisplay.h 2007-03-31 16:30:03.000000000 +0200 @@ -39,7 +39,7 @@ protected: QWidget* beginEdit ( int row, int col, bool replace ); - void QTableDisplay::columnClicked ( int col ); + void columnClicked ( int col ); public slots: void Unselect(); --- rtmix-0.75/rtmix/mathexpr.cpp 2003-10-03 09:01:52.000000000 +0200 +++ rtmix-0.75-rg/rtmix/mathexpr.cpp 2007-04-01 01:29:55.000000000 +0200 @@ -432,9 +432,9 @@ char*s1=s,*s2=s+strlen(s);signed char ind=0; if(s1[0]=='('&&SearchCorOpenbracket(s1,0)==s2-s1-1){ s1++;s2--;ind=1;} -if(s1==s2){delete[]s;s=new char[1](0);return;} +if(s1==s2){delete[]s;s=new char[1];return;} if(s1[0]==' '){ind=1;while(s1[0]==' '&&s1<s2)s1++;} -if(s1==s2){delete[]s;s=new char[1](0);return;} +if(s1==s2){delete[]s;s=new char[1];return;} if(*(s2-1)==' '){ind=1;while(s2>s1&&*(s2-1)==' ')s2--;} *s2=0; s1=CopyStr(s1);delete[]s;s=s1;
_______________________________________________ Linux-audio-user mailing list Linux-audio-user@xxxxxxxxxxxxxxxxxxxx http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-user