fix: use vector over array to reduce executable size by 1MiB
This commit is contained in:
parent
665dc3de92
commit
3946440654
@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
#include <array>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
@ -79,7 +80,7 @@ class KggTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t offset{0};
|
size_t offset{0};
|
||||||
thread_local std::array<uint8_t, 1024 * 1024> temp_buffer{};
|
thread_local std::vector<uint8_t> temp_buffer(1024 * 1024, 0);
|
||||||
auto buf_signed = std::span(reinterpret_cast<char*>(temp_buffer.data()), temp_buffer.size());
|
auto buf_signed = std::span(reinterpret_cast<char*>(temp_buffer.data()), temp_buffer.size());
|
||||||
auto buf_unsigned = std::span(temp_buffer);
|
auto buf_unsigned = std::span(temp_buffer);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user