wiArchive improvements: (#362)

- strings will be written without terminator
- ability to open from memory mapped pointer
- ability to save into header file
- refactors, comments
This commit is contained in:
Turánszki János
2021-11-25 18:16:17 +01:00
committed by GitHub
parent 08c1046214
commit 146e88f866
6 changed files with 99 additions and 64 deletions
+5 -1
View File
@@ -927,9 +927,13 @@ namespace wiHelper
ss << "const uint8_t " << dataName << "[] = {";
for (size_t i = 0; i < size; ++i)
{
if (i % 32 == 0)
{
ss << std::endl;
}
ss << (uint32_t)data[i] << ",";
}
ss << "};" << std::endl;
ss << std::endl << "};" << std::endl;
return FileWrite(dst_filename, (uint8_t*)ss.str().c_str(), ss.str().length());
}