aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-06-25 23:43:58 +0200
committerMax Kellermann <max@duempel.org>2015-06-25 23:44:16 +0200
commit619ef2b3418668430f741aaed79aa4f366aba233 (patch)
treece89fad923edd50e7a81b5ea98892018036cd56e /src
parentf06fe76d3591b003e0c3c1b742b84282671d10ef (diff)
downloadmpd-619ef2b3418668430f741aaed79aa4f366aba233.tar.gz
mpd-619ef2b3418668430f741aaed79aa4f366aba233.tar.xz
mpd-619ef2b3418668430f741aaed79aa4f366aba233.zip
util/AllocatedString: add method empty()
Diffstat (limited to 'src')
-rw-r--r--src/util/AllocatedString.hxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/AllocatedString.hxx b/src/util/AllocatedString.hxx
index dbc0abfc0..97975f8b8 100644
--- a/src/util/AllocatedString.hxx
+++ b/src/util/AllocatedString.hxx
@@ -89,6 +89,10 @@ public:
return value;
}
+ bool empty() const {
+ return *value == 0;
+ }
+
pointer Steal() {
pointer result = value;
value = nullptr;