From 19f8e200211b202724c322e0a8ec74907fd7e528 Mon Sep 17 00:00:00 2001 From: Adrian Conlon Date: Wed, 8 Dec 2021 19:52:53 +0000 Subject: [PATCH] Simplification when using C++20 --- Gaming/src/Game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gaming/src/Game.cpp b/Gaming/src/Game.cpp index a0b2067..eb5a98e 100644 --- a/Gaming/src/Game.cpp +++ b/Gaming/src/Game.cpp @@ -181,7 +181,7 @@ void Game::addJoystick(SDL_Event& e) { auto controller = std::make_shared(which); const auto joystickId = controller->getJoystickId(); m_gameControllers[which] = controller; - SDL_assert(m_mappedControllers.find(joystickId) == m_mappedControllers.end()); + SDL_assert(m_mappedControllers.contains(joystickId)); m_mappedControllers[joystickId] = which; SDL_Log("Joystick device %d added (%zd controllers)", which, m_gameControllers.size()); }