File diff r11089:babc36cbd948 → r11090:9276cea703d4
src/signs.cpp
Show inline comments
 
@@ -87,13 +87,13 @@ static void MarkSignDirty(Sign *si)
 
 * but everybody is able to rename/remove it.
 
 * @param tile tile to place sign at
 
 * @param flags type of operation
 
 * @param p1 unused
 
 * @param p2 unused
 
 */
 
CommandCost CmdPlaceSign(TileIndex tile, uint32 flags, uint32 p1, uint32 p2, const char *text)
 
CommandCost CmdPlaceSign(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
 
{
 
	/* Try to locate a new sign */
 
	if (!Sign::CanAllocateItem()) return_cmd_error(STR_2808_TOO_MANY_SIGNS);
 

	
 
	/* Check sign text length if any */
 
	if (!StrEmpty(text) && strlen(text) >= MAX_LENGTH_SIGN_NAME_BYTES) return CMD_ERROR;
 
@@ -125,13 +125,13 @@ CommandCost CmdPlaceSign(TileIndex tile,
 
 * @param tile unused
 
 * @param flags type of operation
 
 * @param p1 index of the sign to be renamed/removed
 
 * @param p2 unused
 
 * @return 0 if succesfull, otherwise CMD_ERROR
 
 */
 
CommandCost CmdRenameSign(TileIndex tile, uint32 flags, uint32 p1, uint32 p2, const char *text)
 
CommandCost CmdRenameSign(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
 
{
 
	if (!IsValidSignID(p1)) return CMD_ERROR;
 

	
 
	/* Rename the signs when empty, otherwise remove it */
 
	if (!StrEmpty(text)) {
 
		if (strlen(text) >= MAX_LENGTH_SIGN_NAME_BYTES) return CMD_ERROR;