|
|
|
@ -1049,7 +1049,7 @@ CommandCost CmdSetCompanyColour(TileIndex tile, DoCommandFlag flags, uint32 p1,
|
|
|
|
|
* @param name Name to search.
|
|
|
|
|
* @return \c true if the name us unique (that is, not in use), else \c false.
|
|
|
|
|
*/
|
|
|
|
|
static bool IsUniqueCompanyName(const char *name)
|
|
|
|
|
static bool IsUniqueCompanyName(const std::string &name)
|
|
|
|
|
{
|
|
|
|
|
for (const Company *c : Company::Iterate()) {
|
|
|
|
|
if (!c->name.empty() && c->name == name) return false;
|
|
|
|
@ -1095,7 +1095,7 @@ CommandCost CmdRenameCompany(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
|
|
|
|
|
* @param name Name to search.
|
|
|
|
|
* @return \c true if the name us unique (that is, not in use), else \c false.
|
|
|
|
|
*/
|
|
|
|
|
static bool IsUniquePresidentName(const char *name)
|
|
|
|
|
static bool IsUniquePresidentName(const std::string &name)
|
|
|
|
|
{
|
|
|
|
|
for (const Company *c : Company::Iterate()) {
|
|
|
|
|
if (!c->president_name.empty() && c->president_name == name) return false;
|
|
|
|
|