mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-28 13:28:01 +03:00
fix erase_if method
This commit is contained in:
parent
89dea9bd92
commit
519a3b5b79
1 changed files with 2 additions and 2 deletions
|
@ -390,7 +390,7 @@ namespace rsx
|
|||
}
|
||||
|
||||
bool ret = false;
|
||||
for (auto ptr = _data, last = _data + _size - 1; ptr <= last; ptr++)
|
||||
for (auto ptr = _data, last = _data + (_size - 1); ptr <= last; ptr++)
|
||||
{
|
||||
if (predicate(*ptr))
|
||||
{
|
||||
|
@ -405,7 +405,7 @@ namespace rsx
|
|||
|
||||
// Move item to the end of the list and shrink by 1
|
||||
std::memcpy(ptr, last, sizeof(Ty));
|
||||
last = _data + (--_size);
|
||||
last = _data + (--_size - 1); // set new last
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue