diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-05-17 11:28:56 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-05-17 21:03:12 +0200 |
commit | 649313625b94e6b879848fc19b607b74375100bf (patch) | |
tree | daa8993fe967cbfdad18aabac1635f7ded1977c2 /scaddins | |
parent | 3a667101987ccbc75024942d779c8c62a4d0a296 (diff) |
New o3tl::temporary to simplify calls of std::modf
...that ignore the out-parameter integral part
Change-Id: I05f07c1a8909023232f8aecf75ea5541d4eb81ca
Reviewed-on: https://gerrit.libreoffice.org/54474
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'scaddins')
-rw-r--r-- | scaddins/source/analysis/financial.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scaddins/source/analysis/financial.cxx b/scaddins/source/analysis/financial.cxx index ccbf0cd02b69..0b66bd873c96 100644 --- a/scaddins/source/analysis/financial.cxx +++ b/scaddins/source/analysis/financial.cxx @@ -19,6 +19,7 @@ #include "analysis.hxx" #include "analysishelper.hxx" +#include <o3tl/temporary.hxx> #include <rtl/math.hxx> using namespace sca::analysis; @@ -366,8 +367,7 @@ double SAL_CALL AnalysisAddIn::getTbillprice( const css::uno::Reference< css::be double fFraction = GetYearFrac( xOpt, nSettle, nMat, 0 ); // method: USA 30/360 - double fDummy; - if( modf( fFraction, &fDummy ) == 0.0 ) + if( modf( fFraction, &o3tl::temporary(double()) ) == 0.0 ) throw css::lang::IllegalArgumentException(); double fRet = 100.0 * ( 1.0 - fDisc * fFraction ); |