[Misc] Replaced const with constexpr where possible

This commit is contained in:
Xphalnos
2025-03-20 21:16:32 +01:00
committed by Radosław Gliński
parent d20620eb5e
commit 5f918ef28d
64 changed files with 191 additions and 190 deletions

View File

@@ -383,7 +383,7 @@ void HidDemoApp::DrawUserInputGetKeystroke(uint32_t user_index, bool poll,
{ui::VirtualKey::kXInputPadRThumbDownLeft, "R Thumb down & left"},
};
const size_t maxLog = 128;
constexpr size_t maxLog = 128;
static std::array<std::forward_list<std::string>, MAX_USERS> event_logs;
static std::array<uint64_t, MAX_USERS> last_event_times = {};

View File

@@ -680,11 +680,11 @@ bool SDLInputDriver::TestSDLVersion() const {
#if SDL_VERSION_ATLEAST(2, 0, 9)
// SDL 2.0.9 or newer is required for simple rumble support and player
// index.
const Uint8 min_patchlevel = 9;
constexpr Uint8 min_patchlevel = 9;
#else
// SDL 2.0.4 or newer is required to read game controller mappings from
// file.
const Uint8 min_patchlevel = 4;
constexpr Uint8 min_patchlevel = 4;
#endif
SDL_version ver = {};