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

Replace `std::find(range.begin(), range.end(), ...)` with `std::ranges::find(range, ...)`.
This commit is contained in:
Peter Nelson
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
+1 -1
View File
@@ -262,7 +262,7 @@ public:
*/
inline size_t FindIndex(const T &item) const
{
auto it = std::find(this->data.begin(), this->data.end(), &item);
auto it = std::ranges::find(this->data, &item);
return it == this->data.end() ? 0 : std::distance(this->data.begin(), it);
}