aboutsummaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-03-18 12:09:17 +0100
committerMax Kellermann <max@duempel.org>2014-03-18 12:09:17 +0100
commita68acf5c66634444986d2eb5bf96a532c83729d1 (patch)
tree371540bb3d10dbd8557901db5230332e34d77279 /src/util
parent707d379b97acea36528e5dca4d60e65686926e57 (diff)
downloadmpd-a68acf5c66634444986d2eb5bf96a532c83729d1.tar.gz
mpd-a68acf5c66634444986d2eb5bf96a532c83729d1.tar.xz
mpd-a68acf5c66634444986d2eb5bf96a532c83729d1.zip
util/ConstBuffer: add FromVoid(), ToVoid() to "void" specialization
Provide the full API.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/ConstBuffer.hxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util/ConstBuffer.hxx b/src/util/ConstBuffer.hxx
index 6754cb065..2670489b1 100644
--- a/src/util/ConstBuffer.hxx
+++ b/src/util/ConstBuffer.hxx
@@ -63,6 +63,14 @@ struct ConstBuffer<void> {
return ConstBuffer(nullptr, 0);
}
+ constexpr static ConstBuffer<void> FromVoid(ConstBuffer<void> other) {
+ return other;
+ }
+
+ constexpr ConstBuffer<void> ToVoid() const {
+ return *this;
+ }
+
constexpr bool IsNull() const {
return data == nullptr;
}