changeset 30163:4412f57132c4

maint: use "m_" prefix for member variables in classes gzifstream, gzofstream. * gzfstream.cc, gzfstream.h: Use "m_" prefix for member variables in classes gzifstream, gzofstream.
author Rik <rik@octave.org>
date Sun, 12 Sep 2021 20:57:27 -0700
parents 5acddd64527e
children aedebbc6b765
files libinterp/corefcn/gzfstream.cc libinterp/corefcn/gzfstream.h
diffstat 2 files changed, 24 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/gzfstream.cc	Sun Sep 12 20:50:13 2021 -0700
+++ b/libinterp/corefcn/gzfstream.cc	Sun Sep 12 20:57:27 2021 -0700
@@ -522,22 +522,22 @@
 
 // Default constructor initializes stream buffer
 gzifstream::gzifstream ()
-  : std::istream (nullptr), sb ()
-{ this->init (&sb); }
+  : std::istream (nullptr), m_sb ()
+{ this->init (&m_sb); }
 
 // Initialize stream buffer and open file
 gzifstream::gzifstream (const char *name, std::ios_base::openmode mode)
-  : std::istream (nullptr), sb ()
+  : std::istream (nullptr), m_sb ()
 {
-  this->init (&sb);
+  this->init (&m_sb);
   this->open (name, mode);
 }
 
 // Initialize stream buffer and attach to file
 gzifstream::gzifstream (int fd, std::ios_base::openmode mode)
-  : std::istream (nullptr), sb ()
+  : std::istream (nullptr), m_sb ()
 {
-  this->init (&sb);
+  this->init (&m_sb);
   this->attach (fd, mode);
 }
 
@@ -545,7 +545,7 @@
 void
 gzifstream::open (const char *name, std::ios_base::openmode mode)
 {
-  if (! sb.open (name, mode | std::ios_base::in))
+  if (! m_sb.open (name, mode | std::ios_base::in))
     this->setstate (std::ios_base::failbit);
   else
     this->clear ();
@@ -555,7 +555,7 @@
 void
 gzifstream::attach (int fd, std::ios_base::openmode mode)
 {
-  if (! sb.attach (fd, mode | std::ios_base::in))
+  if (! m_sb.attach (fd, mode | std::ios_base::in))
     this->setstate (std::ios_base::failbit);
   else
     this->clear ();
@@ -565,28 +565,28 @@
 void
 gzifstream::close ()
 {
-  if (! sb.close ())
+  if (! m_sb.close ())
     this->setstate (std::ios_base::failbit);
 }
 
 // Default constructor initializes stream buffer
 gzofstream::gzofstream ()
-  : std::ostream (nullptr), sb ()
-{ this->init (&sb); }
+  : std::ostream (nullptr), m_sb ()
+{ this->init (&m_sb); }
 
 // Initialize stream buffer and open file
 gzofstream::gzofstream (const char *name, std::ios_base::openmode mode)
-  : std::ostream (nullptr), sb ()
+  : std::ostream (nullptr), m_sb ()
 {
-  this->init (&sb);
+  this->init (&m_sb);
   this->open (name, mode);
 }
 
 // Initialize stream buffer and attach to file
 gzofstream::gzofstream (int fd, std::ios_base::openmode mode)
-  : std::ostream (nullptr), sb ()
+  : std::ostream (nullptr), m_sb ()
 {
-  this->init (&sb);
+  this->init (&m_sb);
   this->attach (fd, mode);
 }
 
@@ -594,7 +594,7 @@
 void
 gzofstream::open (const char *name, std::ios_base::openmode mode)
 {
-  if (! sb.open (name, mode | std::ios_base::out))
+  if (! m_sb.open (name, mode | std::ios_base::out))
     this->setstate (std::ios_base::failbit);
   else
     this->clear ();
@@ -604,7 +604,7 @@
 void
 gzofstream::attach (int fd, std::ios_base::openmode mode)
 {
-  if (! sb.attach (fd, mode | std::ios_base::out))
+  if (! m_sb.attach (fd, mode | std::ios_base::out))
     this->setstate (std::ios_base::failbit);
   else
     this->clear ();
@@ -614,7 +614,7 @@
 void
 gzofstream::close ()
 {
-  if (! sb.close ())
+  if (! m_sb.close ())
     this->setstate (std::ios_base::failbit);
 }
 
--- a/libinterp/corefcn/gzfstream.h	Sun Sep 12 20:50:13 2021 -0700
+++ b/libinterp/corefcn/gzfstream.h	Sun Sep 12 20:57:27 2021 -0700
@@ -307,14 +307,14 @@
   */
   gzfilebuf*
   rdbuf () const
-  { return const_cast<gzfilebuf *>(&sb); }
+  { return const_cast<gzfilebuf *>(&m_sb); }
 
   /**
    *  @brief  Check if file is open.
    *  @return  True if file is open.
   */
   bool
-  is_open () { return sb.is_open (); }
+  is_open () { return m_sb.is_open (); }
 
   /**
    *  @brief  Open gzipped file.
@@ -356,7 +356,7 @@
   /**
    *  Underlying stream buffer.
   */
-  gzfilebuf sb;
+  gzfilebuf m_sb;
 };
 
 /**
@@ -394,14 +394,14 @@
   */
   gzfilebuf*
   rdbuf () const
-  { return const_cast<gzfilebuf *>(&sb); }
+  { return const_cast<gzfilebuf *>(&m_sb); }
 
   /**
    *  @brief  Check if file is open.
    *  @return  True if file is open.
   */
   bool
-  is_open () { return sb.is_open (); }
+  is_open () { return m_sb.is_open (); }
 
   /**
    *  @brief  Open gzipped file.
@@ -443,7 +443,7 @@
   /**
    *  Underlying stream buffer.
   */
-  gzfilebuf sb;
+  gzfilebuf m_sb;
 };
 
 /**