adapt_to_gxx44

This commit is contained in:
wyy 2014-03-18 11:51:04 -05:00
parent 52b6c61326
commit ed39e558bc
5 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,7 @@
## v2.3.5 is coming
1. 适配低级版本的`g++`,已在`g++ 4.4.7`上测试通过。
## v2.3.4
1. 修改了设计上的问题,删除了`TrieManager`这个类,以避免造成一些可能的隐患。

View File

@ -16,7 +16,7 @@
### 依赖
* g++ (version >= 4.6 recommended);
* g++ (version >= 4.4.7 recommended);
* cmake (version >= 2.8 recommended);
### 下载和安装

View File

@ -84,7 +84,7 @@ namespace CppJieba
{
if(_stopWords.end() != _stopWords.find(itr->first))
{
itr = wordmap.erase(itr);
wordmap.erase(itr++);
continue;
}

View File

@ -77,8 +77,9 @@ namespace CppJieba
_minLogFreq = MAX_DOUBLE;
_setInitFlag(false);
}
Trie(const string& filePath): Trie()
Trie(const string& filePath)
{
Trie();
_setInitFlag(init(filePath));
}
~Trie()

View File

@ -84,7 +84,8 @@ bool run(int argc, char** argv)
}
int pid = getpid();
string pidStr = to_string(pid);
string pidStr;
string_format(pidStr, "%d", pid);
loadStr2File(val.c_str(), ios::out, pidStr);
LogInfo("write pid[%s] into file[%s]", pidStr.c_str(), val.c_str());