diff options
author | rubidium42 <rubidium@openttd.org> | 2021-05-29 16:07:42 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-05-29 19:02:18 +0200 |
commit | 661728558e9ce2eb8cfdb6afd7182b85e1f19a67 (patch) | |
tree | 24f5f4c38e70edd1b6b4adead7253dcf4930642f /src/company_cmd.cpp | |
parent | b4aedef848822649d3f7a045504eb2a9870b4b7e (diff) | |
download | openttd-661728558e9ce2eb8cfdb6afd7182b85e1f19a67.tar.xz |
Codechange: let IsUnique.* functions accept std::string
Diffstat (limited to 'src/company_cmd.cpp')
-rw-r--r-- | src/company_cmd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index 85809544d..5a2b9ba1d 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -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; |