This commit is contained in:
Branimir Karadžić
2018-11-14 20:01:03 -08:00
parent e35f29b647
commit d1c6ff2b1f
10 changed files with 45 additions and 53 deletions

View File

@@ -13,14 +13,14 @@
namespace bx
{
void xchg(void* _a, void* _b, size_t _numBytes)
void swap(void* _a, void* _b, size_t _numBytes)
{
uint8_t* lhs = (uint8_t*)_a;
uint8_t* rhs = (uint8_t*)_b;
const uint8_t* end = rhs + _numBytes;
while (rhs != end)
{
xchg(*lhs++, *rhs++);
swap(*lhs++, *rhs++);
}
}