diff --git a/.clang-tidy b/.clang-tidy index db2cc072b..fdcee6086 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -35,7 +35,6 @@ Checks: > -cppcoreguidelines-macro-to-enum, -cppcoreguidelines-macro-usage, -cppcoreguidelines-narrowing-conversions, - -cppcoreguidelines-no-malloc, -cppcoreguidelines-non-private-member-variables-in-classes, -cppcoreguidelines-owning-memory, -cppcoreguidelines-prefer-member-initializer, diff --git a/src/SFML/Window/Unix/WindowImplX11.cpp b/src/SFML/Window/Unix/WindowImplX11.cpp index 83fab6338..3279c7989 100644 --- a/src/SFML/Window/Unix/WindowImplX11.cpp +++ b/src/SFML/Window/Unix/WindowImplX11.cpp @@ -957,8 +957,10 @@ void WindowImplX11::setIcon(const Vector2u& size, const std::uint8_t* pixels) { // X11 wants BGRA pixels: swap red and blue channels // Note: this memory will be freed by X11Ptr deleter + // NOLINTBEGIN(cppcoreguidelines-no-malloc) auto* iconPixels = static_cast( std::malloc(static_cast(size.x) * static_cast(size.y) * 4)); + // NOLINTEND(cppcoreguidelines-no-malloc) for (std::size_t i = 0; i < static_cast(size.x) * static_cast(size.y); ++i) { iconPixels[i * 4 + 0] = pixels[i * 4 + 2];