Revert "[Utils] Use g_direct_equal if NULL is passed in as the equals function"
authorVlad Brezae <brezaevlad@gmail.com>
Fri, 17 Feb 2017 17:34:56 +0000 (19:34 +0200)
committerVlad Brezae <brezaevlad@gmail.com>
Mon, 20 Feb 2017 12:24:26 +0000 (14:24 +0200)
This reverts commit 914ecbcfec62bfc34984b3e121456d3f476a4707.

Having equal_func NULL is an optimization to avoid unnecessary calls.

mono/utils/mono-conc-hashtable.c

index 9b92493191ed1a08bad915c7ab7df8ecd6a5fcb5..9f5fd6addb19608c19acb1a7549eecf7000af369 100644 (file)
@@ -114,7 +114,7 @@ mono_conc_hashtable_new (GHashFunc hash_func, GEqualFunc key_equal_func)
 {
        MonoConcurrentHashTable *res = g_new0 (MonoConcurrentHashTable, 1);
        res->hash_func = hash_func ? hash_func : g_direct_hash;
-       res->equal_func = key_equal_func ? key_equal_func : g_direct_equal;
+       res->equal_func = key_equal_func;
        // res->equal_func = g_direct_equal;
        res->table = conc_table_new (INITIAL_SIZE);
        res->element_count = 0;