We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e607e3 commit 9f8c5bbCopy full SHA for 9f8c5bb
ql/time/ecb.cpp
@@ -151,10 +151,9 @@ namespace QuantLib {
151
QL_REQUIRE(isECBcode(ecbCode),
152
ecbCode << " is not a valid ECB code");
153
154
- std::array<char, 3> upperMonthCode;
155
- for (int i=0; i<3; ++i)
156
- upperMonthCode[i] = std::toupper(ecbCode[i]);
157
- const boost::string_view monthString(upperMonthCode.data(), 3);
+ char upperMonthCode[3];
+ to_upper_copy(upperMonthCode, ecbCode);
+ const boost::string_view monthString(upperMonthCode, 3);
158
const auto it = std::find(MONTHS.begin(), MONTHS.end(), monthString);
159
QL_ASSERT(it != MONTHS.end() ,"not an ECB month (and it should have been). code: " + ecbCode);
160
0 commit comments