summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-08-12 12:54:25 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2024-08-12 15:01:38 +0200
commit278cfa9b3042eefe921ee85531f1bbf485a4a76f (patch)
tree16ccb272546eb372a611f72692822b7a15ffe52b /sc
parent883febd60593e8a3c0c85c9859006cc0a35b10c2 (diff)
Simplify a bit
Change-Id: Iff0e31d1f8a9bab30e10164b974622395993b203 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171767 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/inc/interpre.hxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 954fe092d39a..1630e8c6b794 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -1161,12 +1161,9 @@ inline bool ScInterpreter::MustHaveParamCount( short nAct, short nMust )
inline bool ScInterpreter::MustHaveParamCount( short nAct, short nMust, short nMax )
{
- if ( nMust <= nAct && nAct <= nMax )
- return true;
- if ( nAct < nMust )
- PushParameterExpected();
- else
- PushIllegalParameter();
+ if (nAct <= nMax)
+ return MustHaveParamCountMin(nAct, nMust);
+ PushIllegalParameter();
return false;
}