Bazaar developer reference

CvDllPathFinderUpdateList::DecrementReference()

Defined in
CvDllPathFinderUpdate.cpp, line 121
Class
CvDllPathFinderUpdateList
Hook name
CivHooks::CvDllPathFinderUpdateList_DecrementReference

Hooks

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

Code

121unsigned int CvDllPathFinderUpdateList::DecrementReference()122{123	if(m_uiRefCount == 1)124	{125		delete this;126		return 0;127	}128	else129	{130		--m_uiRefCount;131		return m_uiRefCount;132	}133}

Called by