From 78ea4276ae465d5fdad399029cf72e705c5b1c17 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Fri, 20 Nov 2020 11:58:40 +0100 Subject: [PATCH] Use constexpr for C++ array --- source/views/view_hexeditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/views/view_hexeditor.cpp b/source/views/view_hexeditor.cpp index 8862c92fb..6f0edaa2c 100644 --- a/source/views/view_hexeditor.cpp +++ b/source/views/view_hexeditor.cpp @@ -145,7 +145,7 @@ namespace hex { str += " };"; break; case Language::Cpp: - str += "const std::array data = { "; + str += "constexpr std::array data = { "; for (const auto &byte : buffer) str += hex::format("0x%02x, ", byte);