From 1753bcc2b72e72a58faff5cc0ffb546aebf44deb Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 3 Aug 2011 11:46:43 +1000 Subject: Fixed 64-bit warnings. --- lexers/LexHTML.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lexers/LexHTML.cxx b/lexers/LexHTML.cxx index b54401805..a20796387 100644 --- a/lexers/LexHTML.cxx +++ b/lexers/LexHTML.cxx @@ -57,7 +57,7 @@ inline bool IsOperator(int ch) { } static void GetTextSegment(Accessor &styler, unsigned int start, unsigned int end, char *s, size_t len) { - size_t i = 0; + unsigned int i = 0; for (; (i < end - start + 1) && (i < len-1); i++) { s[i] = static_cast(MakeLowerCase(styler[start + i])); } @@ -66,7 +66,7 @@ static void GetTextSegment(Accessor &styler, unsigned int start, unsigned int en static const char *GetNextWord(Accessor &styler, unsigned int start, char *s, size_t sLen) { - size_t i = 0; + unsigned int i = 0; for (; i < sLen-1; i++) { char ch = static_cast(styler.SafeGetCharAt(start + i)); if ((i == 0) && !IsAWordStart(ch)) @@ -960,8 +960,8 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty styler.ColourTo(i, SCE_H_ASP); if (ch != '%' && ch != '$' && ch != '/') { - i += strlen(makoBlockType); - visibleChars += strlen(makoBlockType); + i += static_cast(strlen(makoBlockType)); + visibleChars += static_cast(strlen(makoBlockType)); if (keywords4.InList(makoBlockType)) styler.ColourTo(i, SCE_HP_WORD); else @@ -1983,7 +1983,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty styler.ColourTo(i, StateToPrint); state = SCE_HPHP_DEFAULT; } else if (isLineEnd(chPrev)) { - const int psdLength = strlen(phpStringDelimiter); + const int psdLength = static_cast(strlen(phpStringDelimiter)); const char chAfterPsd = styler.SafeGetCharAt(i + psdLength); const char chAfterPsd2 = styler.SafeGetCharAt(i + psdLength + 1); if (isLineEnd(chAfterPsd) || @@ -2006,7 +2006,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty state = SCE_HPHP_DEFAULT; } } else if (isLineEnd(chPrev) && styler.Match(i, phpStringDelimiter)) { - const int psdLength = strlen(phpStringDelimiter); + const int psdLength = static_cast(strlen(phpStringDelimiter)); const char chAfterPsd = styler.SafeGetCharAt(i + psdLength); const char chAfterPsd2 = styler.SafeGetCharAt(i + psdLength + 1); if (isLineEnd(chAfterPsd) || -- cgit v1.2.3