1
0
mirror of synced 2025-01-18 17:14:13 +01:00

Use constexpr for C++ array

This commit is contained in:
WerWolv 2020-11-20 11:58:40 +01:00
parent 12a36d08e2
commit 78ea4276ae

View File

@ -145,7 +145,7 @@ namespace hex {
str += " };";
break;
case Language::Cpp:
str += "const std::array<unsigned char, " + std::to_string(buffer.size()) + "> data = { ";
str += "constexpr std::array<unsigned char, " + std::to_string(buffer.size()) + "> data = { ";
for (const auto &byte : buffer)
str += hex::format("0x%02x, ", byte);