diff --git a/apps/solver/equation.cpp b/apps/solver/equation.cpp index df6212056..fa10a8c09 100644 --- a/apps/solver/equation.cpp +++ b/apps/solver/equation.cpp @@ -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() { diff --git a/escher/include/escher/text_area.h b/escher/include/escher/text_area.h index 0f9fa8b77..d861d27e3 100644 --- a/escher/include/escher/text_area.h +++ b/escher/include/escher/text_area.h @@ -30,7 +30,7 @@ protected: m_buffer = buffer; m_bufferSize = bufferSize; } - const char * text() const { return const_cast(m_buffer); } + const char * text() const { return m_buffer; } class Line { public: diff --git a/escher/src/text_area.cpp b/escher/src/text_area.cpp index 9be7ccf52..cddf40b23 100644 --- a/escher/src/text_area.cpp +++ b/escher/src/text_area.cpp @@ -99,8 +99,8 @@ void TextArea::setText(char * textBuffer, size_t textBufferSize) { bool TextArea::insertTextWithIndentation(const char * textBuffer, const char * location) { // Compute the indentation int indentation = indentationBeforeCursor(); - const char * previousChar = cursorLocation()-1; - if (previousChar >= const_cast