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:
parent
a2404c42a1
commit
1557e6ab05
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
constexpr int EFB_SCALE_AUTO_INTEGRAL = 0;
|
constexpr int EFB_SCALE_AUTO_INTEGRAL = 0;
|
||||||
|
|
||||||
enum class AspectMode
|
enum class AspectMode : int
|
||||||
{
|
{
|
||||||
Auto,
|
Auto,
|
||||||
AnalogWide,
|
AnalogWide,
|
||||||
|
@ -32,7 +32,7 @@ enum class AspectMode
|
||||||
Stretch,
|
Stretch,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class StereoMode
|
enum class StereoMode : int
|
||||||
{
|
{
|
||||||
Off,
|
Off,
|
||||||
SBS,
|
SBS,
|
||||||
|
|
Loading…
Reference in New Issue