diff options
author | skidd13 <skidd13@openttd.org> | 2007-11-19 18:38:10 +0000 |
---|---|---|
committer | skidd13 <skidd13@openttd.org> | 2007-11-19 18:38:10 +0000 |
commit | 98f66552beadfa14cf28cd126fc462a5abe3087b (patch) | |
tree | 7818a2f346fc9a85d84a2a844989ea1a90136b90 /src/main_gui.cpp | |
parent | 9e385d2427fd017e90182aa152e488ce026ace19 (diff) | |
download | openttd-98f66552beadfa14cf28cd126fc462a5abe3087b.tar.xz |
(svn r11475) -Codechange: rename clamp and clampu to Clamp and ClampU to fit with the coding style
Diffstat (limited to 'src/main_gui.cpp')
-rw-r--r-- | src/main_gui.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp index aea2f1e7a..25387237f 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp @@ -96,7 +96,7 @@ void HandleOnEditText(const char *str) const Player *p = GetPlayer(_current_player); Money money = min(p->player_money - p->current_loan, (Money)(atoi(str) / _currency->rate)); - uint32 money_c = clamp(ClampToI32(money), 0, 20000000); // Clamp between 20 million and 0 + uint32 money_c = Clamp(ClampToI32(money), 0, 20000000); // Clamp between 20 million and 0 /* Give 'id' the money, and substract it from ourself */ DoCommandP(0, money_c, id, CcGiveMoney, CMD_GIVE_MONEY | CMD_MSG(STR_INSUFFICIENT_FUNDS)); @@ -716,7 +716,7 @@ static Window *PopupMainToolbMenu(Window *w, uint16 parent_button, StringID base * we clicked on and w->left the toolbar window itself. So meaning that * the default position is aligned with the left side of the clicked button */ width = max(GetStringListMaxWidth(base_string, item_count) + 6, 140); - x = w->left + clamp(x, 0, w->width - width); // or alternatively '_screen.width - width' + x = w->left + Clamp(x, 0, w->width - width); // or alternatively '_screen.width - width' w = AllocateWindow(x, 22, width, item_count * 10 + 2, MenuWndProc, WC_TOOLBAR_MENU, _menu_widgets); w->widget[0].bottom = item_count * 10 + 1; @@ -995,7 +995,7 @@ static void ToolbarScenDateBackward(Window *w) HandleButtonClick(w, 6); SetWindowDirty(w); - _patches_newgame.starting_year = clamp(_patches_newgame.starting_year - 1, MIN_YEAR, MAX_YEAR); + _patches_newgame.starting_year = Clamp(_patches_newgame.starting_year - 1, MIN_YEAR, MAX_YEAR); SetDate(ConvertYMDToDate(_patches_newgame.starting_year, 0, 1)); } _left_button_clicked = false; @@ -1008,7 +1008,7 @@ static void ToolbarScenDateForward(Window *w) HandleButtonClick(w, 7); SetWindowDirty(w); - _patches_newgame.starting_year = clamp(_patches_newgame.starting_year + 1, MIN_YEAR, MAX_YEAR); + _patches_newgame.starting_year = Clamp(_patches_newgame.starting_year + 1, MIN_YEAR, MAX_YEAR); SetDate(ConvertYMDToDate(_patches_newgame.starting_year, 0, 1)); } _left_button_clicked = false; |