Mercurial > hg > svgui
diff widgets/WindowShapePreview.cpp @ 1150:0edfed2c8482 msvc2015_64
MSVC build fixes
author | Chris Cannam |
---|---|
date | Tue, 18 Oct 2016 15:55:50 +0100 |
parents | 6645b6b8356f |
children | c5a82068bd60 |
line wrap: on
line diff
--- 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 <iostream> -#ifndef __GNUC__ -#include <alloca.h> -#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);