MantisBT - Zandronum
View Issue Details
0002351Zandronum[All Projects] Bugpublic2015-07-15 19:492015-07-15 19:51
Dusk 
 
lowtrivialN/A
newopen 
 
 
0002351: CALLVOTE_CountNumEligibleVoters is useless
'http://hastebin.com/vumikogera.cpp [^]'
The for loop is clearly useless because the breaking point is commented out (and I don't think anyone is going to uncomment it anytime soon), so ulIdx2 is always MAXPLAYERS.

So effective it's the same as this:'http://hastebin.com/elenetihub.cpp [^]'
And this in turn means we could replace it with a call to SERVER_CountPlayers( false ).
No tags attached.
Issue History
2015-07-15 19:49DuskNew Issue
2015-07-15 19:51DuskNote Added: 0012947
2015-07-15 19:51DuskNote Edited: 0012947bug_revision_view_page.php?bugnote_id=12947#r7688

Notes
(0012947)
Dusk   
2015-07-15 19:51   
To keep its symbolic meaning we could probably rewrite it as:

int CALLVOTE_CountNumEligibleVoters()
{
    return SERVER_CountPlayers( false );
}


In case we need to refine the definition of "eligible" sometime.