Skip to content

Commit

Permalink
std::set can be initialized directly
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio committed Jan 4, 2024
1 parent 3a044ac commit 07a972a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions ql/time/calendars/china.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ namespace QuantLib {
}

bool China::IbImpl::isBusinessDay(const Date& date) const {
static const Date working_weekends[] = {
static const std::set<Date> workingWeekends = {
// 2005
Date(5, February, 2005),
Date(6, February, 2005),
Expand Down Expand Up @@ -356,9 +356,6 @@ namespace QuantLib {
Date(29, Sep, 2024),
Date(12, October, 2024)
};
static const Size n = sizeof(working_weekends) / sizeof(working_weekends[0]);
static const std::set<Date> workingWeekends(working_weekends+0,
working_weekends+n);

// If it is already a SSE business day, it must be a IB business day
return sseImpl->isBusinessDay(date) ||
Expand Down

0 comments on commit 07a972a

Please sign in to comment.