diff libinterp/parse-tree/pt.h @ 24846:7620f1f5290d

use m_ prefix for member variables in parse tree classes * pt-arg-list.cc, pt-arg-list.h, pt-assign.cc, pt-assign.h, pt-binop.cc, pt-binop.h, pt-bp.cc, pt-bp.h, pt-cbinop.cc, pt-cbinop.h, pt-check.cc, pt-check.h, pt-classdef.cc, pt-classdef.h, pt-cmd.h, pt-colon.cc, pt-colon.h, pt-const.cc, pt-const.h, pt-decl.cc, pt-decl.h, pt-except.cc, pt-except.h, pt-fcn-handle.cc, pt-fcn-handle.h, pt-funcall.cc, pt-funcall.h, pt-id.cc, pt-id.h, pt-idx.cc, pt-idx.h, pt-jit.cc, pt-jit.h, pt-loop.cc, pt-loop.h, pt-misc.h, pt-pr-code.cc, pt-pr-code.h, pt-select.cc, pt-select.h, pt-stmt.cc, pt-stmt.h, pt-tm-const.cc, pt-tm-const.h, pt.cc, pt.h: Use m_ prefix for member variables in parse tree classes. Style fixes.
author John W. Eaton <jwe@octave.org>
date Wed, 07 Mar 2018 14:56:03 -0500
parents 194eb4bd202b
children 6652d3823428
line wrap: on
line diff
--- a/libinterp/parse-tree/pt.h	Tue Mar 06 13:28:41 2018 -0500
+++ b/libinterp/parse-tree/pt.h	Wed Mar 07 14:56:03 2018 -0500
@@ -42,7 +42,8 @@
   public:
 
     tree (int l = -1, int c = -1)
-      : line_num (l), column_num (c), bp (nullptr) { }
+      : m_line_num (l), m_column_num (c), m_bp_cond (nullptr)
+    { }
 
     // No copying!
 
@@ -52,39 +53,51 @@
 
     virtual ~tree (void) = default;
 
-    virtual int line (void) const { return line_num; }
+    virtual int line (void) const { return m_line_num; }
 
-    virtual int column (void) const { return column_num; }
+    virtual int column (void) const { return m_column_num; }
 
-    void line (int l) { line_num = l; }
+    void line (int l) { m_line_num = l; }
 
-    void column (int c) { column_num = c; }
+    void column (int c) { m_column_num = c; }
 
     void set_location (int l, int c)
     {
-      line_num = l;
-      column_num = c;
+      m_line_num = l;
+      m_column_num = c;
     }
 
     virtual void set_breakpoint (const std::string& condition)
     {
-      if (bp)
-        *bp = condition;
+      if (m_bp_cond)
+        *m_bp_cond = condition;
       else
-        bp = new std::string(condition);
+        m_bp_cond = new std::string (condition);
     }
 
-    virtual void delete_breakpoint (void) { if (bp) delete bp; bp = nullptr; }
+    virtual void delete_breakpoint (void)
+    {
+      if (m_bp_cond)
+        {
+          delete m_bp_cond;
+
+          m_bp_cond = nullptr;
+        }
+    }
 
     bool meets_bp_condition (void) const;
 
     bool is_breakpoint (bool check_active = false) const
-    { return bp && (! check_active || meets_bp_condition ()); }
+    {
+      return m_bp_cond && (! check_active || meets_bp_condition ());
+    }
 
     // breakpoint condition, or "0" (i.e., "false") if no breakpoint.
     // To distinguish "0" from a disabled breakpoint, test "is_breakpoint" too.
     const std::string bp_cond (void) const
-    { return bp ? *bp : "0"; }
+    {
+      return m_bp_cond ? *m_bp_cond : "0";
+    }
 
     std::string str_print_code (void);
 
@@ -94,11 +107,11 @@
 
     // The input line and column where we found the text that was
     // eventually converted to this tree node.
-    int line_num;
-    int column_num;
+    int m_line_num;
+    int m_column_num;
 
-    // Breakpoint flag: NULL if no breakpoint, or the condition if there is one
-    std::string *bp;
+    // NULL if no breakpoint, or a breakpoint condition if there is one.
+    std::string *m_bp_cond;
   };
 }