changeset 31389:c3ed2ad87aca

eliminate unused member variable * pt-binop.h, pt-binop.cc (tree_expression::m_braindead_shortcirciut_warning_issued): Delete member variable and all uses. It was set but otherwise never used.
author John W. Eaton <jwe@octave.org>
date Thu, 03 Nov 2022 12:49:40 -0400
parents 18a6c1408626
children 50f57a2be778
files libinterp/parse-tree/pt-binop.cc libinterp/parse-tree/pt-binop.h
diffstat 2 files changed, 4 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-binop.cc	Wed Nov 02 18:26:14 2022 +0100
+++ b/libinterp/parse-tree/pt-binop.cc	Thu Nov 03 12:49:40 2022 -0400
@@ -45,8 +45,6 @@
     warning_with_id ("Octave:possible-matlab-short-circuit-operator",
                      "Matlab-style short-circuit operation performed for operator %s",
                      op);
-
-    m_braindead_shortcircuit_warning_issued = true;
   }
 
   std::string
--- a/libinterp/parse-tree/pt-binop.h	Wed Nov 02 18:26:14 2022 +0100
+++ b/libinterp/parse-tree/pt-binop.h	Thu Nov 03 12:49:40 2022 -0400
@@ -51,16 +51,16 @@
                             octave_value::binary_op t
                             = octave_value::unknown_binary_op)
       : tree_expression (l, c), m_lhs (nullptr), m_rhs (nullptr), m_etype (t),
-        m_eligible_for_braindead_shortcircuit (false),
-        m_braindead_shortcircuit_warning_issued (false) { }
+        m_eligible_for_braindead_shortcircuit (false)
+    { }
 
     tree_binary_expression (tree_expression *a, tree_expression *b,
                             int l = -1, int c = -1,
                             octave_value::binary_op t
                             = octave_value::unknown_binary_op)
       : tree_expression (l, c), m_lhs (a), m_rhs (b), m_etype (t),
-        m_eligible_for_braindead_shortcircuit (false),
-        m_braindead_shortcircuit_warning_issued (false) { }
+        m_eligible_for_braindead_shortcircuit (false)
+    { }
 
     // No copying!
 
@@ -134,10 +134,6 @@
     // TRUE if this is an | or & expression in the condition of an IF
     // or WHILE statement.
     bool m_eligible_for_braindead_shortcircuit;
-
-    // TRUE if we have already issued a warning about short circuiting
-    // for this operator.
-    bool m_braindead_shortcircuit_warning_issued;
   };
 
   // Boolean expressions.