Re: [Audacity-devel] Patch to last cvs of Audacity to compile with wxWidgets2.8.4
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Luca C. <luc...@se...> - 2007-05-31 13:06:26
|
Hi, On Thu, 31 May 2007 13:45:02 +0200, Markus Meyer <me...@me...> wrote: > Hi Luca, > > thanks for the patch. I have a few questions: > > * There seems to be some problems with the line endings. The patched > lines have two line endings between them in my editor on Linux. Yes, I am working on Windows, I suppose that patch created by TortoiseCV= S = has the DOS line endings. > * The patch contains some areas which don't need to be patched but are= > (look into the first 20 lines of the patch to see what i mean). Can yo= u > remove those areas from the patch? I sent the patch just to be seen and reviewed by Audacity devs. It could= = be applied blindly, but with unexpected results I guess :) : in fact I = have not tested if this breaks something on other platforms (Linux for = example), or if it break compatibility with older wxWidgets versions (li= ke = 2.6.x). I could surely remove the first lines, but I think that if I simply tell= = generally what i did, it is better: 1) Do not use wxList::Node but use wxList::compatibility_iterator instea= d, = such as: - WaveClipList::Node* node =3D waveTrack->GetClipIterator(); + WaveClipList::compatibility_iterator node =3D = waveTrack->GetClipIterator(); 2) No need to initialize an ::compatibility_iterator to -1 value, but no= t = sure how to initialize it to an explicitly invalid value (maybe = GetLast()+1?), for example: - WaveClipList::Node* nextIt =3D (WaveClipList::Node*)-1; + WaveClipList::compatibility_iterator nextIt; 3) Removed a strange parameter passed as the argument constructor of = wxArrayString as you see below: RCS file: /cvsroot/audacity/audacity-src/src/BatchCommands.cpp,v retrieving revision 1.29 diff -u -r1.29 BatchCommands.cpp --- src/BatchCommands.cpp 7 May 2007 00:59:08 -0000 1.29 +++ src/BatchCommands.cpp 31 May 2007 10:14:26 -0000 @@ -251,7 +251,7 @@ // Gets all commands that are valid for this mode. wxArrayString BatchCommands::GetAllCommands() { - wxArrayString commands(true); + wxArrayString commands; > * Are you sure the compatibility_iterator* type instead of Node* works= > in 2.6.x and without wxUSE_STL? (Notice that it is "compatibility_iterator" without the star symbol). Ye= s, = I am *almost* sure it does works with 2.5.0+, as I read in the changes.t= xt: [...] 2.5.0 All: - Added wxList::compatibility_iterator. Can be used like wxNode* (except= it can't be delete()d). It permits writing code which will work both with wxUSE_STL=3D=3D1 and wxUSE_STL=3D=3D0. [...] Greetings, Luca |