History

Ensure a C++ object exists for all static const members of structs or create constexpr functions. - This is an attempt to adhere to the letter of the C++ specification.

arr committed 9 years ago

Commit af5c7a91 parent 4d839d714 files · +86 −64Browse files

Showing the changes to src/include/module_reader.h (1 of 14 files). Show all

Unified · Split

src/include/module_reader.h+3−3
@@ -18,10 +18,10 @@ namespace disvm · 17 unmodified lines
1818 static_assert(sizeof(operand_t) == sizeof(runtime::word_t), "Operand and word should be the same size");
1919 static_assert(sizeof(operand_t) == sizeof(runtime::vm_pc_t), "Operand and VM program counter type should be the same size");
2020
21− struct magic_number_constants final
21+ namespace magic_number_constants
2222 {
23− static const auto xmagic = operand_t{ 819248 }; // Normal module (0xC8030)
24− static const auto smagic = operand_t{ 923426 }; // Signed module (0xE1722)
23+ const auto xmagic = operand_t{ 819248 }; // Normal module (0xC8030)
24+ const auto smagic = operand_t{ 923426 }; // Signed module (0xE1722)
2525 };
2626 }
2727 }