diff options
author | Wu, Ke <wuke@cs.umd.edu> | 2014-10-10 10:33:23 -0400 |
---|---|---|
committer | Wu, Ke <wuke@cs.umd.edu> | 2014-10-10 10:33:23 -0400 |
commit | 5405acffd9c86ec80be4306807eda8e6ad284b89 (patch) | |
tree | 15fe8b2ea413647c2f0efd6210ca60ab9b23deb1 /utils | |
parent | 778df1879a0f38e4a8684e14e325f0a805ee8dcf (diff) |
Replace deprecated hash_map with unordred_map
Diffstat (limited to 'utils')
-rw-r--r-- | utils/maxent.cpp | 2 | ||||
-rw-r--r-- | utils/maxent.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/utils/maxent.cpp b/utils/maxent.cpp index 9115f6f2..0f49ee9d 100644 --- a/utils/maxent.cpp +++ b/utils/maxent.cpp @@ -142,7 +142,7 @@ int ME_Model::make_feature_bag(const int cutoff) { // count the occurrences of features #ifdef USE_HASH_MAP - typedef __gnu_cxx::hash_map<unsigned int, int> map_type; + typedef std::unordered_map<unsigned int, int> map_type; #else typedef std::map<unsigned int, int> map_type; #endif diff --git a/utils/maxent.h b/utils/maxent.h index 88a04e25..b1efd88e 100644 --- a/utils/maxent.h +++ b/utils/maxent.h @@ -18,7 +18,7 @@ #define USE_HASH_MAP // if you encounter errors with hash, try commenting out // this line. (the program will be a bit slower, though) #ifdef USE_HASH_MAP -#include <ext/hash_map> +#include <unordered_map> #endif // @@ -156,7 +156,7 @@ class ME_Model { struct ME_FeatureBag { #ifdef USE_HASH_MAP - typedef __gnu_cxx::hash_map<unsigned int, int> map_type; + typedef std::unordered_map<unsigned int, int> map_type; #else typedef std::map<unsigned int, int> map_type; #endif @@ -210,7 +210,7 @@ class ME_Model { struct MiniStringBag { #ifdef USE_HASH_MAP - typedef __gnu_cxx::hash_map<std::string, int, hashfun_str> map_type; + typedef std::unordered_map<std::string, int, hashfun_str> map_type; #else typedef std::map<std::string, int> map_type; #endif |