aboutsummaryrefslogtreecommitdiffstats
path: root/src/StickerDatabase.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/StickerDatabase.cxx
parent59f8144c50765189594d5932fc25869f9ea6e265 (diff)
downloadmpd-ff626ac76357940b2f0ac5cb243a68ac13df0f8a.tar.gz
mpd-ff626ac76357940b2f0ac5cb243a68ac13df0f8a.tar.xz
mpd-ff626ac76357940b2f0ac5cb243a68ac13df0f8a.zip
*: use references instead of pointers
Diffstat (limited to 'src/StickerDatabase.cxx')
-rw-r--r--src/StickerDatabase.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/StickerDatabase.cxx b/src/StickerDatabase.cxx
index ca72a6024..869b91474 100644
--- a/src/StickerDatabase.cxx
+++ b/src/StickerDatabase.cxx
@@ -507,22 +507,22 @@ sticker_free(struct sticker *sticker)
}
const char *
-sticker_get_value(const struct sticker *sticker, const char *name)
+sticker_get_value(const struct sticker &sticker, const char *name)
{
- auto i = sticker->table.find(name);
- if (i == sticker->table.end())
+ auto i = sticker.table.find(name);
+ if (i == sticker.table.end())
return nullptr;
return i->second.c_str();
}
void
-sticker_foreach(const struct sticker *sticker,
+sticker_foreach(const sticker &sticker,
void (*func)(const char *name, const char *value,
void *user_data),
void *user_data)
{
- for (const auto &i : sticker->table)
+ for (const auto &i : sticker.table)
func(i.first.c_str(), i.second.c_str(), user_data);
}