summaryrefslogtreecommitdiff
path: root/src/xdg.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/xdg.cc')
-rw-r--r--src/xdg.cc10
1 files changed, 5 insertions, 5 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<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;
}