diff --git a/.clang-tidy b/.clang-tidy index 61118dfa3..f67f748b2 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -14,5 +14,6 @@ Checks: > CheckOptions: - { key: readability-identifier-naming.ClassCase, value: CamelCase } - { key: readability-identifier-naming.FunctionCase, value: camelBack } + - { key: readability-identifier-naming.ParameterCase, value: camelBack } HeaderFilterRegex: '.*' WarningsAsErrors: '*' diff --git a/include/SFML/Graphics/Glsl.inl b/include/SFML/Graphics/Glsl.inl index 464b02ed6..d391b7b76 100644 --- a/include/SFML/Graphics/Glsl.inl +++ b/include/SFML/Graphics/Glsl.inl @@ -102,15 +102,18 @@ struct Vector4 //////////////////////////////////////////////////////////// /// \brief Construct from 4 vector components /// - /// \param X Component of the 4D vector - /// \param Y Component of the 4D vector - /// \param Z Component of the 4D vector - /// \param W Component of the 4D vector + /// \param x Component of the 4D vector + /// \param y Component of the 4D vector + /// \param z Component of the 4D vector + /// \param w Component of the 4D vector /// //////////////////////////////////////////////////////////// - Vector4(T X, T Y, T Z, T W) : x(X), y(Y), z(Z), w(W) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wshadow" + Vector4(T x, T y, T z, T w) : x(x), y(y), z(z), w(w) { } +#pragma GCC diagnostic pop //////////////////////////////////////////////////////////// /// \brief Conversion constructor diff --git a/include/SFML/System/Utf.hpp b/include/SFML/System/Utf.hpp index c07c59ccf..954516b51 100644 --- a/include/SFML/System/Utf.hpp +++ b/include/SFML/System/Utf.hpp @@ -41,7 +41,7 @@ namespace sf namespace priv { template -OutputIt copy(InputIt first, InputIt last, OutputIt d_first); +OutputIt copy(InputIt first, InputIt last, OutputIt dFirst); } template diff --git a/include/SFML/System/Utf.inl b/include/SFML/System/Utf.inl index 063981fb5..78ea231fc 100644 --- a/include/SFML/System/Utf.inl +++ b/include/SFML/System/Utf.inl @@ -36,12 +36,12 @@ //////////////////////////////////////////////////////////// template -OutputIt priv::copy(InputIt first, InputIt last, OutputIt d_first) +OutputIt priv::copy(InputIt first, InputIt last, OutputIt dFirst) { while (first != last) - *d_first++ = static_cast(*first++); + *dFirst++ = static_cast(*first++); - return d_first; + return dFirst; } template diff --git a/include/SFML/System/Vector2.hpp b/include/SFML/System/Vector2.hpp index 9374a394b..b12bdb143 100644 --- a/include/SFML/System/Vector2.hpp +++ b/include/SFML/System/Vector2.hpp @@ -54,11 +54,11 @@ public: //////////////////////////////////////////////////////////// /// \brief Construct the vector from cartesian coordinates /// - /// \param X X coordinate - /// \param Y Y coordinate + /// \param x X coordinate + /// \param y Y coordinate /// //////////////////////////////////////////////////////////// - constexpr Vector2(T X, T Y); + constexpr Vector2(T x, T y); //////////////////////////////////////////////////////////// /// \brief Construct the vector from another type of vector diff --git a/include/SFML/System/Vector2.inl b/include/SFML/System/Vector2.inl index b0e78378a..854778d83 100644 --- a/include/SFML/System/Vector2.inl +++ b/include/SFML/System/Vector2.inl @@ -31,10 +31,13 @@ constexpr Vector2::Vector2() : x(0), y(0) //////////////////////////////////////////////////////////// +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wshadow" template -constexpr Vector2::Vector2(T X, T Y) : x(X), y(Y) +constexpr Vector2::Vector2(T x, T y) : x(x), y(y) { } +#pragma GCC diagnostic pop //////////////////////////////////////////////////////////// diff --git a/include/SFML/System/Vector3.hpp b/include/SFML/System/Vector3.hpp index a296c7027..b01719ecc 100644 --- a/include/SFML/System/Vector3.hpp +++ b/include/SFML/System/Vector3.hpp @@ -51,12 +51,12 @@ public: //////////////////////////////////////////////////////////// /// \brief Construct the vector from its coordinates /// - /// \param X X coordinate - /// \param Y Y coordinate - /// \param Z Z coordinate + /// \param x X coordinate + /// \param y Y coordinate + /// \param z Z coordinate /// //////////////////////////////////////////////////////////// - constexpr Vector3(T X, T Y, T Z); + constexpr Vector3(T x, T y, T z); //////////////////////////////////////////////////////////// /// \brief Construct the vector from another type of vector diff --git a/include/SFML/System/Vector3.inl b/include/SFML/System/Vector3.inl index c406a6964..a2626989a 100644 --- a/include/SFML/System/Vector3.inl +++ b/include/SFML/System/Vector3.inl @@ -31,10 +31,13 @@ constexpr Vector3::Vector3() : x(0), y(0), z(0) //////////////////////////////////////////////////////////// +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wshadow" template -constexpr Vector3::Vector3(T X, T Y, T Z) : x(X), y(Y), z(Z) +constexpr Vector3::Vector3(T x, T y, T z) : x(x), y(y), z(z) { } +#pragma GCC diagnostic pop ////////////////////////////////////////////////////////////