Enforce parameter case

This commit is contained in:
Chris Thrasher 2022-10-23 15:17:57 -06:00 committed by Lukas Dürrenberger
parent 33e82e1262
commit cd985e37d2
8 changed files with 28 additions and 18 deletions

View File

@ -14,5 +14,6 @@ Checks: >
CheckOptions: CheckOptions:
- { key: readability-identifier-naming.ClassCase, value: CamelCase } - { key: readability-identifier-naming.ClassCase, value: CamelCase }
- { key: readability-identifier-naming.FunctionCase, value: camelBack } - { key: readability-identifier-naming.FunctionCase, value: camelBack }
- { key: readability-identifier-naming.ParameterCase, value: camelBack }
HeaderFilterRegex: '.*' HeaderFilterRegex: '.*'
WarningsAsErrors: '*' WarningsAsErrors: '*'

View File

@ -102,15 +102,18 @@ struct Vector4
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Construct from 4 vector components /// \brief Construct from 4 vector components
/// ///
/// \param X Component of the 4D vector /// \param x Component of the 4D vector
/// \param Y Component of the 4D vector /// \param y Component of the 4D vector
/// \param Z Component of the 4D vector /// \param z Component of the 4D vector
/// \param W 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 /// \brief Conversion constructor

View File

@ -41,7 +41,7 @@ namespace sf
namespace priv namespace priv
{ {
template <class InputIt, class OutputIt> template <class InputIt, class OutputIt>
OutputIt copy(InputIt first, InputIt last, OutputIt d_first); OutputIt copy(InputIt first, InputIt last, OutputIt dFirst);
} }
template <unsigned int N> template <unsigned int N>

View File

@ -36,12 +36,12 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
template <typename InputIt, typename OutputIt> template <typename InputIt, typename OutputIt>
OutputIt priv::copy(InputIt first, InputIt last, OutputIt d_first) OutputIt priv::copy(InputIt first, InputIt last, OutputIt dFirst)
{ {
while (first != last) while (first != last)
*d_first++ = static_cast<typename OutputIt::container_type::value_type>(*first++); *dFirst++ = static_cast<typename OutputIt::container_type::value_type>(*first++);
return d_first; return dFirst;
} }
template <typename In> template <typename In>

View File

@ -54,11 +54,11 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Construct the vector from cartesian coordinates /// \brief Construct the vector from cartesian coordinates
/// ///
/// \param X X coordinate /// \param x X coordinate
/// \param Y Y 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 /// \brief Construct the vector from another type of vector

View File

@ -31,10 +31,13 @@ constexpr Vector2<T>::Vector2() : x(0), y(0)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
template <typename T> template <typename T>
constexpr Vector2<T>::Vector2(T X, T Y) : x(X), y(Y) constexpr Vector2<T>::Vector2(T x, T y) : x(x), y(y)
{ {
} }
#pragma GCC diagnostic pop
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -51,12 +51,12 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Construct the vector from its coordinates /// \brief Construct the vector from its coordinates
/// ///
/// \param X X coordinate /// \param x X coordinate
/// \param Y Y coordinate /// \param y Y coordinate
/// \param Z Z 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 /// \brief Construct the vector from another type of vector

View File

@ -31,10 +31,13 @@ constexpr Vector3<T>::Vector3() : x(0), y(0), z(0)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
template <typename T> template <typename T>
constexpr Vector3<T>::Vector3(T X, T Y, T Z) : x(X), y(Y), z(Z) constexpr Vector3<T>::Vector3(T x, T y, T z) : x(x), y(y), z(z)
{ {
} }
#pragma GCC diagnostic pop
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////