summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-04-02 12:40:47 -0700
committerThiago Macieira <thiago.macieira@intel.com>2017-04-04 06:50:51 +0000
commitcc4e79d6200b0495a5c4d1a7faa773906b1ac99e (patch)
treef914301707fce103f4105349a00132aa9da3f121
parent85b87f1515bbac3976e47a1a2fb7e1bbfa40b208 (diff)
Fix GCC warning about comparing the result of comparisonsv5.9.0-beta3v5.9.0-beta2
stackedbarchartitem.cpp:66:23: warning: suggest parentheses around comparison in operand of ‘==’ [-Wparentheses] Change-Id: I27b55fdf514247549455fffd14b1abfb3e033b85 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r--src/charts/barchart/horizontal/stacked/horizontalstackedbarchartitem.cpp2
-rw-r--r--src/charts/barchart/vertical/stacked/stackedbarchartitem.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/charts/barchart/horizontal/stacked/horizontalstackedbarchartitem.cpp b/src/charts/barchart/horizontal/stacked/horizontalstackedbarchartitem.cpp
index 7b1a57e9..1d38c9ab 100644
--- a/src/charts/barchart/horizontal/stacked/horizontalstackedbarchartitem.cpp
+++ b/src/charts/barchart/horizontal/stacked/horizontalstackedbarchartitem.cpp
@@ -57,7 +57,7 @@ void HorizontalStackedBarChartItem::initializeLayout(int set, int category,
checkIndex--;
QBarSet *checkSet = m_series->barSets().at(checkIndex);
const qreal checkValue = checkSet->at(category);
- if (value < 0.0 == checkValue < 0.0) {
+ if ((value < 0.0) == (checkValue < 0.0)) {
Bar *checkBar = m_indexForBarMap.value(checkSet).value(category);
rect = m_layout.at(checkBar->layoutIndex());
found = true;
diff --git a/src/charts/barchart/vertical/stacked/stackedbarchartitem.cpp b/src/charts/barchart/vertical/stacked/stackedbarchartitem.cpp
index bf809d56..42c02568 100644
--- a/src/charts/barchart/vertical/stacked/stackedbarchartitem.cpp
+++ b/src/charts/barchart/vertical/stacked/stackedbarchartitem.cpp
@@ -63,7 +63,7 @@ void StackedBarChartItem::initializeLayout(int set, int category,
checkIndex--;
QBarSet *checkSet = m_series->barSets().at(checkIndex);
const qreal checkValue = checkSet->at(category);
- if (value < 0.0 == checkValue < 0.0) {
+ if ((value < 0.0) == (checkValue < 0.0)) {
Bar *checkBar = m_indexForBarMap.value(checkSet).value(category);
rect = m_layout.at(checkBar->layoutIndex());
found = true;