Bazaar developer reference

CvDllGameDeals::DecrementReference()

Defined in
CvDllGameDeals.cpp, line 42
Class
CvDllGameDeals
Hook name
CivHooks::CvDllGameDeals_DecrementReference

Hooks

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

Code

42unsigned int CvDllGameDeals::DecrementReference()43{44	if(m_uiRefCount == 1)45	{46		delete this;47		return 0;48	}49	else50	{51		--m_uiRefCount;52		return m_uiRefCount;53	}54}

Called by