| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,15 +24,14 @@ std::string NormalizeString(const std::string_view path, | |||
| 24 | 24 | int lastSegmentLength = 0; | |
| 25 | 25 | int lastSlash = -1; | |
| 26 | 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) { | ||
| 27 | + char code = 0; | ||
| 28 | + for (size_t i = 0; i <= path.size(); ++i) { | ||
| 29 | + if (i < path.size()) { | ||
| 31 | 30 | code = path[i]; | |
| 32 | - } else if (IsPathSeparator(path[i])) { | ||
| 31 | + } else if (IsPathSeparator(code)) { | ||
| 33 | 32 | break; | |
| 34 | 33 | } else { | |
| 35 | - code = node::kPathSeparator; | ||
| 34 | + code = '/'; | ||
| 36 | 35 | } | |
| 37 | 36 | ||
| 38 | 37 | if (IsPathSeparator(code)) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments