From 4ae796d98f7c915829875b48e59c7c6e96f3ee3f Mon Sep 17 00:00:00 2001 From: Razi Alavizadeh Date: Wed, 5 Dec 2018 01:52:27 +0330 Subject: [PATCH] Fix expression did not evaluate to a constant --- lib/jkqtplotter/jkqtpimagetools.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/jkqtplotter/jkqtpimagetools.cpp b/lib/jkqtplotter/jkqtpimagetools.cpp index 484ed81f59..a16b40bd33 100644 --- a/lib/jkqtplotter/jkqtpimagetools.cpp +++ b/lib/jkqtplotter/jkqtpimagetools.cpp @@ -1962,8 +1962,9 @@ void JKQTPColorPaletteTools::cbDrawOutside(JKQTPEnhancedPainter& painter, QRect if (colorBarRightVisible) { painter.save(); - uint8_t h=1; - uint8_t d[200*h];//, dd[200*h]; + static const uint8_t h=1; + static const uint8_t dSize = 200*h; + uint8_t d[dSize];//, dd[200*h]; for (int i=0; i<200; i++) { for (int j=0; j(d, 200, 1, b, palette, 0, 199);*/ - uint8_t h=1; - - uint8_t d[200*h];//, dd[200*h]; + static const uint8_t h=1; + static const uint8_t dSize = 200*h; + uint8_t d[dSize];//, dd[200*h]; for (int i=0; i<200; i++) { for (int j=0; j