Bazaar developer reference

CvVoterDecision::GetVotesCast()

Defined in
CvVotingClasses.cpp, line 770
Class
CvVoterDecision
Hook name
CivHooks::CvVoterDecision_GetVotesCast

Hooks

static bool BeforeCvVoterDecision_GetVotesCast(CvVoterDecision* self, int& result);static void AfterCvVoterDecision_GetVotesCast(CvVoterDecision* self, int& result);static int ReplaceCvVoterDecision_GetVotesCast(int (*original)(CvVoterDecision*), CvVoterDecision* self);CivRegisterBefore<CivHooks::CvVoterDecision_GetVotesCast>(host, &BeforeCvVoterDecision_GetVotesCast);CivRegisterAfter<CivHooks::CvVoterDecision_GetVotesCast>(host, &AfterCvVoterDecision_GetVotesCast);CivRegisterReplace<CivHooks::CvVoterDecision_GetVotesCast>(host, &ReplaceCvVoterDecision_GetVotesCast);

Code

770int CvVoterDecision::GetVotesCast()771{772	int iCount = 0;773	for (PlayerVoteList::iterator it = m_vVotes.begin(); it != m_vVotes.end(); it++)774	{775		iCount += it->iNumVotes;776	}777	return iCount;778}

Calls

Called by