From f84234cede03e2f85ad76a7eaa237a81b66b2ece Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Mon, 25 Apr 2022 01:30:22 +0200 Subject: [PATCH] Remove redundant const --- src/dynafunc_maker.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/dynafunc_maker.cpp b/src/dynafunc_maker.cpp index b43f6ce..a7c67e8 100644 --- a/src/dynafunc_maker.cpp +++ b/src/dynafunc_maker.cpp @@ -42,10 +42,11 @@ namespace wren { extern "C" const char g_dynafunc_end[]; const unsigned int g_dynafunc_len = g_dynafunc_end - g_dynafunc; - const constexpr unsigned int g_dynafunc_ptr1_size = ASM_PTR_SIZE; - const constexpr unsigned int g_dynafunc_ptr2_size = ASM_FUNC_PTR_SIZE; - const constexpr unsigned char g_dynafunc_ptr1[] = {0xef, 0xbe, 0xad, 0xde, 0xef, 0xbe, 0xad, 0xde}; - const constexpr unsigned char g_dynafunc_ptr2[] = {0x0d, 0xf0, 0xdd, 0xe0, 0xfe, 0x0f, 0xdc, 0xba}; + constexpr unsigned int g_dynafunc_ptr1_size = ASM_PTR_SIZE; + constexpr unsigned int g_dynafunc_ptr2_size = ASM_FUNC_PTR_SIZE; + constexpr unsigned char g_dynafunc_ptr1[] = {0xef, 0xbe, 0xad, 0xde, 0xef, 0xbe, 0xad, 0xde}; + constexpr unsigned char g_dynafunc_ptr2[] = {0x0d, 0xf0, 0xdd, 0xe0, 0xfe, 0x0f, 0xdc, 0xba}; + static_assert(sizeof(g_dynafunc_ptr1) / sizeof(g_dynafunc_ptr1[0]) >= g_dynafunc_ptr1_size); static_assert(sizeof(g_dynafunc_ptr2) / sizeof(g_dynafunc_ptr2[0]) >= g_dynafunc_ptr2_size);