1.1 --- a/core/MenuManager.cpp Tue Jun 05 18:27:31 2007 +0000
1.2 +++ b/core/MenuManager.cpp Wed Jun 06 06:02:43 2007 +0000
1.3 @@ -96,7 +96,7 @@
1.4 void VoteMenuHandler::EndVoting()
1.5 {
1.6 unsigned int chosen = 0;
1.7 - size_t highest = 0;
1.8 + unsigned int highest = 0;
1.9 unsigned int dup_count = 0;
1.10
1.11 /* If we got zero votes, take a shortcut. */
1.12 @@ -113,7 +113,7 @@
1.13 */
1.14 unsigned int dup_array[256];
1.15
1.16 - for (size_t i=1; i<m_Votes.size(); i++)
1.17 + for (size_t i=1; i<m_Items; i++)
1.18 {
1.19 if (m_Votes[i] > m_Votes[highest])
1.20 {
1.21 @@ -134,7 +134,7 @@
1.22 if (dup_count)
1.23 {
1.24 /* Re-add the original to the list because it's not in there. */
1.25 - dup_array[dup_count++] = (unsigned int)highest;
1.26 + dup_array[dup_count++] = highest;
1.27
1.28 /* Pick a random slot. */
1.29 srand((unsigned int)(time(NULL)));
1.30 @@ -143,7 +143,7 @@
1.31 /* Pick the item. */
1.32 chosen = dup_array[r];
1.33 } else {
1.34 - chosen = (unsigned int)highest;
1.35 + chosen = highest;
1.36 }
1.37
1.38 picked_item: