1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-06 04:00:08 +00:00

UnicodeGenerated: Improve memory usage during compilation with gcc-7

This commit is contained in:
reuk 2024-09-04 14:56:29 +01:00
parent 2d360165c5
commit c49fe0b6be

View file

@ -364,6 +364,16 @@ struct UnicodeEntry
class UnicodeDataTable
{
static auto computeHash()
{
uint32_t v = 5381;
for (auto c : compressedData)
v = ((v << 5) + v) + (uint32_t) c;
return v;
}
public:
UnicodeDataTable() = delete;
@ -371,17 +381,7 @@ public:
{
static const auto data = []
{
[[maybe_unused]] constexpr auto hash = []
{
uint32_t v = 5381;
for (auto c : compressedData)
v = ((v << 5) + v) + (uint32_t) c;
return v;
}();
jassert (hash == 0x7f9e2da);
jassert (computeHash() == 0x7f9e2da);
MemoryInputStream mStream { compressedData, std::size (compressedData), false };
GZIPDecompressorInputStream zStream { &mStream, false };