summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTareq A. Siraj <tareq.a.siraj@intel.com>2012-07-26 16:04:24 -0400
committerEdwin Vane <edwin.vane@intel.com>2012-08-23 14:08:57 -0400
commit114e968482a02b9153d9a236376efb5cd43f4a9a (patch)
tree55f04990bbd899aac0aa8ef856d5396c151f71e6 /include
parent349149b52a424c212e33d165bc146bc0337ea4c4 (diff)
downloadframeworks_native-114e968482a02b9153d9a236376efb5cd43f4a9a.zip
frameworks_native-114e968482a02b9153d9a236376efb5cd43f4a9a.tar.gz
frameworks_native-114e968482a02b9153d9a236376efb5cd43f4a9a.tar.bz2
Fixed clang build error for libgui
Fixed the order of the statements in ANDROID_SINGLETON_STATIC_INSTANCE macro so that the templated static member variable initialization comes before the instantiation of the Singleton class. This fixes the clang compile error. Change-Id: Ic47d17e152b657f2dff3191ccc3770753fdf002b Author: Tareq A. Siraj <tareq.a.siraj@intel.com> Reviewed-by: Edwin Vane <edwin.vane@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/utils/Singleton.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/utils/Singleton.h b/include/utils/Singleton.h
index a42ce21..c60680e 100644
--- a/include/utils/Singleton.h
+++ b/include/utils/Singleton.h
@@ -65,9 +65,9 @@ private:
*/
#define ANDROID_SINGLETON_STATIC_INSTANCE(TYPE) \
- template class Singleton< TYPE >; \
template<> Mutex Singleton< TYPE >::sLock(Mutex::PRIVATE); \
- template<> TYPE* Singleton< TYPE >::sInstance(0);
+ template<> TYPE* Singleton< TYPE >::sInstance(0); \
+ template class Singleton< TYPE >;
// ---------------------------------------------------------------------------