summaryrefslogtreecommitdiff
path: root/src/util/ConcatString.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-05-16 11:56:56 +0200
committerMax Kellermann <max@musicpd.org>2017-05-16 11:56:56 +0200
commit5e8f578e7838920ecdf7095e0c2026ab1542afb4 (patch)
tree48607bbc68853c00883ecdb8d1776d7177a309c5 /src/util/ConcatString.hxx
parenta4b1633e1110916e687c6a083a5267754f741a06 (diff)
util/ConcatString: return the end pointer
Diffstat (limited to 'src/util/ConcatString.hxx')
-rw-r--r--src/util/ConcatString.hxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/util/ConcatString.hxx b/src/util/ConcatString.hxx
index e3a6a0ad0..abc6dd59b 100644
--- a/src/util/ConcatString.hxx
+++ b/src/util/ConcatString.hxx
@@ -49,18 +49,18 @@ FillLengths(size_t *lengths, const char *a)
}
template<typename... Args>
-void
+char *
StringCat(char *p, const size_t *lengths, const char *a, Args&&... args)
{
- StringCat(p, lengths, a);
- StringCat(p + *lengths, lengths + 1, args...);
+ return StringCat(StringCat(p, lengths, a),
+ lengths + 1, args...);
}
template<>
-void
+char *
StringCat(char *p, const size_t *lengths, const char *a)
{
- std::copy_n(a, *lengths, p);
+ return std::copy_n(a, *lengths, p);
}
#endif