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
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user