From 61e303bf40bf00f04e2c0d148fb6792b23987332 Mon Sep 17 00:00:00 2001 From: graehl Date: Wed, 11 Aug 2010 03:10:07 +0000 Subject: get_default mapped_type git-svn-id: https://ws10smt.googlecode.com/svn/trunk@517 ec762483-ff6d-05da-a07a-a48fb63a330f --- utils/hash.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils/hash.h') diff --git a/utils/hash.h b/utils/hash.h index 5d7f2010..c241d139 100755 --- a/utils/hash.h +++ b/utils/hash.h @@ -53,7 +53,7 @@ struct murmur_hash_array // adds default val to table if key wasn't found, returns ref to val template -typename H::data_type & get_default(H &ht,K const& k,typename H::data_type const& v) { +typename H::mapped_type & get_default(H &ht,K const& k,typename H::mapped_type const& v) { return const_cast(ht.insert(typename H::value_type(k,v)).first->second); } -- cgit v1.2.3