Bazaar developer reference

CvDllPlot::DecrementReference()

Defined in
CvDllPlot.cpp, line 44
Class
CvDllPlot
Hook name
CivHooks::CvDllPlot_DecrementReference

Hooks

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

Code

44unsigned int CvDllPlot::DecrementReference()45{46	if(m_uiRefCount == 1)47	{48		delete this;49		return 0;50	}51	else52	{53		--m_uiRefCount;54		return m_uiRefCount;55	}56}

Called by