diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-08-26 10:13:29 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-08-28 13:12:59 +0200 |
commit | fd78b325894bf7dc8c300949dcd822a97c2c8f1c (patch) | |
tree | 6f55687b2622e349f369c5150b7a214d54f69f78 /include/comphelper | |
parent | 25552416c07a0841c32d71663cf2df75cbd174ea (diff) |
cid#1606736 silence Overflowed constant
Change-Id: Iedad6ed6e21c6ead9bb923bcb319122a834763f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172513
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'include/comphelper')
-rw-r--r-- | include/comphelper/parallelsort.hxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/comphelper/parallelsort.hxx b/include/comphelper/parallelsort.hxx index 032165f06f0c..fd7bb83b1686 100644 --- a/include/comphelper/parallelsort.hxx +++ b/include/comphelper/parallelsort.hxx @@ -300,6 +300,7 @@ void s3sort(const RandItr aBegin, const RandItr aEnd, Compare aComp = Compare(), auto pOut = std::make_unique<ValueType[]>(nLen); const size_t nBins = lcl_round_down_pow2(nThreadCount); + assert(nBins >= 1); const size_t nOverSamplingFactor = std::max(1.0, std::sqrt(static_cast<double>(nLen) / 64)); const size_t nSamples = nOverSamplingFactor * nBins; auto aSamples = std::make_unique<ValueType[]>(nSamples); |