From cd5d8e0ab902a0c87e108b863aca2888248a4516 Mon Sep 17 00:00:00 2001 From: graehl Date: Tue, 20 Jul 2010 21:38:29 +0000 Subject: hash.h git-svn-id: https://ws10smt.googlecode.com/svn/trunk@342 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/dict.h | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'decoder/dict.h') diff --git a/decoder/dict.h b/decoder/dict.h index dd433c3e..348a97e3 100644 --- a/decoder/dict.h +++ b/decoder/dict.h @@ -1,37 +1,21 @@ #ifndef DICT_H_ #define DICT_H_ -#include "config.h" #include #include -#ifdef HAVE_SPARSEHASH -# include -#else -# include -#endif #include #include -#include - +#include "hash.h" #include "wordid.h" class Dict { typedef -#ifdef HAVE_SPARSEHASH - google::dense_hash_map -#else - std::tr1::unordered_map -#endif - > Map; - + HASH_MAP > Map; public: Dict() : b0_("") { -#ifdef HAVE_SPARSEHASH - d_.set_empty_key(""); - d_.set_deleted_key(""); -#endif + HASH_MAP_EMPTY(d_,""); words_.reserve(1000); } -- cgit v1.2.3