Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/TGUI/AbsoluteOrRelativeValue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace tgui
///
/// @param constant Value to set
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <typename T, typename = typename std::enable_if_t<std::is_arithmetic<T>::value, T>>
template <typename T, typename = typename std::enable_if_t<std::is_arithmetic_v<T>, T>>
constexpr AbsoluteOrRelativeValue(T constant) :
m_constant{true},
m_value{static_cast<float>(constant)}
Expand Down
4 changes: 0 additions & 4 deletions include/TGUI/DefaultFont.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,7 @@ from Tavmjong Bah. For further information, contact: tavmjong @ free
*/

// DejaVuSans font
#ifdef __cpp_inline_variables
static inline const unsigned char defaultFontBytes[] = {
#else
static const unsigned char defaultFontBytes[] = {
#endif
0, 1, 0, 0, 0, 19, 1, 0, 0, 4, 0, 48, 70, 70, 84, 77, 96, 220, 152, 54, 0, 0, 1, 60, 0,
0, 0, 28, 71, 68, 69, 70, 131, 92, 125, 80, 0, 0, 1, 88, 0, 0, 2, 148, 71, 80, 79, 83, 40, 255,
158, 147, 0, 0, 3, 236, 0, 0, 152, 52, 71, 83, 85, 66, 24, 176, 110, 135, 0, 0, 156, 32, 0, 0, 21,
Expand Down
14 changes: 7 additions & 7 deletions include/TGUI/Duration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,19 +172,19 @@ namespace tgui
return {std::chrono::nanoseconds(lhs) - std::chrono::nanoseconds(rhs)};
}

template <typename T, typename = typename std::enable_if_t<std::is_arithmetic<T>::value, T>>
template <typename T, typename = typename std::enable_if_t<std::is_arithmetic_v<T>, T>>
[[nodiscard]] constexpr Duration operator*(const Duration& lhs, T rhs)
{
return {std::chrono::nanoseconds(lhs) * rhs};
}

template <typename T, typename = typename std::enable_if_t<std::is_arithmetic<T>::value, T>>
template <typename T, typename = typename std::enable_if_t<std::is_arithmetic_v<T>, T>>
[[nodiscard]] constexpr Duration operator*(T lhs, const Duration& rhs)
{
return {lhs * std::chrono::nanoseconds(rhs)};
}

template <typename T, typename = typename std::enable_if_t<std::is_arithmetic<T>::value, T>>
template <typename T, typename = typename std::enable_if_t<std::is_arithmetic_v<T>, T>>
[[nodiscard]] constexpr Duration operator/(const Duration& lhs, T rhs)
{
return {std::chrono::nanoseconds(lhs) / rhs};
Expand All @@ -195,7 +195,7 @@ namespace tgui
return lhs.asSeconds() / rhs.asSeconds();
}

template <typename T, typename = typename std::enable_if_t<std::is_arithmetic<T>::value, T>>
template <typename T, typename = typename std::enable_if_t<std::is_arithmetic_v<T>, T>>
[[nodiscard]] constexpr Duration operator%(const Duration& lhs, T rhs)
{
return {std::chrono::nanoseconds(lhs) % rhs};
Expand All @@ -218,19 +218,19 @@ namespace tgui
return lhs = lhs - rhs;
}

template <typename T, typename = typename std::enable_if_t<std::is_arithmetic<T>::value, T>>
template <typename T, typename = typename std::enable_if_t<std::is_arithmetic_v<T>, T>>
constexpr Duration& operator*=(Duration& lhs, T rhs)
{
return lhs = lhs * rhs;
}

template <typename T, typename = typename std::enable_if_t<std::is_arithmetic<T>::value, T>>
template <typename T, typename = typename std::enable_if_t<std::is_arithmetic_v<T>, T>>
constexpr Duration& operator/=(Duration& lhs, T rhs)
{
return lhs = lhs / rhs;
}

template <typename T, typename = typename std::enable_if_t<std::is_arithmetic<T>::value, T>>
template <typename T, typename = typename std::enable_if_t<std::is_arithmetic_v<T>, T>>
constexpr Duration& operator%=(Duration& lhs, T rhs)
{
return lhs = lhs % rhs;
Expand Down
2 changes: 1 addition & 1 deletion include/TGUI/Layout.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ namespace tgui
///
/// @param constant Value of the layout
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <typename T, typename = typename std::enable_if_t<std::is_arithmetic<T>::value, T>>
template <typename T, typename = typename std::enable_if_t<std::is_arithmetic_v<T>, T>>
Layout(T constant) :
m_value{static_cast<float>(constant)}
{
Expand Down
2 changes: 1 addition & 1 deletion include/TGUI/ObjectConverter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ namespace tgui
///
/// @param number Number to store
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <typename T, typename = typename std::enable_if_t<std::is_arithmetic<T>::value, T>>
template <typename T, typename = typename std::enable_if_t<std::is_arithmetic_v<T>, T>>
ObjectConverter(T number) :
m_type{Type::Number},
m_value{static_cast<float>(number)}
Expand Down
2 changes: 1 addition & 1 deletion include/TGUI/Outline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace tgui
///
/// @param size Width and height of the outline in all directions
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <typename T, typename = typename std::enable_if_t<std::is_arithmetic<T>::value, T>>
template <typename T, typename = typename std::enable_if_t<std::is_arithmetic_v<T>, T>>
constexpr Outline(T size) :
m_left{size},
m_top{size},
Expand Down
4 changes: 2 additions & 2 deletions include/TGUI/ScopeExit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace tgui
class ScopeExit
{
public:
template <typename G, typename = typename std::enable_if<!std::is_same<typename std::decay<G>::type, ScopeExit>::value>::type>
template <typename G, typename = typename std::enable_if<!std::is_same_v<typename std::decay<G>::type, ScopeExit>>::type>
explicit ScopeExit(G&& func) :
m_func(std::forward<G>(func)),
m_active(true)
Expand All @@ -51,7 +51,7 @@ namespace tgui
ScopeExit& operator=(const ScopeExit&) = delete;
ScopeExit& operator=(ScopeExit&&) = delete;

ScopeExit(ScopeExit&& other) noexcept(std::is_nothrow_move_constructible<F>::value) :
ScopeExit(ScopeExit&& other) noexcept(std::is_nothrow_move_constructible_v<F>) :
m_func(std::move(other.m_func)),
m_active(other.m_active)
{
Expand Down
Loading
Loading