From 45e13b03f372230dbf780f3fa87dd88f388af605 Mon Sep 17 00:00:00 2001 From: arades79 Date: Sat, 11 Feb 2023 13:28:03 -0500 Subject: add static lifetime to constexpr values to force compile time evaluation where possible Signed-off-by: arades79 --- src/core/hle/service/am/applets/applet_software_keyboard.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core/hle/service/am/applets/applet_software_keyboard.cpp') diff --git a/src/core/hle/service/am/applets/applet_software_keyboard.cpp b/src/core/hle/service/am/applets/applet_software_keyboard.cpp index c18236045..962371a99 100644 --- a/src/core/hle/service/am/applets/applet_software_keyboard.cpp +++ b/src/core/hle/service/am/applets/applet_software_keyboard.cpp @@ -1180,7 +1180,7 @@ void SoftwareKeyboard::ReplyChangedStringV2() { .cursor_position{current_cursor_position}, }; - constexpr u8 flag = 0; + constexpr static u8 flag = 0; std::memcpy(reply.data() + REPLY_BASE_SIZE, current_text.data(), current_text.size() * sizeof(char16_t)); @@ -1204,7 +1204,7 @@ void SoftwareKeyboard::ReplyMovedCursorV2() { .cursor_position{current_cursor_position}, }; - constexpr u8 flag = 0; + constexpr static u8 flag = 0; std::memcpy(reply.data() + REPLY_BASE_SIZE, current_text.data(), current_text.size() * sizeof(char16_t)); @@ -1232,7 +1232,7 @@ void SoftwareKeyboard::ReplyChangedStringUtf8V2() { .cursor_position{current_cursor_position}, }; - constexpr u8 flag = 0; + constexpr static u8 flag = 0; std::memcpy(reply.data() + REPLY_BASE_SIZE, utf8_current_text.data(), utf8_current_text.size()); std::memcpy(reply.data() + REPLY_BASE_SIZE + REPLY_UTF8_SIZE, &changed_string_arg, @@ -1257,7 +1257,7 @@ void SoftwareKeyboard::ReplyMovedCursorUtf8V2() { .cursor_position{current_cursor_position}, }; - constexpr u8 flag = 0; + constexpr static u8 flag = 0; std::memcpy(reply.data() + REPLY_BASE_SIZE, utf8_current_text.data(), utf8_current_text.size()); std::memcpy(reply.data() + REPLY_BASE_SIZE + REPLY_UTF8_SIZE, &moved_cursor_arg, -- cgit v1.2.3