Skip to content

Commit

Permalink
Silence a few more warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio committed Aug 19, 2024
1 parent 5072f0e commit ff8fa36
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Checks: >
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-init-variables,
-cppcoreguidelines-macro-to-enum,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-narrowing-conversions,
-cppcoreguidelines-non-private-member-variables-in-classes,
Expand Down
4 changes: 2 additions & 2 deletions ql/cashflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ namespace QuantLib {
// specified in the settings (if any)
ext::optional<bool> includeToday =
Settings::instance().includeTodaysCashFlows();
if (includeToday) // NOLINT(readability-implicit-bool-conversion)
includeRefDate = *includeToday;
if (includeToday.has_value())
includeRefDate = includeToday;
}
return Event::hasOccurred(refDate, includeRefDate);
}
Expand Down
2 changes: 1 addition & 1 deletion ql/experimental/callablebonds/treecallablebondengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace QuantLib {
}

void TreeCallableFixedRateBondEngine::calculate() const {
return calculateWithSpread(arguments_.spread);
calculateWithSpread(arguments_.spread);
}

void TreeCallableFixedRateBondEngine::calculateWithSpread(Spread s) const {
Expand Down
2 changes: 1 addition & 1 deletion ql/math/matrixutilities/tqreigendecomposition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace QuantLib {
for (Size k=n-1; k >=1; --k) {
while (!offDiagIsZero(k, e)) {
Size l = k;
while (--l > 0 && !offDiagIsZero(l,e));
while (--l > 0 && !offDiagIsZero(l,e)); // NOLINT(bugprone-inc-dec-in-conditions)
iter_++;

Real q = d_[l];
Expand Down
1 change: 0 additions & 1 deletion ql/version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#define QL_VERSION "1.36-dev"

//! version hexadecimal number
// NOLINTNEXTLINE(cppcoreguidelines-macro-to-enum)
#define QL_HEX_VERSION 0x01360000

/*! @} */
Expand Down

0 comments on commit ff8fa36

Please sign in to comment.