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>
This commit is contained in:
Tareq A. Siraj 2012-07-26 16:04:24 -04:00 committed by Edwin Vane
parent 349149b52a
commit 114e968482

View File

@ -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 >;
// ---------------------------------------------------------------------------