diff liboctave/system/dir-ops.h @ 30080:dbbf3d44535d

maint: use "m_" prefix for member variables in class dir_entry. * dir-ops.cc, dir-ops.h: use "m_" prefix for member variables in class dir_entry.
author Rik <rik@octave.org>
date Mon, 30 Aug 2021 12:03:27 -0700
parents 7854d5752dd2
children 796f54d4ddbf
line wrap: on
line diff
--- a/liboctave/system/dir-ops.h	Mon Aug 30 11:53:55 2021 -0700
+++ b/liboctave/system/dir-ops.h	Mon Aug 30 12:03:27 2021 -0700
@@ -49,23 +49,25 @@
     public:
 
       dir_entry (const std::string& n = "")
-        : name (n), dir (nullptr), fail (false), errmsg ()
+        : m_name (n), m_dir (nullptr), m_fail (false), m_errmsg ()
       {
-        if (! name.empty ())
+        if (! m_name.empty ())
           open ();
       }
 
       dir_entry (const dir_entry& d)
-        : name (d.name), dir (d.dir), fail (d.fail), errmsg (d.errmsg) { }
+        : m_name (d.m_name), m_dir (d.m_dir), m_fail (d.m_fail),
+          m_errmsg (d.m_errmsg)
+      { }
 
       dir_entry& operator = (const dir_entry& d)
       {
         if (this != &d)
           {
-            name = d.name;
-            dir = d.dir;
-            fail = d.fail;
-            errmsg = d.errmsg;
+            m_name = d.m_name;
+            m_dir = d.m_dir;
+            m_fail = d.m_fail;
+            m_errmsg = d.m_errmsg;
           }
 
         return *this;
@@ -79,29 +81,29 @@
 
       bool close (void);
 
-      bool ok (void) const { return dir && ! fail; }
+      bool ok (void) const { return m_dir && ! m_fail; }
 
       operator bool () const { return ok (); }
 
-      std::string error (void) const { return ok () ? "" : errmsg; }
+      std::string error (void) const { return ok () ? "" : m_errmsg; }
 
       static unsigned int max_name_length (void);
 
     private:
 
       // Name of the directory.
-      std::string name;
+      std::string m_name;
 
       // A pointer to the contents of the directory.  We use void here to
       // avoid possible conflicts with the way some systems declare the
       // type DIR.
-      void *dir;
+      void *m_dir;
 
       // TRUE means the open for this directory failed.
-      bool fail;
+      bool m_fail;
 
       // If a failure occurs, this contains the system error text.
-      std::string errmsg;
+      std::string m_errmsg;
     };
   }
 }