mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2026-03-26 20:48:38 +00:00
Using reserve() for optimization inserts, marked unused pair items and minor code refactor
This commit is contained in:
committed by
chaphidoesstuff
parent
9490b5264e
commit
e886f27816
@@ -54,7 +54,8 @@ public:
|
||||
const s32 to_register{std::min(std::min(appended_count, BufferAppendLimit),
|
||||
BufferAppendLimit - registered_count)};
|
||||
|
||||
for (s32 i = 0; i < to_register; i++) {
|
||||
out_buffers.reserve(to_register);
|
||||
for (s32 i = 0; i < to_register; ++i) {
|
||||
s32 index{appended_index - appended_count};
|
||||
if (index < 0) {
|
||||
index += N;
|
||||
@@ -180,6 +181,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
buffers_flushed.reserve(registered_count + appended_count);
|
||||
while (registered_count > 0) {
|
||||
auto index{registered_index - registered_count};
|
||||
if (index < 0) {
|
||||
|
||||
Reference in New Issue
Block a user