From 12be876131ad76d0fb8e7d0fbff586ea1a0a693e Mon Sep 17 00:00:00 2001 From: maedhros Date: Tue, 12 Jun 2007 22:13:49 +0000 Subject: (svn r10122) -Codechange: Add a CountBitsSet function and use it to replace some less efficient loops. --- src/functions.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/functions.h') diff --git a/src/functions.h b/src/functions.h index 12cf9deb8..cc885917e 100644 --- a/src/functions.h +++ b/src/functions.h @@ -147,9 +147,11 @@ Town *ClosestTownFromTile(TileIndex tile, uint threshold); void ChangeTownRating(Town *t, int add, int max); uint GetTownRadiusGroup(const Town* t, TileIndex tile); -int FindFirstBit(uint32 x); void ShowHighscoreTable(int difficulty, int8 rank); +int FindFirstBit(uint32 x); +int CountBitsSet(uint32 value); + void AfterLoadTown(); void UpdatePatches(); void AskExitGame(); -- cgit v1.2.3-54-g00ecf