summaryrefslogtreecommitdiff
path: root/include/basegfx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2021-06-17 15:15:21 +0900
committerTomaž Vajngerl <quikee@gmail.com>2021-06-17 09:30:44 +0200
commit270c5ba6f573f3b45828694149a6574d363b2094 (patch)
tree542ea8c03feaf05eda9c8c965b385ab02709c125 /include/basegfx
parent3f5311271ea6e41583c581b8a0172e322f5a179a (diff)
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@gmail.com>
Diffstat (limited to 'include/basegfx')
-rw-r--r--include/basegfx/tuple/Tuple2D.hxx12
1 files changed, 4 insertions, 8 deletions
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);