File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -269,17 +269,18 @@ namespace QuantLib {
269
269
ecbCode << " is not a valid ECB code" );
270
270
271
271
const boost::string_view month (ecbCode.data (), 3 );
272
- auto itMonth = MONTHS.left .find (month);
272
+ const Month monthEnum = MONTHS.left .at (month);
273
273
274
274
string nextCodeStr;
275
275
nextCodeStr.reserve (5 );
276
- if (itMonth-> first != " DEC " ) {
276
+ if (monthEnum != December ) {
277
277
// use next month
278
- const boost::string_view nextMonth = (++itMonth)->first ;
278
+ const Month nextMonthEnum = static_cast <Month>(monthEnum + 1 );
279
+ const boost::string_view nextMonth = MONTHS.right .at (nextMonthEnum);
279
280
nextCodeStr.append (nextMonth.data (), 3 );
280
281
281
282
// copy year
282
- nextCodeStr += { ecbCode[3 ], ecbCode[4 ] };
283
+ nextCodeStr += {ecbCode[3 ], ecbCode[4 ]};
283
284
} else {
284
285
// previous month was DEC
285
286
nextCodeStr.append (" JAN" );
You can’t perform that action at this time.
0 commit comments