mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 11:43:29 +01:00
removed some warnings
This commit is contained in:
parent
12fe67cc82
commit
a5dca3d370
@ -49,13 +49,13 @@ TEST_CASE( "toString(enum class)", "[toString][enum][enumClass]" ) {
|
||||
enum class EnumClass2 : short { EnumClass2Value0, EnumClass2Value1 };
|
||||
|
||||
inline std::ostream& operator<<( std::ostream& os, EnumClass2 e2 ) {
|
||||
switch( (int)e2 ) {
|
||||
case (int)EnumClass2::EnumClass2Value0:
|
||||
switch( static_cast<int>( e2 ) ) {
|
||||
case static_cast<int>( EnumClass2::EnumClass2Value0 ):
|
||||
return os << "E2/V0";
|
||||
case (int)EnumClass2::EnumClass2Value1:
|
||||
case static_cast<int>( EnumClass2::EnumClass2Value1 ):
|
||||
return os << "E2/V1";
|
||||
default:
|
||||
return os << "Unknown enum value " << (int)e2;
|
||||
return os << "Unknown enum value " << static_cast<int>( e2 );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user