summaryrefslogtreecommitdiff
path: root/src/town_gui.cpp
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2008-07-09 02:18:51 +0000
committerbelugas <belugas@openttd.org>2008-07-09 02:18:51 +0000
commite9a1142e0da66460222565576e2274a8571e6e34 (patch)
tree29a81e31408340b9beabe2fe013ded5712e1f4c6 /src/town_gui.cpp
parenta324f3078329f67247bb1afe6a5918f011f1d0a1 (diff)
downloadopenttd-e9a1142e0da66460222565576e2274a8571e6e34.tar.xz
(svn r13683) -Codechange: privatize a function that is not used outside of the class who calls it
Diffstat (limited to 'src/town_gui.cpp')
-rw-r--r--src/town_gui.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/town_gui.cpp b/src/town_gui.cpp
index 241b60d6d..054df20f3 100644
--- a/src/town_gui.cpp
+++ b/src/town_gui.cpp
@@ -113,27 +113,6 @@ uint GetMaskOfTownActions(int *nump, PlayerID pid, const Town *t)
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 @@ private:
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)