diff --git a/kandinsky/include/kandinsky/unicode/code_point.h b/kandinsky/include/kandinsky/unicode/code_point.h index 0487efb97..033e96407 100644 --- a/kandinsky/include/kandinsky/unicode/code_point.h +++ b/kandinsky/include/kandinsky/unicode/code_point.h @@ -16,8 +16,8 @@ private: uint32_t m_code; }; -static constexpr CodePoint Null = 0x0; -static constexpr CodePoint Tabulation = 0x9; -static constexpr CodePoint LineFeed = 0xA; +static constexpr CodePoint KDCodePointNull = 0x0; +static constexpr CodePoint KDCodePointTabulation = 0x9; +static constexpr CodePoint KDCodePointLineFeed = 0xA; #endif diff --git a/kandinsky/src/context_text.cpp b/kandinsky/src/context_text.cpp index d4654a6d0..05728dbba 100644 --- a/kandinsky/src/context_text.cpp +++ b/kandinsky/src/context_text.cpp @@ -14,11 +14,11 @@ KDPoint KDContext::drawString(const char * text, KDPoint p, const KDFont * font, UTF8Decoder decoder(text); CodePoint codePoint = decoder.nextCodePoint(); - while (codePoint != Null) { - if (codePoint == LineFeed) { + while (codePoint != KDCodePointNull) { + if (codePoint == KDCodePointLineFeed) { position = KDPoint(0, position.y() + glyphSize.height()); codePoint = decoder.nextCodePoint(); - } else if (codePoint == Tabulation) { + } else if (codePoint == KDCodePointTabulation) { position = position.translatedBy(KDPoint(k_tabCharacterWidth * glyphSize.width(), 0)); codePoint = decoder.nextCodePoint(); } else { diff --git a/kandinsky/src/font.cpp b/kandinsky/src/font.cpp index 15173836b..6f48d7814 100644 --- a/kandinsky/src/font.cpp +++ b/kandinsky/src/font.cpp @@ -13,12 +13,12 @@ KDSize KDFont::stringSize(const char * text) const { UTF8Decoder decoder(text); CodePoint codePoint = decoder.nextCodePoint(); - while (codePoint != Null) { + while (codePoint != KDCodePointNull) { KDSize cSize = KDSize(m_glyphSize.width(), 0); - if (codePoint == LineFeed) { + if (codePoint == KDCodePointLineFeed) { cSize = KDSize(0, m_glyphSize.height()); codePoint = decoder.nextCodePoint(); - } else if (codePoint == Tabulation) { + } else if (codePoint == KDCodePointTabulation) { cSize = KDSize(k_tabCharacterWidth*m_glyphSize.width(), 0); } else if (codePoint.isCombining()) { cSize = KDSizeZero; diff --git a/poincare/src/parsing/tokenizer.cpp b/poincare/src/parsing/tokenizer.cpp index 84c3a2d7e..0dfa5e0fa 100644 --- a/poincare/src/parsing/tokenizer.cpp +++ b/poincare/src/parsing/tokenizer.cpp @@ -18,7 +18,7 @@ const char Tokenizer::nextChar(PopTest popTest, char context, bool * testResult) UTF8Decoder decoder(m_text); CodePoint firstCodePoint = decoder.nextCodePoint(); int numberOfBytesForChar = 1; - if (firstCodePoint != Null) { + if (firstCodePoint != KDCodePointNull) { CodePoint codePoint = decoder.nextCodePoint(); while (codePoint.isCombining()) { numberOfBytesForChar++;