From 321894af2c96452a8a9762eb32aac4406cd7b507 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann <sbergman@redhat.com> Date: Thu, 5 Jan 2012 11:54:08 +0100 Subject: Explicitly initialize TypeDescriptor_Init_Impl. --- cppu/source/typelib/typelib.cxx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'cppu') diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx index 436781ef8920..fec9f04bb962 100644 --- a/cppu/source/typelib/typelib.cxx +++ b/cppu/source/typelib/typelib.cxx @@ -199,11 +199,6 @@ typedef list< typelib_TypeDescription * > TypeDescriptionList_Impl; // # of cached elements static sal_Int32 nCacheSize = 256; -//----------------------------------------------------------------------------- -/** - * All members must set initial to 0 and no constructor is needed. So it - * doesn't care, when this class is static initialized.<BR> - */ struct TypeDescriptor_Init_Impl { //sal_Bool bDesctructorCalled; @@ -233,6 +228,19 @@ struct TypeDescriptor_Init_Impl sal_Int32 nInterfaceTypeDescriptionCount; sal_Int32 nTypeDescriptionReferenceCount; #endif + + TypeDescriptor_Init_Impl(): + pWeakMap(0), pCallbacks(0), pCache(0), pMutex(0) +#if OSL_DEBUG_LEVEL > 1 + , nTypeDescriptionCount(0), nCompoundTypeDescriptionCount(0), + nUnionTypeDescriptionCount(0), nIndirectTypeDescriptionCount(0), + nArrayTypeDescriptionCount(0), nEnumTypeDescriptionCount(0), + nInterfaceMethodTypeDescriptionCount(0), + nInterfaceAttributeTypeDescriptionCount(0), + nInterfaceTypeDescriptionCount(0), nTypeDescriptionReferenceCount(0) +#endif + {} + ~TypeDescriptor_Init_Impl() SAL_THROW( () ); }; //__________________________________________________________________________________________________ -- cgit