Bazaar developer reference

CvCity::getPopulation(bool) const

Defined in
CvCity.cpp, line 7822
Class
CvCity
Hook name
CivHooks::CvCity_getPopulation

Hooks

static bool BeforeCvCity_getPopulation(const CvCity* self, bool bIncludeAutomatons, int& result);static void AfterCvCity_getPopulation(const CvCity* self, bool bIncludeAutomatons, int& result);static int ReplaceCvCity_getPopulation(int (*original)(const CvCity*, bool), const CvCity* self, bool bIncludeAutomatons);CivRegisterBefore<CivHooks::CvCity_getPopulation>(host, &BeforeCvCity_getPopulation);CivRegisterAfter<CivHooks::CvCity_getPopulation>(host, &AfterCvCity_getPopulation);CivRegisterReplace<CivHooks::CvCity_getPopulation>(host, &ReplaceCvCity_getPopulation);

Code

7821#if defined(MOD_GLOBAL_CITY_AUTOMATON_WORKERS)7822int CvCity::getPopulation(bool bIncludeAutomatons /* = false */) const7823#else7824int CvCity::getPopulation() const7825#endif7826{7827	VALIDATE_OBJECT7828#if defined(MOD_GLOBAL_CITY_AUTOMATON_WORKERS)7829	return m_iPopulation + (bIncludeAutomatons ? getAutomatons() : 0);7830#else7831	return m_iPopulation;7832#endif7833}

Calls

Called by

95 functions in 26 files