diff options
| author | Léo Lam <leo@leolam.fr> | 2022-03-25 21:33:00 +0100 |
|---|---|---|
| committer | Léo Lam <leo@leolam.fr> | 2022-03-25 21:34:03 +0100 |
| commit | 4b2c55b82b7c68ccbc63bc2c71e13f03a2db2a46 (patch) | |
| tree | 23f231e04333adde16fa5253fd458cc4ccb453d9 /src/KingSystem/Utils | |
| parent | 0e8cad1d0d9a4198c025babf2c43461d1d247ff6 (diff) | |
Use sead::Buffer::fill where applicable
Equivalent, shorter, more readable, and matching!
Diffstat (limited to 'src/KingSystem/Utils')
| -rw-r--r-- | src/KingSystem/Utils/Container/LockFreeQueue.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/KingSystem/Utils/Container/LockFreeQueue.h b/src/KingSystem/Utils/Container/LockFreeQueue.h index 1f6d5817..28de8593 100644 --- a/src/KingSystem/Utils/Container/LockFreeQueue.h +++ b/src/KingSystem/Utils/Container/LockFreeQueue.h @@ -22,9 +22,7 @@ public: void alloc(int capacity, sead::Heap* heap) { SEAD_ASSERT(sead::Mathi::isPow2(capacity)); mBuffer.allocBufferAssert(capacity, heap); - - for (int i = 0, n = getCapacity(); i < n; ++i) - mBuffer(i) = nullptr; + mBuffer.fill(nullptr); } void freeBuffer() { mBuffer.freeBuffer(); } |
