Skip to content

Commit

Permalink
Refactor path token iteration in PathResolver
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoryKogan committed Dec 11, 2023
1 parent 8c51337 commit beb073f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/FileSystem/PathResolver/PathResolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ auto PathResolver::trace(std::uint64_t cluster) const -> std::string {
}

std::string path;
for (auto &path_token : std::ranges::reverse_view(path_tokens)) {
for (auto it = path_tokens.rbegin(); it != path_tokens.rend(); ++it) {
path += delimiter_;
path += path_token;
path += *it;
}

if (path.empty()) path = delimiter_;
Expand Down
1 change: 0 additions & 1 deletion src/FileSystem/PathResolver/PathResolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "../Directory/Directory.hpp"
#include "../FileHandler/HandlerBuilder/HandlerBuilder.hpp"
#include <optional>
#include <ranges>
#include <string>
#include <vector>

Expand Down

0 comments on commit beb073f

Please sign in to comment.