From ff626ac76357940b2f0ac5cb243a68ac13df0f8a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 19 Oct 2013 18:48:38 +0200 Subject: *: use references instead of pointers --- src/StickerDatabase.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/StickerDatabase.cxx') 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); } -- cgit v1.2.3