Skip to content

Commit

Permalink
ICU-21107 Bugfix: Break up statement to force execution order.
Browse files Browse the repository at this point in the history
  • Loading branch information
roubert committed Jan 16, 2024
1 parent ab72ab1 commit 214ae60
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions icu4c/source/i18n/calendar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3699,9 +3699,10 @@ int32_t Calendar::handleGetMonthLength(int32_t extendedYear, int32_t month) cons
handleComputeMonthStart(extendedYear, month, true);
}

int32_t Calendar::handleGetYearLength(int32_t eyear) const {
return handleComputeMonthStart(eyear+1, 0, false) -
handleComputeMonthStart(eyear, 0, false);
int32_t Calendar::handleGetYearLength(int32_t eyear) const {
int32_t nextYearStart = handleComputeMonthStart(eyear + 1, 0, false);
int32_t thisYearStart = handleComputeMonthStart(eyear, 0, false);
return nextYearStart - thisYearStart;
}

int32_t
Expand Down

0 comments on commit 214ae60

Please sign in to comment.