Skip to content

Commit

Permalink
ICU-22532 Compiler warning: conversion from 'double' to 'int32_t'.
Browse files Browse the repository at this point in the history
The definition of kOneDay is 1.0 * U_MILLIS_PER_DAY so there's no
reason whatsoever to not just use U_MILLIS_PER_DAY directly here.
  • Loading branch information
roubert committed Jan 4, 2024
1 parent 52ff51e commit 539e8f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion icu4c/source/i18n/calendar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,7 @@ void Calendar::computeFields(UErrorCode &ec)
// 11/6/00

int32_t millisInDay;
int32_t days = ClockMath::floorDivide(localMillis, kOneDay, &millisInDay);
int32_t days = ClockMath::floorDivide(localMillis, U_MILLIS_PER_DAY, &millisInDay);

internalSet(UCAL_JULIAN_DAY,days + kEpochStartAsJulianDay);

Expand Down

0 comments on commit 539e8f4

Please sign in to comment.