From 36051387f971e6a4e90d562f4cd6b48d949b61f8 Mon Sep 17 00:00:00 2001
From: Mario <mario@smbclan.net>
Date: Sat, 24 Dec 2016 16:59:20 +1000
Subject: [PATCH] Clean up map vote mask writing to use the BIT macro instead
 of multiplying a local number

---
 qcsrc/server/mapvoting.qc | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/qcsrc/server/mapvoting.qc b/qcsrc/server/mapvoting.qc
index 2ea425692..b5a601446 100644
--- a/qcsrc/server/mapvoting.qc
+++ b/qcsrc/server/mapvoting.qc
@@ -270,14 +270,14 @@ void MapVote_SendPicture(entity to, int id)
 
 void MapVote_WriteMask()
 {
-	float i;
 	if ( mapvote_count < 24 )
 	{
-		float mask,power;
-		mask = 0;
-		for(i = 0, power = 1; i < mapvote_count; ++i, power *= 2)
-			if(mapvote_maps_flags[i] & GTV_AVAILABLE )
-				mask |= power;
+		int mask = 0;
+		for(int j = 0; j < mapvote_count; ++j)
+		{
+			if(mapvote_maps_flags[j] & GTV_AVAILABLE)
+				mask |= BIT(j);
+		}
 
 		if(mapvote_count < 8)
 			WriteByte(MSG_ENTITY, mask);
@@ -288,8 +288,8 @@ void MapVote_WriteMask()
 	}
 	else
 	{
-		for ( i = 0; i < mapvote_count; ++i )
-			WriteByte(MSG_ENTITY, mapvote_maps_flags[i]);
+		for (int j = 0; j < mapvote_count; ++j)
+			WriteByte(MSG_ENTITY, mapvote_maps_flags[j]);
 	}
 }
 
-- 
2.39.5