Specify underlying types for enums that get casted from integers

Otherwise we might get UB if the value we cast is larger than the
max value of the underlying type that the compiled picked for the enum.

I haven't done any extensive check through Dolphin to find cases
of this, I'm just fixing the cases I already know of.
This commit is contained in:
JosJuice 2018-01-08 12:04:12 +01:00
parent a2404c42a1
commit 1557e6ab05
1 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@
constexpr int EFB_SCALE_AUTO_INTEGRAL = 0;
enum class AspectMode
enum class AspectMode : int
{
Auto,
AnalogWide,
@ -32,7 +32,7 @@ enum class AspectMode
Stretch,
};
enum class StereoMode
enum class StereoMode : int
{
Off,
SBS,