diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-25 16:31:42 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-25 16:52:30 +0100 |
commit | c59a5b81e9521a92587e701bcad82bf643b00493 (patch) | |
tree | b08b97f67c53e6ec1b3cae06cd19ebac2ca15cea /sc/source/core/tool/interpr3.cxx | |
parent | Blind fix for pre-C++14 std::equal, for now (diff) | |
download | core-c59a5b81e9521a92587e701bcad82bf643b00493.tar.gz core-c59a5b81e9521a92587e701bcad82bf643b00493.zip |
tdf#120703 PVS: V560 A part of conditional expression is always true/false
Change-Id: I8d98aa7dd77fbd79611b8a4aba77e8c378fd1cae
Reviewed-on: https://gerrit.libreoffice.org/63981
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sc/source/core/tool/interpr3.cxx')
-rw-r--r-- | sc/source/core/tool/interpr3.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx index 56078ea0b915..ac980b7257da 100644 --- a/sc/source/core/tool/interpr3.cxx +++ b/sc/source/core/tool/interpr3.cxx @@ -218,7 +218,7 @@ double ScInterpreter::gauss(double x) 0.00000000011301172, 0.00000000000511243, -0.00000000000021218 }; nVal = taylor(t0, 11, (xAbs * xAbs)) * xAbs; } - else if ((xShort >= 1) && (xShort <= 2)) + else if (xShort <= 2) { static const double t2[] = { 0.47724986805182079, 0.05399096651318805, -0.05399096651318805, @@ -231,7 +231,7 @@ double ScInterpreter::gauss(double x) -0.00000000000172127, -0.00000000000008634, 0.00000000000007894 }; nVal = taylor(t2, 23, (xAbs - 2.0)); } - else if ((xShort >= 3) && (xShort <= 4)) + else if (xShort <= 4) { static const double t4[] = { 0.49996832875816688, 0.00013383022576489, -0.00026766045152977, @@ -4083,7 +4083,7 @@ void ScInterpreter::ScRank( bool bAverage ) double fFirstPos = -1.0; bool bFinished = false; SCSIZE i; - for ( i = 0; i < nSize && !bFinished && nGlobalError == FormulaError::NONE; i++ ) + for (i = 0; i < nSize && !bFinished; i++) { if ( aSortArray[ i ] == fVal ) { |