tools/source/generic/fract.cxx |   16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

New commits:
commit d266373bbb48f1c4c481fac74727c7b17440f7bd
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Mon Apr 5 13:43:28 2021 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Mon Apr 5 13:43:55 2021 +0200

    Use std::gcd instead of boost version
    
    Change-Id: Iba3bd7cbab01a99f46e7b2f5632fd3b11e70458d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113598
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/tools/source/generic/fract.cxx b/tools/source/generic/fract.cxx
index a76ce01e1f81..6e245530281a 100644
--- a/tools/source/generic/fract.cxx
+++ b/tools/source/generic/fract.cxx
@@ -26,13 +26,8 @@
 
 #include <algorithm>
 #include <cmath>
+#include <numeric>
 
-#include <boost/version.hpp>
-#if BOOST_VERSION >= 106700
-#include <boost/integer/common_factor_rt.hpp>
-#else
-#include <boost/math/common_factor_rt.hpp>
-#endif
 #include <boost/rational.hpp>
 
 #ifdef _MSC_VER
@@ -172,13 +167,8 @@ namespace
         T den = r.denominator();
 
         // Avoid overflow and preserve normalization
-#if BOOST_VERSION >= 106700
-        T gcd1 = boost::integer::gcd(i.numerator(), den);
-        T gcd2 = boost::integer::gcd(num, i.denominator());
-#else
-        T gcd1 = boost::math::gcd(i.numerator(), den);
-        T gcd2 = boost::math::gcd(num, i.denominator());
-#endif
+        T gcd1 = std::gcd(i.numerator(), den);
+        T gcd2 = std::gcd(num, i.denominator());
 
         bool fail = false;
         fail |= o3tl::checked_multiply(i.numerator() / gcd1, num / gcd2, num);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to