changeset 1806:c7e9e63c7bae

Avoid some compiler warnings
author Chris Cannam
date Wed, 16 Oct 2019 15:26:01 +0100
parents 3db9a9fc2612
children 710b4e44901b
files base/ById.cpp data/model/DenseThreeDimensionalModel.h
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/base/ById.cpp	Wed Oct 16 12:12:49 2019 +0100
+++ b/base/ById.cpp	Wed Oct 16 15:26:01 2019 +0100
@@ -36,6 +36,10 @@
     return i;
 }
 
+// "warning: expression with side effects will be evaluated despite
+// being used as an operand to 'typeid'"
+#pragma GCC diagnostic ignored "-Wpotentially-evaluated-expression"
+
 class AnyById::Impl
 {
 public:    
--- a/data/model/DenseThreeDimensionalModel.h	Wed Oct 16 12:12:49 2019 +0100
+++ b/data/model/DenseThreeDimensionalModel.h	Wed Oct 16 15:26:01 2019 +0100
@@ -133,9 +133,9 @@
     int getColumnCount() const override { return getHeight() + 2; }
 
     bool isEditable() const override { return false; }
-    Command *getSetDataCommand(int, int, const QVariant &, int) { return nullptr; }
-    Command *getInsertRowCommand(int) { return nullptr; }
-    Command *getRemoveRowCommand(int) { return nullptr; }
+    Command *getSetDataCommand(int, int, const QVariant &, int) override { return nullptr; }
+    Command *getInsertRowCommand(int) override { return nullptr; }
+    Command *getRemoveRowCommand(int) override { return nullptr; }
     
     QString getHeading(int column) const override
     {