diff --git a/src/TrackArtist.cpp b/src/TrackArtist.cpp index 4bc3b4034..d8ffbdce8 100644 --- a/src/TrackArtist.cpp +++ b/src/TrackArtist.cpp @@ -1633,11 +1633,17 @@ struct ClipParameters }; } +#ifdef __GNUC__ +#define CONST +#else +#define CONST const +#endif + namespace { struct WavePortion { wxRect rect; - const double averageZoom; - const bool inFisheye; + CONST double averageZoom; + CONST bool inFisheye; WavePortion(int x, int y, int w, int h, double zoom, bool i) : rect(x, y, w, h), averageZoom(zoom), inFisheye(i) {} diff --git a/src/ViewInfo.h b/src/ViewInfo.h index 03040a64f..8775b9a28 100644 --- a/src/ViewInfo.h +++ b/src/ViewInfo.h @@ -17,6 +17,11 @@ class Track; +#ifdef __GNUC__ +#define CONST +#else +#define CONST const +#endif // The subset of ViewInfo information (other than selection) // that is sufficient for purposes of TrackArtist, @@ -85,7 +90,7 @@ public: void ZoomBy(double multiplier); struct Interval { - const wxInt64 position; const double averageZoom; const bool inFisheye; + CONST wxInt64 position; CONST double averageZoom; CONST bool inFisheye; Interval(wxInt64 p, double z, bool i) : position(p), averageZoom(z), inFisheye(i) {} };