Skip to content

Commit

Permalink
no else block after break statement
Browse files Browse the repository at this point in the history
  • Loading branch information
omoerbeek committed Jul 2, 2024
1 parent 2773286 commit 9ecf2b3
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions ext/yahttp/yahttp/router.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,20 @@ namespace YaHTTP {
rpos = route.size();
upos = requrl.path.size();
break;
} else {
// match until url[upos] or next / if pattern is at end
while (upos < requrl.path.size()) {
if (route[rpos+1] == '\0' && requrl.path[upos] == '/') {
break;
}
if (requrl.path[upos] == route[rpos+1]) {
break;
}
upos++;
}
// match until url[upos] or next / if pattern is at end
while (upos < requrl.path.size()) {
if (route[rpos+1] == '\0' && requrl.path[upos] == '/') {
break;
}
if (requrl.path[upos] == route[rpos+1]) {
break;
}
nend = upos;
params[pname] = funcptr::tie(nstart, nend);
upos++;
}
nend = upos;
params[pname] = funcptr::tie(nstart, nend);

upos--;
}
else if (route[rpos] != requrl.path[upos]) {
Expand Down

0 comments on commit 9ecf2b3

Please sign in to comment.