[escher/ion] Standard methods in UTF8Helper used in text_area

String manipulations need to be done using an UTF8 decoder, but some
manipulations can be optimized if the code points we manipulate are only
one char long. These optimizations are done inside UTF8Helper methods.
This commit is contained in:
Léa Saviot
2019-01-24 11:06:07 +01:00
committed by Émilie Feral
parent e6051fae42
commit aac78ca32a
6 changed files with 153 additions and 52 deletions

View File

@@ -50,7 +50,7 @@ Expression Equation::standardForm(Context * context) const {
}
bool Equation::containsIComplex() const {
return UTF8Helper::CodePointSearch(text(), UCodePointMathematicalBoldSmallI) != nullptr;
return *(UTF8Helper::CodePointSearch(text(), UCodePointMathematicalBoldSmallI)) != 0;
}
void Equation::tidyStandardForm() {