summaryrefslogtreecommitdiffstats
path: root/include/o3tl
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-02-15 11:37:34 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-02-15 10:45:49 +0100
commit76483d1348792a3d1c4c995ef0132ac79dfbc90f (patch)
tree49452ba1b1354fec92029469ec5106c85aa1bf86 /include/o3tl
parentsw: prefix members of SwHangingPortion, SwKernPortion, SwTextGuess and ... (diff)
downloadcore-76483d1348792a3d1c4c995ef0132ac79dfbc90f.tar.gz
core-76483d1348792a3d1c4c995ef0132ac79dfbc90f.zip
Fix comments
Change-Id: Id3943df147a204391e206d663e0a71b43ded50a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110895 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/o3tl')
-rw-r--r--include/o3tl/unit_conversion.hxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/o3tl/unit_conversion.hxx b/include/o3tl/unit_conversion.hxx
index e43ecb557789..f377b16e8b10 100644
--- a/include/o3tl/unit_conversion.hxx
+++ b/include/o3tl/unit_conversion.hxx
@@ -50,8 +50,8 @@ enum class Length
// If other categories of units would be needed (like time), a separate scoped enum
// should be created, respective conversion array prepared in detail namespace, and
// respective md(NewUnit, NewUnit) overload introduced, which would allow using
-// o3tl::convert() and o3tl::convertSanitize() with the new category in a type-safe
-// way, without mixing unrelated units.
+// o3tl::convert(), o3tl::convertSaturate() and o3tl::getConversionMulDiv() with the
+// new category in a type-safe way, without mixing unrelated units.
namespace detail
{
@@ -206,7 +206,7 @@ template <typename N, typename U> constexpr auto convert(N n, U from, U to)
}
// Returns nDefault if intermediate multiplication overflows sal_Int64 (only for integral types).
-// On return, bOverflow indicates if overflow happened.
+// On return, bOverflow indicates if overflow happened. nDefault is returned when overflow occurs.
template <typename N, typename U>
constexpr auto convert(N n, U from, U to, bool& bOverflow, sal_Int64 nDefault = 0)
{
@@ -214,7 +214,7 @@ constexpr auto convert(N n, U from, U to, bool& bOverflow, sal_Int64 nDefault =
}
// Conversion with saturation (only for integral types). For too large input returns SAL_MAX_INT64.
-// When intermediate multiplication would overflow, but otherwise result in in sal_Int64 range, the
+// When intermediate multiplication would overflow, but the end result is in sal_Int64 range, the
// precision is decreased because of inversion of multiplication and division.
template <typename N, typename U> constexpr auto convertSaturate(N n, U from, U to)
{