summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTareq A. Siraj <tareq.a.siraj@intel.com>2012-07-26 16:04:24 -0400
committerAlex Ray <aray@google.com>2013-07-30 13:57:00 -0700
commitcacf429b56522fe66862dd541860175f1bed739f (patch)
tree97691321a53cf3dd91bbffffa7b8f481b11de6fa
parent8d0c1a0316f583bc3835dbd7241bcffdb7fef7df (diff)
downloadsystem_core-cacf429b56522fe66862dd541860175f1bed739f.zip
system_core-cacf429b56522fe66862dd541860175f1bed739f.tar.gz
system_core-cacf429b56522fe66862dd541860175f1bed739f.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>
-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 >;
// ---------------------------------------------------------------------------