Skip to content

Instantly share code, notes, and snippets.

@Maksold
Created May 3, 2022 05:02
Show Gist options
  • Save Maksold/90d4b47ae8285c586b18ba7979e3252a to your computer and use it in GitHub Desktop.
Save Maksold/90d4b47ae8285c586b18ba7979e3252a to your computer and use it in GitHub Desktop.
--- /ext/intl/breakiterator/codepointiterator_internal.cpp
+++ /ext/intl/breakiterator/codepointiterator_internal.cpp
@@ -67,21 +67,25 @@
}
CodePointBreakIterator::~CodePointBreakIterator()
{
if (this->fText) {
utext_close(this->fText);
}
clearCurrentCharIter();
}
-UBool CodePointBreakIterator::operator==(const BreakIterator& that) const
+#if U_ICU_VERSION_MAJOR_NUM >= 70
+ bool CodePointBreakIterator::operator==(const BreakIterator& that) const
+#else
+ UBool CodePointBreakIterator::operator==(const BreakIterator& that) const
+#endif
{
if (typeid(*this) != typeid(that)) {
return FALSE;
}
const CodePointBreakIterator& that2 =
static_cast<const CodePointBreakIterator&>(that);
if (!utext_equals(this->fText, that2.fText)) {
return FALSE;
--- /ext/intl/breakiterator/codepointiterator_internal.h
+++ /ext/intl/breakiterator/codepointiterator_internal.h
@@ -29,21 +29,25 @@
static UClassID getStaticClassID();
CodePointBreakIterator();
CodePointBreakIterator(const CodePointBreakIterator &other);
CodePointBreakIterator& operator=(const CodePointBreakIterator& that);
virtual ~CodePointBreakIterator();
+#if U_ICU_VERSION_MAJOR_NUM >= 70
+ virtual bool operator==(const BreakIterator& that) const;
+#else
virtual UBool operator==(const BreakIterator& that) const;
+#endif
virtual CodePointBreakIterator* clone(void) const;
virtual UClassID getDynamicClassID(void) const;
virtual CharacterIterator& getText(void) const;
virtual UText *getUText(UText *fillIn, UErrorCode &status) const;
virtual void setText(const UnicodeString &text);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment