[Libreoffice-commits] core.git: include/basegfx
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jun 17 07:31:26 UTC 2021
include/basegfx/tuple/Tuple2D.hxx | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
New commits:
commit 270c5ba6f573f3b45828694149a6574d363b2094
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Thu Jun 17 15:15:21 2021 +0900
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Thu Jun 17 09:30:44 2021 +0200
basegfx: change template param to use int instead bool - Tuple2D
Change-Id: I82bf089ea95fc3b2b527aa55cc8c9f09aa684502
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117353
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/include/basegfx/tuple/Tuple2D.hxx b/include/basegfx/tuple/Tuple2D.hxx
index e38dd1542207..2007732543b6 100644
--- a/include/basegfx/tuple/Tuple2D.hxx
+++ b/include/basegfx/tuple/Tuple2D.hxx
@@ -75,29 +75,25 @@ public:
// comparators with tolerance
- template <typename T = TYPE,
- typename std::enable_if<std::is_integral<T>::value, bool>::type = false>
+ template <typename T = TYPE, std::enable_if_t<std::is_integral_v<T>, int> = 0>
bool equal(const Tuple2D<TYPE>& rTup) const
{
return mfX == rTup.mfX && mfY == rTup.mfY;
}
- template <typename T = TYPE,
- typename std::enable_if<std::is_floating_point<T>::value, bool>::type = false>
+ template <typename T = TYPE, std::enable_if_t<std::is_floating_point_v<T>, int> = 0>
bool equal(const Tuple2D<TYPE>& rTup) const
{
return this == &rTup || (fTools::equal(mfX, rTup.mfX) && fTools::equal(mfY, rTup.mfY));
}
- template <typename T = TYPE,
- typename std::enable_if<std::is_integral<T>::value, bool>::type = false>
+ template <typename T = TYPE, std::enable_if_t<std::is_integral_v<T>, int> = 0>
bool equalZero() const
{
return mnX == 0 && mnY == 0;
}
- template <typename T = TYPE,
- typename std::enable_if<std::is_floating_point<T>::value, bool>::type = false>
+ template <typename T = TYPE, std::enable_if_t<std::is_floating_point_v<T>, int> = 0>
bool equalZero() const
{
return fTools::equalZero(mfX) && fTools::equalZero(mfY);
More information about the Libreoffice-commits
mailing list