diff options
author | Max Kellermann <max@duempel.org> | 2015-11-06 09:37:07 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-11-06 09:37:07 +0100 |
commit | c880099deb41c09ea7844daa27a42dac4142c0cd (patch) | |
tree | 571482d1e6e7efc95ab7d443f246232188d3c23f /src/storage/plugins/LocalStorage.cxx | |
parent | 42f5ecd4a116c96d30bf407859dadaa9a053ea39 (diff) | |
download | mpd-c880099deb41c09ea7844daa27a42dac4142c0cd.tar.gz mpd-c880099deb41c09ea7844daa27a42dac4142c0cd.tar.xz mpd-c880099deb41c09ea7844daa27a42dac4142c0cd.zip |
util/StringCompare: add StringIsEmpty()
Diffstat (limited to '')
-rw-r--r-- | src/storage/plugins/LocalStorage.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/storage/plugins/LocalStorage.cxx b/src/storage/plugins/LocalStorage.cxx index 83903ec81..b35161dd1 100644 --- a/src/storage/plugins/LocalStorage.cxx +++ b/src/storage/plugins/LocalStorage.cxx @@ -22,10 +22,11 @@ #include "storage/StoragePlugin.hxx" #include "storage/StorageInterface.hxx" #include "storage/FileInfo.hxx" -#include "util/Error.hxx" #include "fs/FileInfo.hxx" #include "fs/AllocatedPath.hxx" #include "fs/DirectoryReader.hxx" +#include "util/Error.hxx" +#include "util/StringCompare.hxx" #include <string> @@ -108,7 +109,7 @@ LocalStorage::MapUTF8(const char *uri_utf8) const { assert(uri_utf8 != nullptr); - if (*uri_utf8 == 0) + if (StringIsEmpty(uri_utf8)) return base_utf8; return PathTraitsUTF8::Build(base_utf8.c_str(), uri_utf8); @@ -119,7 +120,7 @@ LocalStorage::MapFS(const char *uri_utf8, Error &error) const { assert(uri_utf8 != nullptr); - if (*uri_utf8 == 0) + if (StringIsEmpty(uri_utf8)) return base_fs; AllocatedPath path_fs = AllocatedPath::FromUTF8(uri_utf8, error); |