Skip to content

Commit

Permalink
OGRE_FALLTHROUGH for MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenegff committed Sep 20, 2024
1 parent e6408c5 commit 681973d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion OgreMain/include/OgrePrerequisites.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ namespace Ogre

#define OGRE_UNUSED_VAR( x ) ( (void)x )

#if __cplusplus >= 201703L
#if __cplusplus >= 201703L || defined( _MSVC_LANG ) && _MSVC_LANG >= 201703L
# define OGRE_FALLTHROUGH [[fallthrough]]
#else
# if OGRE_COMPILER == OGRE_COMPILER_CLANG
Expand Down
7 changes: 1 addition & 6 deletions RenderSystems/Direct3D11/src/OgreD3D11Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,8 @@ namespace Ogre
char tmp[64];
sprintf( tmp, "deviceRemovedReason = 0x%08X\n", (unsigned)deviceRemovedReason );
res.append( tmp );
OGRE_FALLTHROUGH;
}
// No 'break', fallthrough to the next switch statement
#if OGRE_COMPILER == OGRE_COMPILER_GNUC || OGRE_COMPILER == OGRE_COMPILER_CLANG
__attribute__( ( fallthrough ) );
#elif __cplusplus >= 201703L
[[fallthrough]];
#endif
default:
{
char tmp[64];
Expand Down

0 comments on commit 681973d

Please sign in to comment.