From 36b3b357fe2a882db6a5f5a006239e16200fb847 Mon Sep 17 00:00:00 2001 From: Noel Date: Thu, 12 Nov 2020 16:10:56 +0200 Subject: replace std::min(std::max()) with std::clamp Change-Id: I76e34e8020d98292e8ffde387542b7029f85a42d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105754 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sdext/source/presenter/PresenterScrollBar.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sdext') diff --git a/sdext/source/presenter/PresenterScrollBar.cxx b/sdext/source/presenter/PresenterScrollBar.cxx index 6aab45820c42..d811c92cfaa0 100644 --- a/sdext/source/presenter/PresenterScrollBar.cxx +++ b/sdext/source/presenter/PresenterScrollBar.cxx @@ -659,7 +659,7 @@ void PresenterVerticalScrollBar::UpdateBorders() else { const double nThumbSize = ::std::min(mnThumbSize,mnTotalSize); - const double nThumbPosition = ::std::min(::std::max(0.0,mnThumbPosition), mnTotalSize - nThumbSize); + const double nThumbPosition = ::std::clamp(mnThumbPosition, 0.0, mnTotalSize - nThumbSize); maBox[Thumb] = geometry::RealRectangle2D( 0, nThumbPosition / mnTotalSize * nPagerHeight, aWindowBox.Width, -- cgit b/libreoffice-5-1 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author