[PATCH 4/5] mainwindow.cpp: fix a warning about parentheses

Lubomir I. Ivanov neolit123 at gmail.com
Mon Jun 9 14:05:59 PDT 2014


From: "Lubomir I. Ivanov" <neolit123 at gmail.com>

"warning: suggest parentheses around assignment used
as truth value [-Wparentheses]"

I think 4.8.2 is confused about this one, but we suppress
it regardless by separating into two assignments.

Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
---
 qt-ui/mainwindow.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 8f9478a..d758515 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -1246,7 +1246,8 @@ void MainWindow::on_profNdl_tts_clicked(bool triggered)
 }
 void MainWindow::turnOffNdlTts()
 {
-	const bool triggered = prefs.calcndltts = false;
+	const bool triggered = false;
+	prefs.calcndltts = triggered;
 	TOOLBOX_PREF_PROFILE(calcndltts);
 }
 
-- 
1.7.11.msysgit.0



More information about the subsurface mailing list