Mercurial > hg > svgui
diff widgets/WindowShapePreview.cpp @ 545:be5c35d3f409
* solaris build fixes
author | Chris Cannam |
---|---|
date | Thu, 10 Sep 2009 18:44:45 +0000 |
parents | cec1f78fbfca |
children | 1a0dfcbffaf1 |
line wrap: on
line diff
--- a/widgets/WindowShapePreview.cpp Tue Aug 18 11:01:57 2009 +0000 +++ b/widgets/WindowShapePreview.cpp Thu Sep 10 18:44:45 2009 +0000 @@ -26,6 +26,10 @@ #include <iostream> +#ifndef __GNUC__ +#include <alloca.h> +#endif + WindowShapePreview::WindowShapePreview(QWidget *parent) : QFrame(parent), m_windowType(WindowType(999)) @@ -67,7 +71,12 @@ path = QPainterPath(); +#ifdef __GNUC__ float acc[w]; +#else + float *acc = (float *)alloca(w * sizeof(float)); +#endif + 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) {