Mercurial > octave
diff liboctave/util/oct-mutex.h @ 27379:3db033e86376
use m_ prefix for data members in most liboctave/util classes
Files affected: cmd-edit.cc, cmd-edit.h, cmd-hist.cc, cmd-hist.h,
glob-match.cc, glob-match.h, kpse.cc, kpse.h, lo-array-errwarn.cc,
lo-array-errwarn.h, lo-regexp.cc, lo-regexp.h, oct-inttypes.h,
oct-mutex.cc, oct-mutex.h, oct-shlib.cc, oct-shlib.h, oct-sort.cc,
oct-sort.h, octave-preserve-stream-state.h, singleton-cleanup.cc, and
singleton-cleanup.h.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 09 Sep 2019 16:15:40 -0400 |
parents | fff643eb3514 |
children | c23aee2104de |
line wrap: on
line diff
--- a/liboctave/util/oct-mutex.h Sat Sep 07 10:49:03 2019 -0400 +++ b/liboctave/util/oct-mutex.h Mon Sep 09 16:15:40 2019 -0400 @@ -37,7 +37,7 @@ public: friend class mutex; - base_mutex (void) : count (1) { } + base_mutex (void) : m_count (1) { } virtual ~base_mutex (void) = default; @@ -48,7 +48,7 @@ virtual bool try_lock (void); private: - refcount<int> count; + refcount<int> m_count; }; class @@ -59,26 +59,26 @@ mutex (void); mutex (const mutex& m) - : rep (m.rep) + : m_rep (m.m_rep) { - rep->count++; + m_rep->m_count++; } ~mutex (void) { - if (--rep->count == 0) - delete rep; + if (--m_rep->m_count == 0) + delete m_rep; } mutex& operator = (const mutex& m) { - if (rep != m.rep) + if (m_rep != m.m_rep) { - if (--rep->count == 0) - delete rep; + if (--m_rep->m_count == 0) + delete m_rep; - rep = m.rep; - rep->count++; + m_rep = m.m_rep; + m_rep->m_count++; } return *this; @@ -86,21 +86,21 @@ void lock (void) { - rep->lock (); + m_rep->lock (); } void unlock (void) { - rep->unlock (); + m_rep->unlock (); } bool try_lock (void) { - return rep->try_lock (); + return m_rep->try_lock (); } protected: - base_mutex *rep; + base_mutex *m_rep; }; class