1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

ext/intl: GregorianCalendar using C++ upcasting operator. (#19216)

when fetching the internal ICU object also removing one useless cast.
This commit is contained in:
David CARLIER
2025-07-23 12:25:20 +01:00
committed by GitHub
parent 719419a6e5
commit 2645663d9b
2 changed files with 2 additions and 2 deletions

View File

@@ -71,7 +71,7 @@ U_CFUNC void calendar_object_construct(zval *object,
CALENDAR_METHOD_FETCH_OBJECT_NO_CHECK; //populate to from object
assert(co->ucal == NULL);
co->ucal = (Calendar*)calendar;
co->ucal = calendar;
}
/* {{{ clone handler for Calendar */

View File

@@ -46,7 +46,7 @@ using icu::StringPiece;
}
static inline GregorianCalendar *fetch_greg(Calendar_object *co) {
return (GregorianCalendar*)co->ucal;
return static_cast<GregorianCalendar *>(co->ucal);
}
static bool set_gregorian_calendar_time_zone(GregorianCalendar *gcal, UErrorCode status)