Bazaar developer reference

CvDllColorInfo::DecrementReference()

Defined in
CvDllColorInfo.cpp, line 41
Class
CvDllColorInfo
Hook name
CivHooks::CvDllColorInfo_DecrementReference

Hooks

static bool BeforeCvDllColorInfo_DecrementReference(CvDllColorInfo* self, unsigned int& result);static void AfterCvDllColorInfo_DecrementReference(CvDllColorInfo* self, unsigned int& result);static unsigned int ReplaceCvDllColorInfo_DecrementReference(unsigned int (*original)(CvDllColorInfo*), CvDllColorInfo* self);// CivHooks.h gives this hook point no types, so nothing checks these hooks' parameters.host->RegisterHook(host->pluginIndex, CivHooks::CvDllColorInfo_DecrementReference::ID, CIV_HOOK_BEFORE, (void*)&BeforeCvDllColorInfo_DecrementReference);host->RegisterHook(host->pluginIndex, CivHooks::CvDllColorInfo_DecrementReference::ID, CIV_HOOK_AFTER, (void*)&AfterCvDllColorInfo_DecrementReference);host->RegisterHook(host->pluginIndex, CivHooks::CvDllColorInfo_DecrementReference::ID, CIV_HOOK_REPLACE, (void*)&ReplaceCvDllColorInfo_DecrementReference);

Code

41unsigned int CvDllColorInfo::DecrementReference()42{43	if(m_uiRefCount == 1)44	{45		delete this;46		return 0;47	}48	else49	{50		--m_uiRefCount;51		return m_uiRefCount;52	}53}

Called by