From c777f213b369bcd8dd7197e08c8d09673261143d Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Wed, 10 Dec 2014 13:55:21 -0800 Subject: [PATCH] Use full qualified name in macros. The ANDROID_SINGLETON_STATIC_INSTANCE is used in some files out of the android namespace. If it does not use full qualified names, users of this macro will need to use it inside the 'android' namespace to avoid warnings from clang compiler. Change-Id: Ie4d4ba2b57fdc72d0deb3b7c2326304a44a1300f --- include/utils/Singleton.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/utils/Singleton.h b/include/utils/Singleton.h index c60680eab..ffc03cb5d 100644 --- a/include/utils/Singleton.h +++ b/include/utils/Singleton.h @@ -65,9 +65,10 @@ private: */ #define ANDROID_SINGLETON_STATIC_INSTANCE(TYPE) \ - template<> Mutex Singleton< TYPE >::sLock(Mutex::PRIVATE); \ - template<> TYPE* Singleton< TYPE >::sInstance(0); \ - template class Singleton< TYPE >; + template<> ::android::Mutex \ + (::android::Singleton< TYPE >::sLock)(::android::Mutex::PRIVATE); \ + template<> TYPE* ::android::Singleton< TYPE >::sInstance(0); \ + template class ::android::Singleton< TYPE >; // ---------------------------------------------------------------------------