mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-16 08:52:40 +01:00
Codechange: Use std::ranges::find where possible.
Replace `std::find(range.begin(), range.end(), ...)` with `std::ranges::find(range, ...)`.
This commit is contained in:
committed by
Peter Nelson
parent
1f18894408
commit
3be0166801
@@ -168,7 +168,7 @@ std::string ScriptText::GetEncodedText()
|
||||
|
||||
void ScriptText::_FillParamList(ParamList ¶ms, ScriptTextList &seen_texts)
|
||||
{
|
||||
if (std::find(seen_texts.begin(), seen_texts.end(), this) != seen_texts.end()) throw Script_FatalError(fmt::format("{}: Circular reference detected", GetGameStringName(this->string)));
|
||||
if (std::ranges::find(seen_texts, this) != seen_texts.end()) throw Script_FatalError(fmt::format("{}: Circular reference detected", GetGameStringName(this->string)));
|
||||
seen_texts.push_back(this);
|
||||
|
||||
for (int i = 0; i < this->paramc; i++) {
|
||||
|
||||
Reference in New Issue
Block a user