Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ql/instruments/bonds/cpibond.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace QuantLib {
paymentCalendar == Calendar() ? schedule.calendar() : paymentCalendar,
issueDate),
frequency_(schedule.tenor().frequency()), dayCounter_(accrualDayCounter),
growthOnly_(false), baseCPI_(baseCPI), observationLag_(observationLag),
baseCPI_(baseCPI), observationLag_(observationLag),
cpiIndex_(std::move(cpiIndex)), observationInterpolation_(observationInterpolation) {

maturityDate_ = schedule.endDate();
Expand Down
2 changes: 1 addition & 1 deletion ql/instruments/bonds/cpibond.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ namespace QuantLib {
Deprecated in version 1.45.
*/
[[deprecated("Do not use; meaningless for a bond.")]]
bool growthOnly_;
bool growthOnly_ = false;
Real baseCPI_;
Period observationLag_;
ext::shared_ptr<ZeroInflationIndex> cpiIndex_;
Expand Down
2 changes: 1 addition & 1 deletion ql/models/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ namespace QuantLib {
}

void CalibratedModel::setParams(const Array& params) {
auto p = params.begin();
const auto *p = params.begin();
for (auto& argument : arguments_) {
for (Size j = 0; j < argument.size(); ++j, ++p) {
QL_REQUIRE(p!=params.end(),"parameter array too small");
Expand Down
6 changes: 3 additions & 3 deletions ql/models/shortrate/onefactormodels/markovfunctional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ namespace QuantLib {
addAdjustment(KahaleInterpolation);
}

const int smileTreatments = ((adjustments_ & KahaleSmile) != 0) +
((adjustments_ & SabrSmile) != 0) +
((adjustments_ & CustomSmile) != 0);
const int smileTreatments = static_cast<int>((adjustments_ & KahaleSmile) != 0) +
static_cast<int>((adjustments_ & SabrSmile) != 0) +
static_cast<int>((adjustments_ & CustomSmile) != 0);
QL_REQUIRE(smileTreatments <= 1,
"At most one of KahaleSmile, SabrSmile and CustomSmile "
"can be specified at the same time");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,9 @@ namespace QuantLib {
if (considerProbabilities && probabilities_ != None &&
event1Time != Null<Real>()) {
probabilityPayoffs.reserve(npvp1.size());
for (Size m = 0; m < npvp1.size(); ++m) {
for (auto & m : npvp1) {
probabilityPayoffs.emplace_back(
z.begin(), z.end(), npvp1[m].begin(),
z.begin(), z.end(), m.begin(),
CubicInterpolation::Spline, true,
CubicInterpolation::Lagrange, 0.0,
CubicInterpolation::Lagrange, 0.0);
Expand Down
2 changes: 1 addition & 1 deletion test-suite/dates.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ BOOST_AUTO_TEST_CASE(nullDate) {

Date null_date = Date();

static_assert(std::is_nothrow_default_constructible<Date>::value,
static_assert(std::is_nothrow_default_constructible_v<Date>,
"Date default construction must be noexcept");

BOOST_CHECK_EQUAL(null_date.serialNumber(), 0);
Expand Down