From ca30328e8f75038a659721027aa11f764670e32e Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Sun, 26 Jul 2015 19:08:33 -0400 Subject: [PATCH 1/3] Revert "Fix Travis Build (const in structure)" This reverts commit 13c17d3d5da5fdaf5d0f0ea99886b06194f4fc41. --- src/TrackArtist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TrackArtist.cpp b/src/TrackArtist.cpp index 460a942ce..4bc3b4034 100644 --- a/src/TrackArtist.cpp +++ b/src/TrackArtist.cpp @@ -1636,8 +1636,8 @@ struct ClipParameters 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) {} From 06d01ee42456daf4af87445557737925e7db3d49 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Sun, 26 Jul 2015 19:08:55 -0400 Subject: [PATCH 2/3] Revert "More deconsting to satisfy Travis" This reverts commit 90d03f835179c407d32d046c060ec96606abdab1. --- src/ViewInfo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ViewInfo.h b/src/ViewInfo.h index bba107215..03040a64f 100644 --- a/src/ViewInfo.h +++ b/src/ViewInfo.h @@ -85,7 +85,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) {} }; From f37c37e67c0b32f711619ffe3f3686afe0ea86be Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Sun, 26 Jul 2015 19:23:55 -0400 Subject: [PATCH 3/3] Fix travis errors by other means --- src/TrackArtist.cpp | 10 ++++++++-- src/ViewInfo.h | 7 ++++++- 2 files changed, 14 insertions(+), 3 deletions(-) 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) {} };