diff --git a/.clang-tidy b/.clang-tidy index a2aed26..a499815 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -9,7 +9,6 @@ Checks: > portability-*, readability-*, -bugprone-easily-swappable-parameters, - -cppcoreguidelines-avoid-c-arrays, -cppcoreguidelines-avoid-magic-numbers, -cppcoreguidelines-avoid-non-const-global-variables, -cppcoreguidelines-pro-bounds-constant-array-index, @@ -18,7 +17,6 @@ Checks: > -cppcoreguidelines-pro-type-union-access, -cppcoreguidelines-special-member-functions, -misc-non-private-member-variables-in-classes, - -modernize-avoid-c-arrays, -modernize-use-trailing-return-type, -performance-no-int-to-ptr, -readability-braces-around-statements, diff --git a/imgui-SFML.cpp b/imgui-SFML.cpp index 354caf1..9fca677 100644 --- a/imgui-SFML.cpp +++ b/imgui-SFML.cpp @@ -178,10 +178,10 @@ struct WindowContext { bool windowHasFocus; bool mouseMoved{false}; - bool mousePressed[3] = {false}; + std::array mousePressed{}; ImGuiMouseCursor lastCursor{ImGuiMouseCursor_COUNT}; - bool touchDown[3] = {false}; + std::array touchDown{}; sf::Vector2i touchPos; unsigned int joystickId{getConnectedJoystickId()}; @@ -299,7 +299,7 @@ void ProcessEvent(const sf::Window& window, const sf::Event& event) { const int button = static_cast(event.mouseButton.button); if (button >= 0 && button < 3) { if (event.type == sf::Event::MouseButtonPressed) { - s_currWindowCtx->mousePressed[static_cast(event.mouseButton.button)] = + s_currWindowCtx->mousePressed[static_cast(event.mouseButton.button)] = true; io.AddMouseButtonEvent(button, true); } else {