diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-04-26 14:46:44 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-04-26 16:24:26 +0200 |
commit | 57087dd1945429d9cfe6ce8bdc329ef315f455d3 (patch) | |
tree | d418d417bb09344f73bde38d73c26d82b077bf54 | |
parent | fa7e4ddb61f79f2c1fd540a1445fd0045175a56d (diff) |
Pick better variable types
Change-Id: Ia4ba19744e23c20d9b6fb0e9d803bc00b415191f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133441
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | scaddins/source/analysis/financial.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scaddins/source/analysis/financial.cxx b/scaddins/source/analysis/financial.cxx index a10696bfdefb..5f40e86e38c8 100644 --- a/scaddins/source/analysis/financial.cxx +++ b/scaddins/source/analysis/financial.cxx @@ -584,16 +584,16 @@ double SAL_CALL AnalysisAddIn::getXnpv( aValList.Append( rValues ); aDateList.Append( rDates ); - sal_Int32 nNum = aValList.Count(); + sal_uInt32 nNum = aValList.Count(); - if( nNum != sal_Int32( aDateList.Count() ) || nNum < 2 ) + if( nNum != aDateList.Count() || nNum < 2 ) throw css::lang::IllegalArgumentException(); double fRet = 0.0; double fNull = aDateList.Get( 0 ); fRate++; - for( sal_Int32 i = 0 ; i < nNum ; i++ ) + for( sal_uInt32 i = 0 ; i < nNum ; i++ ) fRet += aValList.Get( i ) / ( pow( fRate, ( aDateList.Get( i ) - fNull ) / 365.0 ) ); RETURN_FINITE( fRet ); |