diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2023-11-23 20:36:53 +0100 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2023-11-23 20:36:53 +0100 |
| commit | 54530472a2073e1f979358646ca2cfc8e6b911a5 (patch) | |
| tree | 317e0adbdcff8e44ce6e9c55aed6ee5260c7fe16 | |
| parent | 44c3db01709da5a5fa5fff663ee46a4e820bda5d (diff) | |
Updated xdg files (from sawmill)
| -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); |
