Mark functions as static

This commit is contained in:
Michał Janiszewski committed 2019-02-10 00:20:34 +01:00
1 parent 379fd42dc4
commit 838289abce
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -23,7 +23,7 @@ namespace Numerics
* @param shift positions to shift
* @return rotated value
*/
template<typename _UIntType> constexpr _UIntType rol(_UIntType x, size_t shift)
template<typename _UIntType> static constexpr _UIntType rol(_UIntType x, size_t shift)
{
static_assert(std::is_unsigned<_UIntType>::value, "result_type must be an unsigned integral type");
using limits = typename std::numeric_limits<_UIntType>;
@@ -37,7 +37,7 @@ namespace Numerics
* @param shift positions to shift
* @return rotated value
*/
template<typename _UIntType> constexpr _UIntType ror(_UIntType x, size_t shift)
template<typename _UIntType> static constexpr _UIntType ror(_UIntType x, size_t shift)
{
static_assert(std::is_unsigned<_UIntType>::value, "result_type must be an unsigned integral type");
using limits = std::numeric_limits<_UIntType>;
+1 -1
View File
@@ -164,7 +164,7 @@ typedef uint8_t Direction;
* Given a direction, return the direction that points the other way,
* on the same axis.
*/
constexpr Direction direction_reverse(Direction dir)
[[maybe_unused]] static constexpr Direction direction_reverse(Direction dir)
{
return dir ^ 2;
}