Simplify a search for terminator.
We need to remember where the included file's name starts anyway; if we move this to before the search for the end, we don't need a separate variable to keep track of its length. Change-Id: Ia8d72839ac3fa32f2e748a21ee70dcab614562f4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
parent
4fd1e5f40c
commit
0ae8ef7acb
@ -596,14 +596,11 @@ bool QMakeSourceFileInfo::findDeps(SourceFile *file)
|
||||
continue;
|
||||
}
|
||||
x++;
|
||||
|
||||
int inc_len;
|
||||
for (inc_len = 0;
|
||||
buffer[x + inc_len] != term && !qmake_endOfLine(buffer[x + inc_len]);
|
||||
++inc_len) {} // skip until end of include name
|
||||
buffer[x + inc_len] = '\0';
|
||||
inc = buffer + x;
|
||||
x += inc_len;
|
||||
for (;
|
||||
buffer[x] != term && !qmake_endOfLine(buffer[x]);
|
||||
++x) {} // skip until end of include name
|
||||
buffer[x] = '\0';
|
||||
} else if (buffer[x] == '\'' || buffer[x] == '"') {
|
||||
const char term = buffer[x++];
|
||||
while(x < buffer_len) {
|
||||
|
Loading…
Reference in New Issue
Block a user