mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
change stoi to atoi
This commit is contained in:
parent
2e1b6e0443
commit
986106a553
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user