diff options
author | rubidium <rubidium@openttd.org> | 2007-06-18 19:53:50 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-06-18 19:53:50 +0000 |
commit | 49220cc6f1e3570dc1b9001c40af2a8a4e35b649 (patch) | |
tree | 62843984493ffedb69f91d7b85cb631ecb61ff3e /src/engine.cpp | |
parent | 3771d666c0e6bb48980b7548a2b38b3594efb3ff (diff) | |
download | openttd-49220cc6f1e3570dc1b9001c40af2a8a4e35b649.tar.xz |
(svn r10205) -Codechange: refactor returning of cost, so it can be more easily modified.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r-- | src/engine.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index e0e3fd430..b8207c481 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -276,7 +276,7 @@ CommandCost CmdWantEnginePreview(TileIndex tile, uint32 flags, uint32 p1, uint32 if (flags & DC_EXEC) AcceptEnginePreview(p1, _current_player); - return 0; + return CommandCost(); } /* Determine if an engine type is a wagon (and not a loco) */ @@ -393,7 +393,7 @@ CommandCost CmdRenameEngine(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) DeleteName(str); } - return 0; + return CommandCost(); } @@ -541,7 +541,7 @@ CommandCost AddEngineReplacement(EngineRenewList *erl, EngineID old_engine, Engi er = GetEngineReplacement(*erl, old_engine, group); if (er != NULL) { if (flags & DC_EXEC) er->to = new_engine; - return 0; + return CommandCost(); } er = AllocateEngineRenew(); @@ -557,7 +557,7 @@ CommandCost AddEngineReplacement(EngineRenewList *erl, EngineID old_engine, Engi *erl = (EngineRenewList)er; } - return 0; + return CommandCost(); } CommandCost RemoveEngineReplacement(EngineRenewList *erl, EngineID engine, GroupID group, uint32 flags) @@ -578,7 +578,7 @@ CommandCost RemoveEngineReplacement(EngineRenewList *erl, EngineID engine, Group } DeleteEngineRenew(er); } - return 0; + return CommandCost(); } prev = er; er = er->next; |