We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 68e8b2c commit 2e65389Copy full SHA for 2e65389
src/path.cc
@@ -24,15 +24,14 @@ std::string NormalizeString(const std::string_view path,
24
int lastSegmentLength = 0;
25
int lastSlash = -1;
26
int dots = 0;
27
- char code;
28
- const auto pathLen = path.size();
29
- for (uint8_t i = 0; i <= pathLen; ++i) {
30
- if (i < pathLen) {
+ char code = 0;
+ for (size_t i = 0; i <= path.size(); ++i) {
+ if (i < path.size()) {
31
code = path[i];
32
- } else if (IsPathSeparator(path[i])) {
+ } else if (IsPathSeparator(code)) {
33
break;
34
} else {
35
- code = node::kPathSeparator;
+ code = '/';
36
}
37
38
if (IsPathSeparator(code)) {
0 commit comments