diff options
Diffstat (limited to 'lexers')
-rw-r--r-- | lexers/LexMarkdown.cxx | 8 | ||||
-rw-r--r-- | lexers/LexTxt2tags.cxx | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lexers/LexMarkdown.cxx b/lexers/LexMarkdown.cxx index a92697707..c774b736f 100644 --- a/lexers/LexMarkdown.cxx +++ b/lexers/LexMarkdown.cxx @@ -118,10 +118,11 @@ static bool AtTermStart(StyleContext &sc) { } static bool IsValidHrule(const unsigned int endPos, StyleContext &sc) { - int c, count = 1; + int count = 1; unsigned int i = 0; - while (++i) { - c = sc.GetRelative(i); + for (;;) { + ++i; + int c = sc.GetRelative(i); if (c == sc.ch) ++count; // hit a terminating character @@ -140,7 +141,6 @@ static bool IsValidHrule(const unsigned int endPos, StyleContext &sc) { } } } - return false; } static void ColorizeMarkdownDoc(unsigned int startPos, int length, int initStyle, diff --git a/lexers/LexTxt2tags.cxx b/lexers/LexTxt2tags.cxx index 8f8e181ba..fd4a96c33 100644 --- a/lexers/LexTxt2tags.cxx +++ b/lexers/LexTxt2tags.cxx @@ -78,10 +78,11 @@ static bool HasPrevLineContent(StyleContext &sc) { // Separator line static bool IsValidHrule(const unsigned int endPos, StyleContext &sc) { - int c, count = 1; + int count = 1; unsigned int i = 0; - while (++i) { - c = sc.GetRelative(i); + for (;;) { + ++i; + int c = sc.GetRelative(i); if (c == sc.ch) ++count; // hit a terminating character @@ -100,7 +101,6 @@ static bool IsValidHrule(const unsigned int endPos, StyleContext &sc) { } } } - return false; } static void ColorizeTxt2tagsDoc(unsigned int startPos, int length, int initStyle, |