1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-18 18:02:37 +01:00

Codechange: use const for std::string_view where appropriate

This commit is contained in:
Rubidium
2025-04-29 07:10:48 +02:00
committed by rubidium42
parent 78250c3bba
commit af25eecc15
34 changed files with 87 additions and 87 deletions

View File

@@ -1623,7 +1623,7 @@ void IntSettingDesc::ChangeValue(const void *object, int32_t newval) const
* @return Pointer to the setting description of setting \a name if it can be found,
* \c nullptr indicates failure to obtain the description.
*/
static const SettingDesc *GetSettingFromName(const std::string_view name, const SettingTable &settings)
static const SettingDesc *GetSettingFromName(std::string_view name, const SettingTable &settings)
{
/* First check all full names */
for (auto &desc : settings) {
@@ -1705,7 +1705,7 @@ static const SettingDesc *GetCompanySettingFromName(std::string_view name)
* @return Pointer to the setting description of setting \a name if it can be found,
* \c nullptr indicates failure to obtain the description.
*/
const SettingDesc *GetSettingFromName(const std::string_view name)
const SettingDesc *GetSettingFromName(std::string_view name)
{
for (auto &table : GenericSettingTables()) {
auto sd = GetSettingFromName(name, table);