(svn r13683) -Codechange: privatize a function that is not used outside of the class who calls it
authorbelugas
Wed, 09 Jul 2008 02:18:51 +0000
changeset 11125 856f16065654
parent 11124 cc6f23e84ef4
child 11133 a75c67ae67b0
(svn r13683) -Codechange: privatize a function that is not used outside of the class who calls it
src/town_gui.cpp
--- a/src/town_gui.cpp	Tue Jul 08 23:07:58 2008 +0000
+++ b/src/town_gui.cpp	Wed Jul 09 02:18:51 2008 +0000
@@ -113,27 +113,6 @@
 	return buttons;
 }
 
-/**
- * Get the position of the Nth set bit.
- *
- * If there is no Nth bit set return -1
- *
- * @param bits The value to search in
- * @param n The Nth set bit from which we want to know the position
- * @return The position of the Nth set bit
- */
-static int GetNthSetBit(uint32 bits, int n)
-{
-	if (n >= 0) {
-		uint i;
-		FOR_EACH_SET_BIT(i, bits) {
-			n--;
-			if (n < 0) return i;
-		}
-	}
-	return -1;
-}
-
 struct TownAuthorityWindow : Window {
 private:
 	Town *town;
@@ -149,6 +128,27 @@
 		TWA_EXECUTE,
 	};
 
+	/**
+	 * Get the position of the Nth set bit.
+	 *
+	 * If there is no Nth bit set return -1
+	 *
+	 * @param bits The value to search in
+	 * @param n The Nth set bit from which we want to know the position
+	 * @return The position of the Nth set bit
+	 */
+	static int GetNthSetBit(uint32 bits, int n)
+	{
+		if (n >= 0) {
+			uint i;
+			FOR_EACH_SET_BIT(i, bits) {
+				n--;
+				if (n < 0) return i;
+			}
+		}
+		return -1;
+	}
+
 public:
 	TownAuthorityWindow(const WindowDesc *desc, WindowNumber window_number) :
 			Window(desc, window_number), sel_index(-1)