Cleanup: braces around statements in OBJ parser

This commit is contained in:
Aras Pranckevicius 2022-07-30 13:10:35 +03:00
parent 1a0fab56b4
commit d31886b3fe
1 changed files with 4 additions and 2 deletions

View File

@ -41,12 +41,14 @@ void fixup_line_continuations(char *p, char *end)
while (true) {
/* Find next backslash, if any. */
char *backslash = std::find(p, end, '\\');
if (backslash == end)
if (backslash == end) {
break;
}
/* Skip over possible whitespace right after it. */
p = backslash + 1;
while (p < end && is_whitespace(*p) && *p != '\n')
while (p < end && is_whitespace(*p) && *p != '\n') {
++p;
}
/* If then we have a newline, turn both backslash
* and the newline into regular spaces. */
if (p < end && *p == '\n') {