Skip to content

Commit

Permalink
add missing include, don't use std::underlying to keep c++20 compatib…
Browse files Browse the repository at this point in the history
…ility
  • Loading branch information
coornio committed Aug 19, 2024
1 parent 7817b16 commit 31aafc4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Assistants/BasicInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void BasicKeyboard::updateCopy() {
std::copy_n(
std::execution::par_unseq,
SDL_GetKeyboardState(nullptr),
std::to_underlying(SDL_NUM_SCANCODES),
static_cast<Uint32>(SDL_NUM_SCANCODES),
oldState.data()
);
}
Expand Down
1 change: 1 addition & 0 deletions src/Assistants/SHA1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "SHA1.hpp"

#include <bit>
#include <fstream>
#include <sstream>
#include <iomanip>
Expand Down
2 changes: 1 addition & 1 deletion src/GuestClass/Init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ void MEGACORE::prepDisplayArea(const Resolution mode, const bool forced) {
static constexpr s32 sizeW[]{ 0, 128, 64, 64, 64, 256 };
static constexpr s32 sizeH[]{ 0, 64, 32, 64, 128, 192 };

const auto select{ State.schip_legacy ? 1 : std::to_underlying(mode) };
const auto select{ State.schip_legacy ? 1 : static_cast<u32>(mode) };
const auto lores{ mode == Resolution::LO }; isLoresExtended(lores);

const auto W{ sizeW[select] };
Expand Down

0 comments on commit 31aafc4

Please sign in to comment.