# HG changeset patch # User Chris Cannam # Date 1476802550 -3600 # Node ID 0edfed2c8482ee9c1390f579f5fa61c0c0f6d6c3 # Parent 0d04b1cdb9f9c98403af5bdd87352379de52a7d9 MSVC build fixes diff -r 0d04b1cdb9f9 -r 0edfed2c8482 layer/Colour3DPlotLayer.cpp --- a/layer/Colour3DPlotLayer.cpp Tue Sep 20 09:16:55 2016 +0100 +++ b/layer/Colour3DPlotLayer.cpp Tue Oct 18 15:55:50 2016 +0100 @@ -37,10 +37,6 @@ #include -#ifndef __GNUC__ -#include -#endif - using std::vector; //#define DEBUG_COLOUR_3D_PLOT_LAYER_PAINT 1 @@ -609,7 +605,7 @@ } bool -Colour3DPlotLayer::isLayerScrollable(const LayerGeometryProvider */* v */) const +Colour3DPlotLayer::isLayerScrollable(const LayerGeometryProvider * /* v */) const { if (m_normalizeVisibleArea) { return false; diff -r 0d04b1cdb9f9 -r 0edfed2c8482 layer/SpectrogramLayer.cpp --- a/layer/SpectrogramLayer.cpp Tue Sep 20 09:16:55 2016 +0100 +++ b/layer/SpectrogramLayer.cpp Tue Oct 18 15:55:50 2016 +0100 @@ -48,10 +48,6 @@ #include #include -#ifndef __GNUC__ -#include -#endif - //#define DEBUG_SPECTROGRAM 1 //#define DEBUG_SPECTROGRAM_REPAINT 1 diff -r 0d04b1cdb9f9 -r 0edfed2c8482 svgui.pro --- a/svgui.pro Tue Sep 20 09:16:55 2016 +0100 +++ b/svgui.pro Tue Oct 18 15:55:50 2016 +0100 @@ -17,8 +17,10 @@ LIBS += -L../sv-dependency-builds/win32-mingw/lib } win32-msvc* { - INCLUDEPATH += ../sv-dependency-builds/win32-msvc/include - LIBS += -L../sv-dependency-builds/win32-msvc/lib + # We actually expect MSVC to be used only for 64-bit builds, + # though the qmake spec is still called win32-msvc* + INCLUDEPATH += ../sv-dependency-builds/win64-msvc/include + LIBS += -L../sv-dependency-builds/win64-msvc/lib } macx* { INCLUDEPATH += ../sv-dependency-builds/osx/include @@ -26,6 +28,11 @@ } DEFINES += HAVE_BZ2 HAVE_FFTW3 HAVE_FFTW3F HAVE_SNDFILE HAVE_SAMPLERATE HAVE_RUBBERBAND HAVE_LIBLO HAVE_MAD HAVE_ID3TAG + + win32-msvc* { + DEFINES += NOMINMAX _USE_MATH_DEFINES + DEFINES -= HAVE_LIBLO + } } CONFIG += staticlib qt thread warn_on stl rtti exceptions c++11 diff -r 0d04b1cdb9f9 -r 0edfed2c8482 view/View.cpp --- a/view/View.cpp Tue Sep 20 09:16:55 2016 +0100 +++ b/view/View.cpp Tue Oct 18 15:55:50 2016 +0100 @@ -46,7 +46,7 @@ #include #include -#include +//#include //#define DEBUG_VIEW 1 //#define DEBUG_VIEW_WIDGET_PAINT 1 diff -r 0d04b1cdb9f9 -r 0edfed2c8482 widgets/WindowShapePreview.cpp --- a/widgets/WindowShapePreview.cpp Tue Sep 20 09:16:55 2016 +0100 +++ b/widgets/WindowShapePreview.cpp Tue Oct 18 15:55:50 2016 +0100 @@ -26,9 +26,6 @@ #include -#ifndef __GNUC__ -#include -#endif WindowShapePreview::WindowShapePreview(QWidget *parent) : QFrame(parent), @@ -71,12 +68,7 @@ path = QPainterPath(); -#ifdef __GNUC__ - float acc[w]; -#else - float *acc = (float *)alloca(w * sizeof(float)); -#endif - + float *acc = new float(w); for (int i = 0; i < w; ++i) acc[i] = 0.f; for (int j = 0; j < 3; ++j) { for (int i = 0; i < step * 2; ++i) { @@ -88,6 +80,7 @@ if (i == 0) path.moveTo(i, y); else path.lineTo(i, y); } + delete[] acc; timePainter.drawPath(path); timePainter.setRenderHint(QPainter::Antialiasing, false);