[Libreoffice-commits] core.git: sc/source
Takeshi Abe
tabe at fixedpoint.jp
Sat Apr 15 21:05:44 UTC 2017
sc/source/core/tool/interpr3.cxx | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
New commits:
commit 4e29d2258c88f6127c2dac2ff7e755b063a76aa7
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Fri Apr 14 12:18:40 2017 +0900
sc: Skip redundant check of emptiness
Change-Id: I65f87b03588f6542cfd5597e753c1a161e1ccfce
Reviewed-on: https://gerrit.libreoffice.org/36544
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index 8502f1e76fa7..5bd341edd4ca 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -3286,7 +3286,7 @@ void ScInterpreter::ScSkewp()
double ScInterpreter::GetMedian( vector<double> & rArray )
{
size_t nSize = rArray.size();
- if (rArray.empty() || nSize == 0 || nGlobalError != FormulaError::NONE)
+ if (nSize == 0 || nGlobalError != FormulaError::NONE)
{
SetError( FormulaError::NoValue);
return 0.0;
@@ -3386,7 +3386,7 @@ void ScInterpreter::ScPercentile( bool bInclusive )
}
vector<double> aArray;
GetNumberSequenceArray( 1, aArray, false );
- if ( aArray.empty() || aArray.size() == 0 || nGlobalError != FormulaError::NONE )
+ if ( aArray.empty() || nGlobalError != FormulaError::NONE )
{
SetError( FormulaError::NoValue );
return;
@@ -3409,7 +3409,7 @@ void ScInterpreter::ScQuartile( bool bInclusive )
}
vector<double> aArray;
GetNumberSequenceArray( 1, aArray, false );
- if ( aArray.empty() || aArray.size() == 0 || nGlobalError != FormulaError::NONE )
+ if ( aArray.empty() || nGlobalError != FormulaError::NONE )
{
SetError( FormulaError::NoValue );
return;
@@ -3428,7 +3428,7 @@ void ScInterpreter::ScModalValue()
vector<double> aSortArray;
GetSortArray( nParamCount, aSortArray, nullptr, false, false );
SCSIZE nSize = aSortArray.size();
- if (aSortArray.empty() || nSize == 0 || nGlobalError != FormulaError::NONE)
+ if (nSize == 0 || nGlobalError != FormulaError::NONE)
PushNoValue();
else
{
@@ -3483,7 +3483,7 @@ void ScInterpreter::CalculateSmallLarge(bool bSmall)
* we may or will need a real sorted array again, see #i32345. */
GetNumberSequenceArray(1, aSortArray, false );
SCSIZE nSize = aSortArray.size();
- if (aSortArray.empty() || nSize == 0 || nGlobalError != FormulaError::NONE || nSize < k)
+ if (nSize == 0 || nGlobalError != FormulaError::NONE || nSize < k)
PushNoValue();
else
{
@@ -3519,7 +3519,7 @@ void ScInterpreter::ScPercentrank( bool bInclusive )
vector<double> aSortArray;
GetSortArray( 1, aSortArray, nullptr, false, false );
SCSIZE nSize = aSortArray.size();
- if ( aSortArray.empty() || nSize == 0 || nGlobalError != FormulaError::NONE )
+ if ( nSize == 0 || nGlobalError != FormulaError::NONE )
PushNoValue();
else
{
@@ -3612,7 +3612,7 @@ void ScInterpreter::ScTrimMean()
vector<double> aSortArray;
GetSortArray( 1, aSortArray, nullptr, false, false );
SCSIZE nSize = aSortArray.size();
- if (aSortArray.empty() || nSize == 0 || nGlobalError != FormulaError::NONE)
+ if (nSize == 0 || nGlobalError != FormulaError::NONE)
PushNoValue();
else
{
@@ -3857,7 +3857,7 @@ void ScInterpreter::ScRank( bool bAverage )
GetSortArray( 1, aSortArray, nullptr, false, false );
double fVal = GetDouble();
SCSIZE nSize = aSortArray.size();
- if ( aSortArray.empty() || nSize == 0 || nGlobalError != FormulaError::NONE )
+ if ( nSize == 0 || nGlobalError != FormulaError::NONE )
PushNoValue();
else
{
More information about the Libreoffice-commits
mailing list