diff --git a/signs.c b/signs.c index d507ffe4c4..f6d796d52a 100644 --- a/signs.c +++ b/signs.c @@ -103,7 +103,13 @@ static Sign *AllocateSign(void) return NULL; } -/** Place a sign at the given coordinates. Ownership of sign has +void DestroySign(Sign *si) +{ + DeleteName(si->str); +} + +/** + * Place a sign at the given coordinates. Ownership of sign has * no effect whatsoever except for the colour the sign gets for easy recognition, * but everybody is able to rename/remove it. * @param tile tile to place sign at diff --git a/signs.h b/signs.h index e2d5f9f7fa..8ae34f52e7 100644 --- a/signs.h +++ b/signs.h @@ -57,9 +57,11 @@ static inline bool IsValidSignID(uint index) return index < GetSignPoolSize() && IsValidSign(GetSign(index)); } +void DestroySign(Sign *si); + static inline void DeleteSign(Sign *si) { - DeleteName(si->str); + DestroySign(si); si->str = STR_NULL; }