mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 14:21:04 +08:00
Enforce parameter case
This commit is contained in:
parent
33e82e1262
commit
cd985e37d2
@ -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: '*'
|
||||
|
@ -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
|
||||
|
@ -41,7 +41,7 @@ namespace sf
|
||||
namespace priv
|
||||
{
|
||||
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>
|
||||
|
@ -36,12 +36,12 @@
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
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)
|
||||
*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>
|
||||
|
@ -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
|
||||
|
@ -31,10 +31,13 @@ constexpr Vector2<T>::Vector2() : x(0), y(0)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wshadow"
|
||||
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
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
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
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user