C++: Fix hash table initialisation in map_to_hash_variant.

This commit is contained in:
Martin Ling 2014-08-29 17:35:46 +01:00
parent d01d231487
commit b31581f8a8
1 changed files with 1 additions and 2 deletions

View File

@ -44,8 +44,7 @@ static const char *valid_string(const char *input)
static GHashTable *map_to_hash_variant(map<string, Glib::VariantBase> input) static GHashTable *map_to_hash_variant(map<string, Glib::VariantBase> input)
{ {
auto output = g_hash_table_new_full( auto output = g_hash_table_new_full(
g_variant_hash, g_variant_equal, g_free, g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
(void (*)(void *))g_variant_unref);
for (auto entry : input) for (auto entry : input)
g_hash_table_insert(output, g_hash_table_insert(output,
g_strdup(entry.first.c_str()), g_strdup(entry.first.c_str()),