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:
parent
349149b52a
commit
114e968482
@ -65,9 +65,9 @@ private:
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define ANDROID_SINGLETON_STATIC_INSTANCE(TYPE) \
|
#define ANDROID_SINGLETON_STATIC_INSTANCE(TYPE) \
|
||||||
template class Singleton< TYPE >; \
|
|
||||||
template<> Mutex Singleton< TYPE >::sLock(Mutex::PRIVATE); \
|
template<> Mutex Singleton< TYPE >::sLock(Mutex::PRIVATE); \
|
||||||
template<> TYPE* Singleton< TYPE >::sInstance(0);
|
template<> TYPE* Singleton< TYPE >::sInstance(0); \
|
||||||
|
template class Singleton< TYPE >;
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user