You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ro...@apache.org on 2012/11/07 21:26:03 UTC

svn commit: r1406793 - /thrift/trunk/lib/cpp/src/thrift/concurrency/Mutex.h

Author: roger
Date: Wed Nov  7 20:26:03 2012
New Revision: 1406793

URL: http://svn.apache.org/viewvc?rev=1406793&view=rev
Log:
THRIFT-1748 Guard and RWGuard macros defined in global namespace 
Patch: Bud Bundy

Modified:
    thrift/trunk/lib/cpp/src/thrift/concurrency/Mutex.h

Modified: thrift/trunk/lib/cpp/src/thrift/concurrency/Mutex.h
URL: http://svn.apache.org/viewvc/thrift/trunk/lib/cpp/src/thrift/concurrency/Mutex.h?rev=1406793&r1=1406792&r2=1406793&view=diff
==============================================================================
--- thrift/trunk/lib/cpp/src/thrift/concurrency/Mutex.h (original)
+++ thrift/trunk/lib/cpp/src/thrift/concurrency/Mutex.h Wed Nov  7 20:26:03 2012
@@ -183,15 +183,6 @@ class RWGuard : boost::noncopyable {
     const ReadWriteMutex& rw_mutex_;
 };
 
-
-// A little hack to prevent someone from trying to do "Guard(m);"
-// Such a use is invalid because the temporary Guard object is
-// destroyed at the end of the line, releasing the lock.
-// Sorry for polluting the global namespace, but I think it's worth it.
-#define Guard(m) incorrect_use_of_Guard(m)
-#define RWGuard(m) incorrect_use_of_RWGuard(m)
-
-
 }}} // apache::thrift::concurrency
 
 #endif // #ifndef _THRIFT_CONCURRENCY_MUTEX_H_