From: John Kessenich Date: Sun, 1 Mar 2020 09:16:51 +0000 (-0700) Subject: Fix #2095: correct the indentation. X-Git-Tag: upstream/11.4.0~301 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c480237be2ba1bceeb48cd51bdeaa1d8f7e9f8dd;p=platform%2Fupstream%2Fglslang.git Fix #2095: correct the indentation. This also made it obvious some code was (functionally correctly) repeated, so deleted that too. --- diff --git a/glslang/MachineIndependent/Scan.cpp b/glslang/MachineIndependent/Scan.cpp index fd18fd4..e2d6491 100644 --- a/glslang/MachineIndependent/Scan.cpp +++ b/glslang/MachineIndependent/Scan.cpp @@ -187,17 +187,15 @@ bool TInputScanner::scanVersion(int& version, EProfile& profile, bool& notFirstT if (lookingInMiddle) { notFirstToken = true; // make forward progress by finishing off the current line plus extra new lines - if (peek() == '\n' || peek() == '\r') { - while (peek() == '\n' || peek() == '\r') - get(); - } else + if (peek() != '\n' && peek() != '\r') { do { c = get(); } while (c != EndOfInput && c != '\n' && c != '\r'); - while (peek() == '\n' || peek() == '\r') - get(); - if (peek() == EndOfInput) - return true; + } + while (peek() == '\n' || peek() == '\r') + get(); + if (peek() == EndOfInput) + return true; } lookingInMiddle = true;