diff options
author | Noel <noelgrandin@gmail.com> | 2020-11-12 15:38:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-16 07:53:49 +0100 |
commit | bf4bbc3c2174b21577b8878bc3197923ba44a029 (patch) | |
tree | 22ec4b4da1bc2b86b6b27776fd64fd2b89a9ed3e /tools/source | |
parent | b977a8786ff39f1348bafdbf2dd83e7008ed3086 (diff) |
replace std::max(std::min()) with std::clamp
Change-Id: I890d19f5e2177294dc1175c90c98b964347f9e85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105751
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools/source')
-rw-r--r-- | tools/source/datetime/ttime.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/source/datetime/ttime.cxx b/tools/source/datetime/ttime.cxx index 356f1994ee4c..0049c33efd9d 100644 --- a/tools/source/datetime/ttime.cxx +++ b/tools/source/datetime/ttime.cxx @@ -306,7 +306,7 @@ void tools::Time::GetClock( double fTimeInDays, if (fAbsTimeInDays >= 1.0) { const int nDig = static_cast<int>(ceil( log10( fAbsTimeInDays))); - nDec = std::max( std::min( 10 - nDig, 9), 2); + nDec = std::clamp( 10 - nDig, 2, 9 ); } double fSeconds = rtl::math::round( fRawSeconds, nDec); |