Skip to content

Commit

Permalink
Automated fixes by clang-tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 8, 2020
1 parent 3f182bb commit 7a794fe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ql/math/integrals/exponentialintegrals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ namespace QuantLib {
for (n=2; n < 1000 && s+sn*nn != s; ++n) {
s+=sn*nn;

if ((n & 1) != 0u)
if ((n & 1) != 0U)
nn += 1/(2.0*(n/2) + 1);

sn *= -z / Real(2*n);
Expand Down
7 changes: 5 additions & 2 deletions ql/pricingengines/vanilla/analytichestonengine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,11 @@ namespace QuantLib {

class AP_Helper {
public:
AP_Helper(Time term, Real fwd, Real strike, ComplexLogFormula cpxLog,
const AnalyticHestonEngine* const enginePtr);
AP_Helper(Time term,
Real fwd,
Real strike,
ComplexLogFormula cpxLog,
const AnalyticHestonEngine* enginePtr);

Real operator()(Real u) const;
Real controlVariateValue() const;
Expand Down
3 changes: 1 addition & 2 deletions test-suite/hestonmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3241,8 +3241,7 @@ void HestonModelTest::testAsymptoticControlVariate() {
const ext::shared_ptr<AnalyticHestonEngine> analyticHestonEngine =
ext::dynamic_pointer_cast<AnalyticHestonEngine>(engine);

if (analyticHestonEngine
&& analyticHestonEngine->numberOfEvaluations() > 5000) {
if ((analyticHestonEngine != 0) && analyticHestonEngine->numberOfEvaluations() > 5000) {
BOOST_ERROR("too many function valuation needed "
<< "\n moneyness : " << moneyness
<< "\n evaluations : "
Expand Down

0 comments on commit 7a794fe

Please sign in to comment.