mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-18 04:53:06 +01:00
Cleanup.
This commit is contained in:
@@ -260,7 +260,7 @@ namespace bx
|
||||
link.m_prev = _handle;
|
||||
}
|
||||
|
||||
updateFirstLast(_handle);
|
||||
updateFrontBack(_handle);
|
||||
}
|
||||
|
||||
void insertAfter(uint16_t _after, uint16_t _handle)
|
||||
@@ -281,7 +281,7 @@ namespace bx
|
||||
link.m_next = _handle;
|
||||
}
|
||||
|
||||
updateFirstLast(_handle);
|
||||
updateFrontBack(_handle);
|
||||
}
|
||||
|
||||
bool isValid(uint16_t _handle) const
|
||||
@@ -289,7 +289,7 @@ namespace bx
|
||||
return _handle < MaxHandlesT;
|
||||
}
|
||||
|
||||
void updateFirstLast(uint16_t _handle)
|
||||
void updateFrontBack(uint16_t _handle)
|
||||
{
|
||||
Link& curr = m_links[_handle];
|
||||
|
||||
|
||||
@@ -68,9 +68,9 @@ TEST(HandleAllocLruT)
|
||||
lru.alloc(),
|
||||
};
|
||||
|
||||
lru.touch(handle[3]);
|
||||
lru.touch(handle[1]);
|
||||
|
||||
uint16_t expected0[] = { handle[3], handle[0], handle[1], handle[2] };
|
||||
uint16_t expected0[] = { handle[1], handle[3], handle[2], handle[0] };
|
||||
uint16_t count = 0;
|
||||
for (uint16_t it = lru.getFront(); it != UINT16_MAX; it = lru.getNext(it), ++count)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user