diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-04-14 12:50:42 +0500 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-04-15 06:34:33 +0200 |
commit | 690526f95e3ee4fd25bb2c987e093543e4bc435b (patch) | |
tree | 06b6bb7b6c907fb1876eac1e60b7dac952b21f7b /basegfx | |
parent | 1dc92b9e9951ef118d2d823d54f9a022c2e41a27 (diff) |
Generalize basegfx::fround for templated return type
And use it when assigning to tools::Long
Change-Id: I0814d7bac9cdd48191ba69c64e3b12a4973b3417
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166071
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'basegfx')
-rw-r--r-- | basegfx/source/curve/b2dcubicbezier.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/basegfx/source/curve/b2dcubicbezier.cxx b/basegfx/source/curve/b2dcubicbezier.cxx index fa7b69e1e5e8..3f5d87aa79f6 100644 --- a/basegfx/source/curve/b2dcubicbezier.cxx +++ b/basegfx/source/curve/b2dcubicbezier.cxx @@ -1011,33 +1011,33 @@ namespace basegfx if(maControlPointA == maStartPoint) { maControlPointA = maStartPoint = basegfx::B2DPoint( - basegfx::fround(maStartPoint.getX()), - basegfx::fround(maStartPoint.getY())); + std::round(maStartPoint.getX()), + std::round(maStartPoint.getY())); } else { maStartPoint = basegfx::B2DPoint( - basegfx::fround(maStartPoint.getX()), - basegfx::fround(maStartPoint.getY())); + std::round(maStartPoint.getX()), + std::round(maStartPoint.getY())); maControlPointA = basegfx::B2DPoint( - basegfx::fround(maControlPointA.getX()), - basegfx::fround(maControlPointA.getY())); + std::round(maControlPointA.getX()), + std::round(maControlPointA.getY())); } if(maControlPointB == maEndPoint) { maControlPointB = maEndPoint = basegfx::B2DPoint( - basegfx::fround(maEndPoint.getX()), - basegfx::fround(maEndPoint.getY())); + std::round(maEndPoint.getX()), + std::round(maEndPoint.getY())); } else { maEndPoint = basegfx::B2DPoint( - basegfx::fround(maEndPoint.getX()), - basegfx::fround(maEndPoint.getY())); + std::round(maEndPoint.getX()), + std::round(maEndPoint.getY())); maControlPointB = basegfx::B2DPoint( - basegfx::fround(maControlPointB.getX()), - basegfx::fround(maControlPointB.getY())); + std::round(maControlPointB.getX()), + std::round(maControlPointB.getY())); } } } // end of namespace basegfx |