diff options
author | Kenneth Heafield <github@kheafield.com> | 2011-11-18 16:07:41 +0400 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2011-11-18 16:07:41 +0400 |
commit | bf78f7a1acbadbab8da23502d96eb382b60a6b6e (patch) | |
tree | b3ca4bb831bf5f8ea6cd53bbadff2749faa8bca4 /moses-cmd | |
parent | 1192e6f2b045e00fe74060277e7a797a02b53075 (diff) |
Replace assert with CHECK until people learn how to use assert properly
Diffstat (limited to 'moses-cmd')
-rw-r--r-- | moses-cmd/src/IOWrapper.cpp | 6 | ||||
-rw-r--r-- | moses-cmd/src/LatticeMBRGrid.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/moses-cmd/src/IOWrapper.cpp b/moses-cmd/src/IOWrapper.cpp index b3ae5fafe..318f44403 100644 --- a/moses-cmd/src/IOWrapper.cpp +++ b/moses-cmd/src/IOWrapper.cpp @@ -158,13 +158,13 @@ void IOWrapper::Initialization(const std::vector<FactorType> &/*inputFactorOrder if (staticData.IsDetailedTranslationReportingEnabled()) { const std::string &path = staticData.GetDetailedTranslationReportingFilePath(); m_detailedTranslationReportingStream = new std::ofstream(path.c_str()); - assert(m_detailedTranslationReportingStream->good()); + CHECK(m_detailedTranslationReportingStream->good()); } // sentence alignment output if (! staticData.GetAlignmentOutputFile().empty()) { m_alignmentOutputStream = new ofstream(staticData.GetAlignmentOutputFile().c_str()); - assert(m_alignmentOutputStream->good()); + CHECK(m_alignmentOutputStream->good()); } } @@ -188,7 +188,7 @@ InputType*IOWrapper::GetInput(InputType* inputType) */ void OutputSurface(std::ostream &out, const Phrase &phrase, const std::vector<FactorType> &outputFactorOrder, bool reportAllFactors) { - assert(outputFactorOrder.size() > 0); + CHECK(outputFactorOrder.size() > 0); if (reportAllFactors == true) { out << phrase; } else { diff --git a/moses-cmd/src/LatticeMBRGrid.cpp b/moses-cmd/src/LatticeMBRGrid.cpp index bd7564279..8d6095dde 100644 --- a/moses-cmd/src/LatticeMBRGrid.cpp +++ b/moses-cmd/src/LatticeMBRGrid.cpp @@ -64,7 +64,7 @@ public: /** Add a parameter with key, command line argument, and default value */ void addParam(gridkey key, const string& arg, float defaultValue) { m_args[arg] = key; - assert(m_grid.find(key) == m_grid.end()); + CHECK(m_grid.find(key) == m_grid.end()); m_grid[key].push_back(defaultValue); } |