From 2e136285e1dfb4435c11769bf7cabb1ec2057e08 Mon Sep 17 00:00:00 2001 From: rubidium42 Date: Sat, 29 May 2021 16:09:25 +0200 Subject: Codechange: move from C-string to std::string for DoCommand --- src/water_cmd.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/water_cmd.cpp') 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(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(p2); if (p1 >= MapSize() || wc == WATER_CLASS_INVALID) return CMD_ERROR; -- cgit v1.2.3-54-g00ecf