Codechange: Use std::ranges::find where possible.

Replace `std::find(range.begin(), range.end(), ...)` with `std::ranges::find(range, ...)`.
This commit is contained in:
2024-11-10 10:51:26 +00:00
committed by Peter Nelson
parent 1f18894408
commit 3be0166801
31 changed files with 45 additions and 46 deletions

View File

@@ -86,7 +86,7 @@ static const void *ResolveObject(const GameSettings *settings_ptr, const IntSett
*/
static uint GetCurrentResolutionIndex()
{
auto it = std::find(_resolutions.begin(), _resolutions.end(), Dimension(_screen.width, _screen.height));
auto it = std::ranges::find(_resolutions, Dimension(_screen.width, _screen.height));
return std::distance(_resolutions.begin(), it);
}