change stoi to atoi

This commit is contained in:
bigelephant29 2016-07-21 10:54:08 +08:00
parent 2e1b6e0443
commit 986106a553

View File

@ -6,6 +6,7 @@
#include <map> #include <map>
#include <string> #include <string>
#include <cstring> #include <cstring>
#include <cstdlib>
#include <stdint.h> #include <stdint.h>
#include <cmath> #include <cmath>
#include <limits> #include <limits>
@ -117,7 +118,7 @@ class DictTrie {
} else { } else {
MakeNodeInfo(node_info, MakeNodeInfo(node_info,
buf[0], buf[0],
(buf.size() == 2 ? std::stoi(buf[1], nullptr) : user_word_default_weight_), (buf.size() == 2 ? atoi(buf[1].c_str()) : user_word_default_weight_),
(buf.size() == 3 ? buf[2] : buf[1])); (buf.size() == 3 ? buf[2] : buf[1]));
} }
static_node_infos_.push_back(node_info); static_node_infos_.push_back(node_info);