From 54530472a2073e1f979358646ca2cfc8e6b911a5 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Thu, 23 Nov 2023 20:36:53 +0100 Subject: Updated xdg files (from sawmill) --- src/xdg.cc | 10 +++++----- src/xdg.hh | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/xdg.cc b/src/xdg.cc index b61b4ba..69b2a53 100644 --- a/src/xdg.cc +++ b/src/xdg.cc @@ -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* out) { + std::vector& 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; } diff --git a/src/xdg.hh b/src/xdg.hh index 1c7e4f0..9232bbe 100644 --- a/src/xdg.hh +++ b/src/xdg.hh @@ -14,7 +14,7 @@ enum class Type { }; void paths_to_read(Type type, std::string_view path, - std::vector* out); + std::vector& out); std::filesystem::path path_to_write(Type type, std::string_view path); -- cgit v1.2.3-70-g09d2