C++ Thrift coding style changes
Summary: Make underscore for class members consistent
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664818 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/concurrency/Mutex.cc b/lib/cpp/src/concurrency/Mutex.cc
index 416341e..1f116a3 100644
--- a/lib/cpp/src/concurrency/Mutex.cc
+++ b/lib/cpp/src/concurrency/Mutex.cc
@@ -13,32 +13,32 @@
*/
class Mutex::impl {
public:
- impl() : initialized(false) {
- assert(pthread_mutex_init(&_pthread_mutex, NULL) == 0);
- initialized = true;
+ impl() : initialized_(false) {
+ assert(pthread_mutex_init(&pthread_mutex_, NULL) == 0);
+ initialized_ = true;
}
~impl() {
- if (initialized) {
- initialized = false;
- assert(pthread_mutex_destroy(&_pthread_mutex) == 0);
+ if (initialized_) {
+ initialized_ = false;
+ assert(pthread_mutex_destroy(&pthread_mutex_) == 0);
}
}
- void lock() const { pthread_mutex_lock(&_pthread_mutex); }
+ void lock() const { pthread_mutex_lock(&pthread_mutex_); }
- void unlock() const { pthread_mutex_unlock(&_pthread_mutex); }
+ void unlock() const { pthread_mutex_unlock(&pthread_mutex_); }
private:
- mutable pthread_mutex_t _pthread_mutex;
- mutable bool initialized;
+ mutable pthread_mutex_t pthread_mutex_;
+ mutable bool initialized_;
};
-Mutex::Mutex() : _impl(new Mutex::impl()) {}
+Mutex::Mutex() : impl_(new Mutex::impl()) {}
-void Mutex::lock() const { _impl->lock(); }
+void Mutex::lock() const { impl_->lock(); }
-void Mutex::unlock() const { _impl->unlock(); }
+void Mutex::unlock() const { impl_->unlock(); }
}}} // facebook::thrift::concurrency