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:
@@ -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 */
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user