diff options
| -rw-r--r-- | src/xdg.cc | 10 | ||||
| -rw-r--r-- | src/xdg.hh | 2 |
2 files changed, 6 insertions, 6 deletions
@@ -86,22 +86,22 @@ void get_paths(Type type, std::string* dirs, std::filesystem::path* home) { } // namespace void paths_to_read(Type type, std::string_view name, - std::vector<std::filesystem::path>* out) { + std::vector<std::filesystem::path>& out) { std::string dirs; std::filesystem::path home; get_paths(type, &dirs, &home); - out->clear(); - out->push_back(home / name); + out.clear(); + out.push_back(home / name); size_t last = 0; while (true) { size_t next = dirs.find(':', last); if (next == std::string::npos) { if (valid(dirs, last, dirs.size() - last)) - out->push_back(std::filesystem::path(dirs.substr(last)) / name); + out.push_back(std::filesystem::path(dirs.substr(last)) / name); break; } if (valid(dirs, last, next - last)) - out->push_back( + out.push_back( std::filesystem::path(dirs.substr(last, next - last)) / name); last = next + 1; } @@ -14,7 +14,7 @@ enum class Type { }; void paths_to_read(Type type, std::string_view path, - std::vector<std::filesystem::path>* out); + std::vector<std::filesystem::path>& out); std::filesystem::path path_to_write(Type type, std::string_view path); |
