Skip to content

Commit 81b3f95

Browse files
ramseynikic
authored andcommitted
Change UBool to bool for equality operators in ICU >= 70.1
Refer to: - unicode-org/icu@633438f - unicode-org/icu@f6325d4
1 parent 8a79668 commit 81b3f95

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

ext/intl/breakiterator/codepointiterator_internal.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ CodePointBreakIterator::~CodePointBreakIterator()
7575
clearCurrentCharIter();
7676
}
7777

78+
#if U_ICU_VERSION_MAJOR_NUM >= 70
79+
bool CodePointBreakIterator::operator==(const BreakIterator& that) const
80+
#else
7881
UBool CodePointBreakIterator::operator==(const BreakIterator& that) const
82+
#endif
7983
{
8084
if (typeid(*this) != typeid(that)) {
8185
return FALSE;

ext/intl/breakiterator/codepointiterator_internal.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ namespace PHP {
3939

4040
virtual ~CodePointBreakIterator();
4141

42+
#if U_ICU_VERSION_MAJOR_NUM >= 70
43+
virtual bool operator==(const BreakIterator& that) const;
44+
#else
4245
virtual UBool operator==(const BreakIterator& that) const;
46+
#endif
4347

4448
virtual CodePointBreakIterator* clone(void) const;
4549

0 commit comments

Comments
 (0)