Codefix: 'Declaration hides variable'

This commit is contained in:
Rubidium
2025-02-15 16:03:27 +01:00
committed by rubidium42
parent 443d7ece29
commit 2d30df8110
3 changed files with 3 additions and 5 deletions

View File

@@ -259,8 +259,7 @@ std::optional<FileHandle> FioFOpenFile(const std::string &filename, const char *
/* Resolve ".." */
std::istringstream ss(resolved_name);
std::vector<std::string> tokens;
std::string token;
while (std::getline(ss, token, PATHSEPCHAR)) {
for (std::string token; std::getline(ss, token, PATHSEPCHAR); /* nothing */) {
if (token == "..") {
if (tokens.size() < 2) return std::nullopt;
tokens.pop_back();