aboutsummaryrefslogtreecommitdiffstats
path: root/src/DatabaseCommands.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-19 18:48:38 +0200
committerMax Kellermann <max@duempel.org>2013-10-19 18:48:38 +0200
commitff626ac76357940b2f0ac5cb243a68ac13df0f8a (patch)
tree493888a28950f75f5e254c0ded9dc9703ee83dc3 /src/DatabaseCommands.cxx
parent59f8144c50765189594d5932fc25869f9ea6e265 (diff)
downloadmpd-ff626ac76357940b2f0ac5cb243a68ac13df0f8a.tar.gz
mpd-ff626ac76357940b2f0ac5cb243a68ac13df0f8a.tar.xz
mpd-ff626ac76357940b2f0ac5cb243a68ac13df0f8a.zip
*: use references instead of pointers
Diffstat (limited to '')
-rw-r--r--src/DatabaseCommands.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/DatabaseCommands.cxx b/src/DatabaseCommands.cxx
index cc9e0937b..fe6746a74 100644
--- a/src/DatabaseCommands.cxx
+++ b/src/DatabaseCommands.cxx
@@ -35,7 +35,7 @@
#include <string.h>
enum command_return
-handle_lsinfo2(Client *client, int argc, char *argv[])
+handle_lsinfo2(Client &client, int argc, char *argv[])
{
const char *uri;
@@ -55,7 +55,7 @@ handle_lsinfo2(Client *client, int argc, char *argv[])
}
static enum command_return
-handle_match(Client *client, int argc, char *argv[], bool fold_case)
+handle_match(Client &client, int argc, char *argv[], bool fold_case)
{
SongFilter filter;
if (!filter.Parse(argc - 1, argv + 1, fold_case)) {
@@ -72,19 +72,19 @@ handle_match(Client *client, int argc, char *argv[], bool fold_case)
}
enum command_return
-handle_find(Client *client, int argc, char *argv[])
+handle_find(Client &client, int argc, char *argv[])
{
return handle_match(client, argc, argv, false);
}
enum command_return
-handle_search(Client *client, int argc, char *argv[])
+handle_search(Client &client, int argc, char *argv[])
{
return handle_match(client, argc, argv, true);
}
static enum command_return
-handle_match_add(Client *client, int argc, char *argv[], bool fold_case)
+handle_match_add(Client &client, int argc, char *argv[], bool fold_case)
{
SongFilter filter;
if (!filter.Parse(argc - 1, argv + 1, fold_case)) {
@@ -94,25 +94,25 @@ handle_match_add(Client *client, int argc, char *argv[], bool fold_case)
const DatabaseSelection selection("", true, &filter);
Error error;
- return AddFromDatabase(client->partition, selection, error)
+ return AddFromDatabase(client.partition, selection, error)
? COMMAND_RETURN_OK
: print_error(client, error);
}
enum command_return
-handle_findadd(Client *client, int argc, char *argv[])
+handle_findadd(Client &client, int argc, char *argv[])
{
return handle_match_add(client, argc, argv, false);
}
enum command_return
-handle_searchadd(Client *client, int argc, char *argv[])
+handle_searchadd(Client &client, int argc, char *argv[])
{
return handle_match_add(client, argc, argv, true);
}
enum command_return
-handle_searchaddpl(Client *client, int argc, char *argv[])
+handle_searchaddpl(Client &client, int argc, char *argv[])
{
const char *playlist = argv[1];
@@ -129,7 +129,7 @@ handle_searchaddpl(Client *client, int argc, char *argv[])
}
enum command_return
-handle_count(Client *client, int argc, char *argv[])
+handle_count(Client &client, int argc, char *argv[])
{
SongFilter filter;
if (!filter.Parse(argc - 1, argv + 1, false)) {
@@ -144,7 +144,7 @@ handle_count(Client *client, int argc, char *argv[])
}
enum command_return
-handle_listall(Client *client, gcc_unused int argc, char *argv[])
+handle_listall(Client &client, gcc_unused int argc, char *argv[])
{
const char *directory = "";
@@ -158,7 +158,7 @@ handle_listall(Client *client, gcc_unused int argc, char *argv[])
}
enum command_return
-handle_list(Client *client, int argc, char *argv[])
+handle_list(Client &client, int argc, char *argv[])
{
unsigned tagType = locate_parse_type(argv[1]);
@@ -207,7 +207,7 @@ handle_list(Client *client, int argc, char *argv[])
}
enum command_return
-handle_listallinfo(Client *client, gcc_unused int argc, char *argv[])
+handle_listallinfo(Client &client, gcc_unused int argc, char *argv[])
{
const char *directory = "";