diff options
author | hieuhoang1972 <hieuhoang1972@1f5c12ca-751b-0410-a591-d2e778427230> | 2010-08-12 16:54:55 +0400 |
---|---|---|
committer | hieuhoang1972 <hieuhoang1972@1f5c12ca-751b-0410-a591-d2e778427230> | 2010-08-12 16:54:55 +0400 |
commit | ef09298824add484bfeb3af9e8223e24409e7e34 (patch) | |
tree | e130e7bc3fc21637572607c5a4ac41a976c74042 /OnDiskPt | |
parent | 7b06173064ce24685899a8c33815ffb1566dffa9 (diff) |
move function calls with side effects out of asserts
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@3403 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'OnDiskPt')
-rw-r--r-- | OnDiskPt/src/OnDiskWrapper.cpp | 3 | ||||
-rw-r--r-- | OnDiskPt/src/PhraseNode.cpp | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/OnDiskPt/src/OnDiskWrapper.cpp b/OnDiskPt/src/OnDiskWrapper.cpp index a5f0650f5..c580fbb5a 100644 --- a/OnDiskPt/src/OnDiskWrapper.cpp +++ b/OnDiskPt/src/OnDiskWrapper.cpp @@ -136,7 +136,8 @@ bool OnDiskWrapper::BeginSave(const std::string &filePath void OnDiskWrapper::EndSave() { - assert(m_rootSourceNode->Saved()); + bool ret = m_rootSourceNode->Saved(); + assert(ret); GetVocab().Save(*this); diff --git a/OnDiskPt/src/PhraseNode.cpp b/OnDiskPt/src/PhraseNode.cpp index 4923ec6d7..659c8182f 100644 --- a/OnDiskPt/src/PhraseNode.cpp +++ b/OnDiskPt/src/PhraseNode.cpp @@ -113,7 +113,6 @@ void PhraseNode::Save(OnDiskWrapper &onDiskWrapper, size_t pos, size_t tableLimi const Word &childWord = iter->first; PhraseNode &childNode = iter->second; - //assert(childNode.Saved()); // recursive if (!childNode.Saved()) childNode.Save(onDiskWrapper, pos + 1, tableLimit); |