mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 22:19:02 +00:00
Fix some -Weffc++ warnings (part 1)
This commit is contained in:
parent
deacf05769
commit
2212a131ef
24 changed files with 162 additions and 56 deletions
|
|
@ -783,7 +783,7 @@ namespace
|
|||
}
|
||||
|
||||
// Advance: linearly to prevent self-collisions, but always switch between two big 2^16 chunks
|
||||
void operator++(int) noexcept
|
||||
void advance() noexcept
|
||||
{
|
||||
if (id >= 0x10000)
|
||||
{
|
||||
|
|
@ -840,7 +840,7 @@ atomic_t<u16>* root_info::slot_alloc(uptr ptr) noexcept
|
|||
|
||||
u32 limit = 0;
|
||||
|
||||
for (hash_engine _this(ptr);; _this++)
|
||||
for (hash_engine _this(ptr);; _this.advance())
|
||||
{
|
||||
slot = _this->bits.atomic_op([&](slot_allocator& bits) -> atomic_t<u16>*
|
||||
{
|
||||
|
|
@ -919,7 +919,7 @@ void root_info::slot_free(uptr iptr, atomic_t<u16>* slot, u32 tls_slot) noexcept
|
|||
cond_free(cond_id, tls_slot);
|
||||
}
|
||||
|
||||
for (hash_engine curr(iptr);; curr++)
|
||||
for (hash_engine curr(iptr);; curr.advance())
|
||||
{
|
||||
// Reset reference counter and allocation bit in every slot
|
||||
curr->bits.atomic_op([&](slot_allocator& bits)
|
||||
|
|
@ -945,7 +945,7 @@ FORCE_INLINE auto root_info::slot_search(uptr iptr, u128 mask, F func) noexcept
|
|||
u32 index = 0;
|
||||
u32 total = 0;
|
||||
|
||||
for (hash_engine _this(iptr);; _this++)
|
||||
for (hash_engine _this(iptr);; _this.advance())
|
||||
{
|
||||
const auto bits = _this->bits.load();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue