diff options
author | rubidium42 <rubidium@openttd.org> | 2021-05-24 11:47:37 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-05-29 10:07:30 +0200 |
commit | 08308d808c2ab3a6621762127eed6c46f16286c6 (patch) | |
tree | 1b0cc66d3169b27d8adf345e4304fe7c030e7ffb /src/elrail.cpp | |
parent | e2f5d9e561b70aec85d67b4eea822ba49f0c20bf (diff) | |
download | openttd-08308d808c2ab3a6621762127eed6c46f16286c6.tar.xz |
Codechange: use separate pre and post callbacks for int settings
Diffstat (limited to 'src/elrail.cpp')
-rw-r--r-- | src/elrail.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/elrail.cpp b/src/elrail.cpp index 44481dd31..4959bb2cb 100644 --- a/src/elrail.cpp +++ b/src/elrail.cpp @@ -593,9 +593,9 @@ void DrawRailCatenary(const TileInfo *ti) DrawRailCatenaryRailway(ti); } -bool SettingsDisableElrail(int32 p1) +void SettingsDisableElrail(int32 new_value) { - bool disable = (p1 != 0); + bool disable = (new_value != 0); /* we will now walk through all electric train engines and change their railtypes if it is the wrong one*/ const RailType old_railtype = disable ? RAILTYPE_ELECTRIC : RAILTYPE_RAIL; @@ -639,5 +639,4 @@ bool SettingsDisableElrail(int32 p1) * rails. It may have unintended consequences if that function is ever * extended, though. */ ReinitGuiAfterToggleElrail(disable); - return true; } |