Bazaar developer reference

CvDllPathFinderUpdate::DecrementReference()

Defined in
CvDllPathFinderUpdate.cpp, line 43
Class
CvDllPathFinderUpdate
Hook name
CivHooks::CvDllPathFinderUpdate_DecrementReference

Hooks

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

Code

43unsigned int CvDllPathFinderUpdate::DecrementReference()44{45	if(m_uiRefCount == 1)46	{47		delete this;48		return 0;49	}50	else51	{52		--m_uiRefCount;53		return m_uiRefCount;54	}55}

Called by