diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-05-20 07:01:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-05-20 07:01:03 +0300 |
commit | 81e584ed17902878579131776b4e5a9f7b54cdab (patch) | |
tree | b69c5e579eaa1c6b40c99a2ad36f75e385f50df3 /source/gameengine/Ketsji | |
parent | 6cd1d34dc1953f007ee16e9673e1d112160fb162 (diff) |
CMake: Use GCC7's -Wimplicit-fallthrough=5
Use to avoid accidental missing break statements,
use ATTR_FALLTHROUGH to suppress.
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r-- | source/gameengine/Ketsji/KX_ObstacleSimulation.cpp | 1 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_SoundActuator.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp b/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp index 239bfde4c98..c84b2474c90 100644 --- a/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp +++ b/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp @@ -345,6 +345,7 @@ static MT_Point3 nearestPointToObstacle(MT_Point3& pos ,KX_Obstacle* obstacle) MT_Point3 res = obstacle->m_pos + abdir*proj; return res; } + ATTR_FALLTHROUGH; } case KX_OBSTACLE_CIRCLE : default: diff --git a/source/gameengine/Ketsji/KX_SoundActuator.cpp b/source/gameengine/Ketsji/KX_SoundActuator.cpp index a27f37c0441..822f2e054f8 100644 --- a/source/gameengine/Ketsji/KX_SoundActuator.cpp +++ b/source/gameengine/Ketsji/KX_SoundActuator.cpp @@ -108,7 +108,7 @@ void KX_SoundActuator::play() case KX_SOUNDACT_LOOPBIDIRECTIONAL: case KX_SOUNDACT_LOOPBIDIRECTIONAL_STOP: sound = AUD_Sound_pingpong(sound); - // fall through + ATTR_FALLTHROUGH; case KX_SOUNDACT_LOOPEND: case KX_SOUNDACT_LOOPSTOP: loop = true; |