aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/AllCommands.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-08-14 19:48:30 +0200
committerMax Kellermann <max@duempel.org>2015-08-14 19:48:30 +0200
commit36cd73df51c6bae6b283f1bf14704d86ad98b3c5 (patch)
tree65a292077e077bf423fdb33a21e53f15982915a1 /src/command/AllCommands.cxx
parent6f20889f00e4cee39ceac0f65109cdd013ee9a5d (diff)
downloadmpd-36cd73df51c6bae6b283f1bf14704d86ad98b3c5.tar.gz
mpd-36cd73df51c6bae6b283f1bf14704d86ad98b3c5.tar.xz
mpd-36cd73df51c6bae6b283f1bf14704d86ad98b3c5.zip
client, command: use StringIsEqual()
Diffstat (limited to '')
-rw-r--r--src/command/AllCommands.cxx21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/command/AllCommands.cxx b/src/command/AllCommands.cxx
index 66d10ef1b..8e8865ff3 100644
--- a/src/command/AllCommands.cxx
+++ b/src/command/AllCommands.cxx
@@ -40,6 +40,7 @@
#include "util/Tokenizer.hxx"
#include "util/Error.hxx"
#include "util/ConstBuffer.hxx"
+#include "util/StringAPI.hxx"
#ifdef ENABLE_SQLITE
#include "StickerCommands.hxx"
@@ -204,23 +205,23 @@ command_available(gcc_unused const Partition &partition,
gcc_unused const struct command *cmd)
{
#ifdef ENABLE_SQLITE
- if (strcmp(cmd->cmd, "sticker") == 0)
+ if (StringIsEqual(cmd->cmd, "sticker"))
return sticker_enabled();
#endif
#ifdef ENABLE_NEIGHBOR_PLUGINS
- if (strcmp(cmd->cmd, "listneighbors") == 0)
+ if (StringIsEqual(cmd->cmd, "listneighbors"))
return neighbor_commands_available(partition.instance);
#endif
- if (strcmp(cmd->cmd, "save") == 0 ||
- strcmp(cmd->cmd, "rm") == 0 ||
- strcmp(cmd->cmd, "rename") == 0 ||
- strcmp(cmd->cmd, "playlistdelete") == 0 ||
- strcmp(cmd->cmd, "playlistmove") == 0 ||
- strcmp(cmd->cmd, "playlistclear") == 0 ||
- strcmp(cmd->cmd, "playlistadd") == 0 ||
- strcmp(cmd->cmd, "listplaylists") == 0)
+ if (StringIsEqual(cmd->cmd, "save") ||
+ StringIsEqual(cmd->cmd, "rm") ||
+ StringIsEqual(cmd->cmd, "rename") ||
+ StringIsEqual(cmd->cmd, "playlistdelete") ||
+ StringIsEqual(cmd->cmd, "playlistmove") ||
+ StringIsEqual(cmd->cmd, "playlistclear") ||
+ StringIsEqual(cmd->cmd, "playlistadd") ||
+ StringIsEqual(cmd->cmd, "listplaylists"))
return playlist_commands_available();
return true;