diff options
author | Narayan Kamath <narayan@google.com> | 2014-02-11 14:05:35 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-02-11 14:05:35 +0000 |
commit | 3ff18faac21553f027cdb1ff4a98447f333750bd (patch) | |
tree | 8078c36a1a7b78698fa1a5570d967d61d6c212cd | |
parent | 091e8d2aefe39cec85f64d74898354fff596735c (diff) | |
parent | deefd1fdeaf0b538a13219517f8795fdde198e21 (diff) | |
download | frameworks_base-3ff18faac21553f027cdb1ff4a98447f333750bd.zip frameworks_base-3ff18faac21553f027cdb1ff4a98447f333750bd.tar.gz frameworks_base-3ff18faac21553f027cdb1ff4a98447f333750bd.tar.bz2 |
am deefd1fd: am 5f7c0b1d: am 6d8b21a8: Merge "Fix TinyHashMap to use generic hash_type instead of hash_t"
* commit 'deefd1fdeaf0b538a13219517f8795fdde198e21':
Fix TinyHashMap to use generic hash_type instead of hash_t
-rw-r--r-- | libs/hwui/utils/TinyHashMap.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libs/hwui/utils/TinyHashMap.h b/libs/hwui/utils/TinyHashMap.h index 8855140..4ff9a42 100644 --- a/libs/hwui/utils/TinyHashMap.h +++ b/libs/hwui/utils/TinyHashMap.h @@ -24,8 +24,6 @@ namespace uirenderer { /** * A very simple hash map that doesn't allow duplicate keys, overwriting the older entry. - * - * Currently, expects simple keys that are handled by hash_t() */ template <typename TKey, typename TValue> class TinyHashMap { @@ -36,7 +34,7 @@ public: * Puts an entry in the hash, removing any existing entry with the same key */ void put(TKey key, TValue value) { - hash_t hash = hash_t(key); + hash_t hash = android::hash_type(key); ssize_t index = mTable.find(-1, hash, key); if (index != -1) { @@ -51,7 +49,7 @@ public: * Return true if key is in the map, in which case stores the value in the output ref */ bool get(TKey key, TValue& outValue) { - hash_t hash = hash_t(key); + hash_t hash = android::hash_type(key); ssize_t index = mTable.find(-1, hash, key); if (index == -1) { return false; |