From 619ef2b3418668430f741aaed79aa4f366aba233 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 25 Jun 2015 23:43:58 +0200 Subject: [PATCH] util/AllocatedString: add method empty() --- src/util/AllocatedString.hxx | 4 ++++ 1 file changed, 4 insertions(+) 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;