summaryrefslogtreecommitdiff
path: root/src/water_cmd.cpp
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-05-29 16:09:25 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-05-29 19:02:18 +0200
commit2e136285e1dfb4435c11769bf7cabb1ec2057e08 (patch)
treebd6cd67422cc6649a2b75761b52ad220de71b24e /src/water_cmd.cpp
parent661728558e9ce2eb8cfdb6afd7182b85e1f19a67 (diff)
downloadopenttd-2e136285e1dfb4435c11769bf7cabb1ec2057e08.tar.xz
Codechange: move from C-string to std::string for DoCommand
Diffstat (limited to 'src/water_cmd.cpp')
-rw-r--r--src/water_cmd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index dfbed6012..dbb4999a7 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -98,7 +98,7 @@ static void MarkCanalsAndRiversAroundDirty(TileIndex tile)
* @param text unused
* @return the cost of this operation or an error
*/
-CommandCost CmdBuildShipDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
+CommandCost CmdBuildShipDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const std::string &text)
{
Axis axis = Extract<Axis, 0, 1>(p1);
@@ -417,7 +417,7 @@ static CommandCost RemoveLock(TileIndex tile, DoCommandFlag flags)
* @param text unused
* @return the cost of this operation or an error
*/
-CommandCost CmdBuildLock(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
+CommandCost CmdBuildLock(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const std::string &text)
{
DiagDirection dir = GetInclinedSlopeDirection(GetTileSlope(tile));
if (dir == INVALID_DIAGDIR) return_cmd_error(STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION);
@@ -443,7 +443,7 @@ bool RiverModifyDesertZone(TileIndex tile, void *)
* @param text unused
* @return the cost of this operation or an error
*/
-CommandCost CmdBuildCanal(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
+CommandCost CmdBuildCanal(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const std::string &text)
{
WaterClass wc = Extract<WaterClass, 0, 2>(p2);
if (p1 >= MapSize() || wc == WATER_CLASS_INVALID) return CMD_ERROR;