From 986106a553b96ff9acf1ff7d02c481345cd8720e Mon Sep 17 00:00:00 2001 From: bigelephant29 Date: Thu, 21 Jul 2016 10:54:08 +0800 Subject: [PATCH] change stoi to atoi --- include/cppjieba/DictTrie.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/cppjieba/DictTrie.hpp b/include/cppjieba/DictTrie.hpp index 1c428f6..26bbb2b 100644 --- a/include/cppjieba/DictTrie.hpp +++ b/include/cppjieba/DictTrie.hpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -117,7 +118,7 @@ class DictTrie { } else { MakeNodeInfo(node_info, 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])); } static_node_infos_.push_back(node_info);