diff options
author | alberth <alberth@openttd.org> | 2010-08-29 15:58:43 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-08-29 15:58:43 +0000 |
commit | 9f5a96ead210338d8fc343108a8633da5e04e340 (patch) | |
tree | de03e1764ebef64977250f6ca88b26b93e313a63 | |
parent | 219ad6e0032efd16afa177e6b6e09c7e7a7b4141 (diff) | |
download | openttd-9f5a96ead210338d8fc343108a8633da5e04e340.tar.xz |
(svn r20689) -Codechange: Make some global functions used in 1 .cpp file static in that file.
-rw-r--r-- | src/company_cmd.cpp | 2 | ||||
-rw-r--r-- | src/company_manager_face.h | 1 | ||||
-rw-r--r-- | src/fileio.cpp | 2 | ||||
-rw-r--r-- | src/fileio_func.h | 1 | ||||
-rw-r--r-- | src/network/network_func.h | 1 | ||||
-rw-r--r-- | src/network/network_server.cpp | 2 | ||||
-rw-r--r-- | src/newgrf_canal.cpp | 2 | ||||
-rw-r--r-- | src/newgrf_canal.h | 1 | ||||
-rw-r--r-- | src/settings.cpp | 2 | ||||
-rw-r--r-- | src/settings_func.h | 2 | ||||
-rw-r--r-- | src/window.cpp | 2 | ||||
-rw-r--r-- | src/window_gui.h | 1 |
12 files changed, 6 insertions, 13 deletions
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index 77a888876..12947cd06 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -138,7 +138,7 @@ void DrawCompanyIcon(CompanyID c, int x, int y) * @param cmf the fact to check * @return true if and only if the face is valid */ -bool IsValidCompanyManagerFace(CompanyManagerFace cmf) +static bool IsValidCompanyManagerFace(CompanyManagerFace cmf) { if (!AreCompanyManagerFaceBitsValid(cmf, CMFV_GEN_ETHN, GE_WM)) return false; diff --git a/src/company_manager_face.h b/src/company_manager_face.h index 5e68aa27c..80614a16f 100644 --- a/src/company_manager_face.h +++ b/src/company_manager_face.h @@ -237,6 +237,5 @@ static inline SpriteID GetCompanyManagerFaceSprite(CompanyManagerFace cmf, Compa } void DrawCompanyManagerFace(CompanyManagerFace face, int colour, int x, int y); -bool IsValidCompanyManagerFace(CompanyManagerFace cmf); #endif /* COMPANY_MANAGER_FACE_H */ diff --git a/src/fileio.cpp b/src/fileio.cpp index 46d28b848..b10c54459 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -426,7 +426,7 @@ FILE *FioFOpenFile(const char *filename, const char *mode, Subdirectory subdir, * Create a directory with the given name * @param name the new name of the directory */ -void FioCreateDirectory(const char *name) +static void FioCreateDirectory(const char *name) { #if defined(WIN32) || defined(WINCE) CreateDirectory(OTTD2FS(name), NULL); diff --git a/src/fileio_func.h b/src/fileio_func.h index e4137267c..db14ccb23 100644 --- a/src/fileio_func.h +++ b/src/fileio_func.h @@ -25,7 +25,6 @@ void FioCloseAll(); void FioOpenFile(int slot, const char *filename); void FioReadBlock(void *ptr, size_t size); void FioSkipBytes(int n); -void FioCreateDirectory(const char *filename); /** * The searchpaths OpenTTD could search through. diff --git a/src/network/network_func.h b/src/network/network_func.h index 3a0024f13..02ee1a327 100644 --- a/src/network/network_func.h +++ b/src/network/network_func.h @@ -72,7 +72,6 @@ const char *GetClientIP(NetworkClientInfo *ci); void NetworkServerDoMove(ClientID client_id, CompanyID company_id); void NetworkServerSendRcon(ClientID client_id, ConsoleColour colour_code, const char *string); -void NetworkServerSendError(ClientID client_id, NetworkErrorCode error); void NetworkServerSendChat(NetworkAction action, DestType type, int dest, const char *msg, ClientID from_id, int64 data = 0); void NetworkServerKickClient(ClientID client_id); diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index b8ea9fa62..95b65b3f4 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -1776,7 +1776,7 @@ void NetworkServerSendRcon(ClientID client_id, ConsoleColour colour_code, const SEND_COMMAND(PACKET_SERVER_RCON)(NetworkFindClientStateFromClientID(client_id), colour_code, string); } -void NetworkServerSendError(ClientID client_id, NetworkErrorCode error) +static void NetworkServerSendError(ClientID client_id, NetworkErrorCode error) { SEND_COMMAND(PACKET_SERVER_ERROR)(NetworkFindClientStateFromClientID(client_id), error); } diff --git a/src/newgrf_canal.cpp b/src/newgrf_canal.cpp index 7e139392d..91888ea35 100644 --- a/src/newgrf_canal.cpp +++ b/src/newgrf_canal.cpp @@ -114,7 +114,7 @@ SpriteID GetCanalSprite(CanalFeature feature, TileIndex tile) * @param tile Tile index of canal. * @return Callback result or CALLBACK_FAILED if the callback failed. */ -uint16 GetCanalCallback(CallbackID callback, uint32 param1, uint32 param2, CanalFeature feature, TileIndex tile) +static uint16 GetCanalCallback(CallbackID callback, uint32 param1, uint32 param2, CanalFeature feature, TileIndex tile) { ResolverObject object; const SpriteGroup *group; diff --git a/src/newgrf_canal.h b/src/newgrf_canal.h index f4ba9a06b..0bca7e76c 100644 --- a/src/newgrf_canal.h +++ b/src/newgrf_canal.h @@ -58,7 +58,6 @@ extern WaterFeature _water_feature[CF_END]; */ SpriteID GetCanalSprite(CanalFeature feature, TileIndex tile); -uint16 GetCanalCallback(CallbackID callback, uint32 param1, uint32 param2, CanalFeature feature, TileIndex tile); uint GetCanalSpriteOffset(CanalFeature feature, TileIndex tile, uint cur_offset); #endif /* NEWGRF_CANAL_H */ diff --git a/src/settings.cpp b/src/settings.cpp index 3a29752af..2c7766869 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -161,7 +161,7 @@ static uint32 LookupManyOfMany(const char *many, const char *str) * @param maxitems the maximum number of elements the integerlist-array has * @return returns the number of items found, or -1 on an error */ -int ParseIntList(const char *p, int *items, int maxitems) +static int ParseIntList(const char *p, int *items, int maxitems) { int n = 0; // number of items read so far bool comma = false; // do we accept comma? diff --git a/src/settings_func.h b/src/settings_func.h index 5ed6c3be4..65fca20f8 100644 --- a/src/settings_func.h +++ b/src/settings_func.h @@ -20,8 +20,6 @@ void IConsoleSetSetting(const char *name, int32 value); void IConsoleGetSetting(const char *name, bool force_newgame = false); void IConsoleListSettings(const char *prefilter); -int ParseIntList(const char *p, int *items, int maxitems); - void LoadFromConfig(); void SaveToConfig(); void CheckConfig(); diff --git a/src/window.cpp b/src/window.cpp index 4e2e42091..5d4eac2f3 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -145,7 +145,7 @@ void SetFocusedWindow(Window *w) * has a edit box as focused widget, or if a console is focused. * @return returns true if an edit box is in global focus or if the focused window is a console, else false */ -bool EditBoxInGlobalFocus() +static bool EditBoxInGlobalFocus() { if (_focused_window == NULL) return false; diff --git a/src/window_gui.h b/src/window_gui.h index 9d694db13..005c8a570 100644 --- a/src/window_gui.h +++ b/src/window_gui.h @@ -815,7 +815,6 @@ extern SpecialMouseMode _special_mouse_mode; Window *GetCallbackWnd(); void SetFocusedWindow(Window *w); -bool EditBoxInGlobalFocus(); void ScrollbarClickHandler(Window *w, NWidgetCore *nw, int x, int y); |