aboutsummaryrefslogtreecommitdiffstats
path: root/src/sticker/StickerDatabase.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-11-06 09:37:07 +0100
committerMax Kellermann <max@duempel.org>2015-11-06 09:37:07 +0100
commitc880099deb41c09ea7844daa27a42dac4142c0cd (patch)
tree571482d1e6e7efc95ab7d443f246232188d3c23f /src/sticker/StickerDatabase.cxx
parent42f5ecd4a116c96d30bf407859dadaa9a053ea39 (diff)
downloadmpd-c880099deb41c09ea7844daa27a42dac4142c0cd.tar.gz
mpd-c880099deb41c09ea7844daa27a42dac4142c0cd.tar.xz
mpd-c880099deb41c09ea7844daa27a42dac4142c0cd.zip
util/StringCompare: add StringIsEmpty()
Diffstat (limited to '')
-rw-r--r--src/sticker/StickerDatabase.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sticker/StickerDatabase.cxx b/src/sticker/StickerDatabase.cxx
index 02eed362e..6aea88b0c 100644
--- a/src/sticker/StickerDatabase.cxx
+++ b/src/sticker/StickerDatabase.cxx
@@ -25,6 +25,7 @@
#include "Idle.hxx"
#include "util/Error.hxx"
#include "util/Macros.hxx"
+#include "util/StringCompare.hxx"
#include <string>
#include <map>
@@ -178,7 +179,7 @@ sticker_load_value(const char *type, const char *uri, const char *name,
assert(uri != nullptr);
assert(name != nullptr);
- if (*name == 0)
+ if (StringIsEmpty(name))
return std::string();
if (!BindAll(error, stmt, type, uri, name))
@@ -287,7 +288,7 @@ sticker_store_value(const char *type, const char *uri,
assert(name != nullptr);
assert(value != nullptr);
- if (*name == 0)
+ if (StringIsEmpty(name))
return false;
return sticker_update_value(type, uri, name, value, error) ||