The previous string construction discards two temporary std::string
instances (operator+ returns by value, not by reference), and creates a
std::string that it doesn't need to (the one around key). Instead we can
just append to the end of the initial std::string itself, saving on two
unnecessary created strings.
append() has a const char* overload as well (as does operator+), so we
can just append the key string as is without creating an entire new
string.
We can use a std::string here instead of setting up a scope guard and
manual allocations. We also don't need to care about null-termination,
as c_str() will automatically ensure this is done when passing it into
ini_parse_string().
* fs.mitm: Fix mismatched new[] / delete
Using delete instead of delete[] on a pointer given by new[] is
undefined behaviour.
For memory sources, malloc/free are used because cleaning up is tricky
when data can be either allocated with new (RomfsHeader) or new[]
(metadata).
* set.mitm: Fix mismatched new[] / delete