changeset 30047:02e28f7e4d04

maint: use "m_" prefix for member variables DAERTFunc/ODEFunc classes in liboctave/numeric. * DAERTFunc.h, LSODE.cc, ODEFunc.h: use "m_" prefix for member variables.
author Rik <rik@octave.org>
date Wed, 25 Aug 2021 15:49:43 -0700
parents b3717fd85e49
children 35a58caf1ab9
files liboctave/numeric/DAERTFunc.h liboctave/numeric/LSODE.cc liboctave/numeric/ODEFunc.h
diffstat 3 files changed, 32 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/numeric/DAERTFunc.h	Wed Aug 25 15:38:23 2021 -0700
+++ b/liboctave/numeric/DAERTFunc.h	Wed Aug 25 15:49:43 2021 -0700
@@ -38,55 +38,55 @@
   typedef ColumnVector (*DAERTConstrFunc) (const ColumnVector& x, double t);
 
   DAERTFunc (void)
-    : DAEFunc (), constr (nullptr), reset (true) { }
+    : DAEFunc (), m_constr (nullptr), m_reset (true) { }
 
   DAERTFunc (DAERHSFunc f)
-    : DAEFunc (f), constr (nullptr), reset (true) { }
+    : DAEFunc (f), m_constr (nullptr), m_reset (true) { }
 
   DAERTFunc (DAERHSFunc f, DAEJacFunc j)
-    : DAEFunc (f, j), constr (nullptr), reset (true) { }
+    : DAEFunc (f, j), m_constr (nullptr), m_reset (true) { }
 
   DAERTFunc (DAERHSFunc f, DAERTConstrFunc cf)
-    : DAEFunc (f), constr (cf), reset (true) { }
+    : DAEFunc (f), m_constr (cf), m_reset (true) { }
 
   DAERTFunc (DAERHSFunc f, DAERTConstrFunc cf, DAEJacFunc j)
-    : DAEFunc (f, j), constr (cf), reset (true) { }
+    : DAEFunc (f, j), m_constr (cf), m_reset (true) { }
 
   DAERTFunc (const DAERTFunc& a)
-    : DAEFunc (a), constr (a.constr), reset (a.reset) { }
+    : DAEFunc (a), m_constr (a.m_constr), m_reset (a.m_reset) { }
 
   DAERTFunc& operator = (const DAERTFunc& a)
   {
     if (this != &a)
       {
         DAEFunc::operator = (a);
-        constr = a.constr;
-        reset = a.reset;
+        m_constr = a.m_constr;
+        m_reset = a.m_reset;
       }
     return *this;
   }
 
   virtual ~DAERTFunc (void) = default;
 
-  DAERTConstrFunc constraint_function (void) const { return constr; }
+  DAERTConstrFunc constraint_function (void) const { return m_constr; }
 
   DAERTFunc& set_constraint_function (DAERTConstrFunc cf)
   {
-    constr = cf;
-    reset = true;
+    m_constr = cf;
+    m_reset = true;
     return *this;
   }
 
 protected:
 
-  DAERTConstrFunc constr;
+  DAERTConstrFunc m_constr;
 
   // This variable is TRUE when this object is constructed, and also
   // after any internal data has changed.  Derived classes may use
   // this information (and change it) to know when to (re)initialize
   // their own internal data related to this object.
 
-  bool reset;
+  bool m_reset;
 };
 
 #endif
--- a/liboctave/numeric/LSODE.cc	Wed Aug 25 15:38:23 2021 -0700
+++ b/liboctave/numeric/LSODE.cc	Wed Aug 25 15:49:43 2021 -0700
@@ -105,7 +105,7 @@
 
   static F77_INT nn = 0;
 
-  if (! m_initialized || restart || ODEFunc::reset || LSODE_options::m_reset)
+  if (! m_initialized || restart || ODEFunc::m_reset || LSODE_options::m_reset)
     {
       integration_error = false;
 
@@ -123,7 +123,7 @@
         {
           max_maxord = 5;
 
-          if (jac)
+          if (m_jac)
             m_method_flag = 21;
           else
             m_method_flag = 22;
@@ -206,7 +206,7 @@
           return retval;
         }
 
-      ODEFunc::reset = false;
+      ODEFunc::m_reset = false;
 
       // LSODE_options
 
--- a/liboctave/numeric/ODEFunc.h	Wed Aug 25 15:38:23 2021 -0700
+++ b/liboctave/numeric/ODEFunc.h	Wed Aug 25 15:49:43 2021 -0700
@@ -40,59 +40,59 @@
   typedef Matrix (*ODEJacFunc) (const ColumnVector&, double);
 
   ODEFunc (void)
-    : fun (nullptr), jac (nullptr), reset (true) { }
+    : m_fun (nullptr), m_jac (nullptr), m_reset (true) { }
 
   ODEFunc (ODERHSFunc f)
-    : fun (f), jac (nullptr), reset (true) { }
+    : m_fun (f), m_jac (nullptr), m_reset (true) { }
 
   ODEFunc (ODERHSFunc f, ODEJacFunc j)
-    : fun (f), jac (j), reset (true) { }
+    : m_fun (f), m_jac (j), m_reset (true) { }
 
   ODEFunc (const ODEFunc& a)
-    : fun (a.fun), jac (a.jac), reset (true) { }
+    : m_fun (a.m_fun), m_jac (a.m_jac), m_reset (true) { }
 
   ODEFunc& operator = (const ODEFunc& a)
   {
     if (this != &a)
       {
-        fun = a.fun;
-        jac = a.jac;
-        reset = a.reset;
+        m_fun = a.m_fun;
+        m_jac = a.m_jac;
+        m_reset = a.m_reset;
       }
     return *this;
   }
 
   virtual ~ODEFunc (void) = default;
 
-  ODERHSFunc function (void) const { return fun; }
+  ODERHSFunc function (void) const { return m_fun; }
 
   ODEFunc& set_function (ODERHSFunc f)
   {
-    fun = f;
-    reset = true;
+    m_fun = f;
+    m_reset = true;
     return *this;
   }
 
-  ODEJacFunc jacobian_function (void) const { return jac; }
+  ODEJacFunc jacobian_function (void) const { return m_jac; }
 
   ODEFunc& set_jacobian_function (ODEJacFunc j)
   {
-    jac = j;
-    reset = true;
+    m_jac = j;
+    m_reset = true;
     return *this;
   }
 
 protected:
 
-  ODERHSFunc fun;
-  ODEJacFunc jac;
+  ODERHSFunc m_fun;
+  ODEJacFunc m_jac;
 
   // This variable is TRUE when this object is constructed, and also
   // after any internal data has changed.  Derived classes may use
   // this information (and change it) to know when to (re)initialize
   // their own internal data related to this object.
 
-  bool reset;
+  bool m_reset;
 };
 
 #endif