The prior method was to generate one line of
`g_container.emplace_back(…)` per entry in the list & letting the
compiler chew on that. Each string argument in that call was done was
`u8"Some Name"s`, meaning as a std::string instance.
Drawbacks:
• takes the compiler ages to compile, even forcing me to drop all
optimizations for the ISO-639 language list file
• even smaller files such as the IANA language subtag registry lists
take more than 30s to compile
• due to no optimizations initialization is actually not as fast as
could be
The new method uses a plain C-style array of structs with `char
const *` entries for the initial list. The initialization method then
copies the entries from that list to the actual container, again using
`std::emplace_back(…)`.
This yields sub-1s compilation times even with the longest file, the
ISO-639 language list, and the runtime initialization is actually
faster.
The actual file modification was executed (truncating before the last
void element), but the internal representation wasn't updated. This
lead to following validity checks to fail as what was expected to be
in the file didn't match what actually was in the file.
Part of the fix of #3325.
When replacing an element with a new one, the new one might be exactly
one byte smaller than existing one. In that case an EBML void element
cannot be written after the new element as a void element's minimum
size is two bytes (one byte ID, one byte "size" field).
So far the strategy to deal with those was to force the new element's
"size" field to be one byte larger than it needs to be, therefore
covering that one byte after where its data would have ended had the
minimum size be used.
Problem is that the "size" field's maximum length is eight bytes. If
the existing element's "size" field is already eight bytes long,
increasing it by one won't work.
However, in the case of the "EBML head" master element this isn't a
problem as that element only ever contains a handful of
elements. Instead of making the "size" field larger, we can easily
reduce its size down to one or two bytes, freeing up up to seven bytes
— which then allows a void element to be written after the new element
as we now have up to eight bytes free after the new head element.
Part of the fix of #3325.
For some stupid reason plain old rake doesn't parallelize task
execution properly (at all?) if there's only one top level
target (e.g. "default"), no matter how high `-j` is set to. drake does
much better.
The class implementing a collapsible group box,
`QgsCollapsibleGroupBox`, was extracted from the QGIS project. It is
licensed under the GNU GPL v2 or later.