diff options
author | Victor Chahuneau <vchahune@cs.cmu.edu> | 2012-05-17 10:46:23 -0400 |
---|---|---|
committer | Victor Chahuneau <vchahune@cs.cmu.edu> | 2012-05-17 10:46:23 -0400 |
commit | 3d44c4e9c80472c4e3f39bfbf730c192328c839c (patch) | |
tree | b5ab7097634b3d5d1071bd53844fe368ec1dd8dc /decoder/decoder.cc | |
parent | 141f566baf82129fd339fa28e1e98a17c6e37dcc (diff) | |
parent | 75d0f86f8f949e37c600096accf85d5521940f40 (diff) |
Merge branch 'master' of https://github.com/redpony/cdec
Diffstat (limited to 'decoder/decoder.cc')
-rw-r--r-- | decoder/decoder.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/decoder/decoder.cc b/decoder/decoder.cc index 4ce2ba86..487c7635 100644 --- a/decoder/decoder.cc +++ b/decoder/decoder.cc @@ -965,14 +965,14 @@ bool DecoderImpl::Decode(const string& input, DecoderObserver* o) { { ReadFile rf(writer.fname_); bool succeeded = HypergraphIO::ReadFromJSON(rf.stream(), &new_hg); - assert(succeeded); + if (!succeeded) abort(); } new_hg.Union(forest); bool succeeded = writer.Write(new_hg, false); - assert(succeeded); + if (!succeeded) abort(); } else { bool succeeded = writer.Write(forest, false); - assert(succeeded); + if (!succeeded) abort(); } } @@ -1052,14 +1052,14 @@ bool DecoderImpl::Decode(const string& input, DecoderObserver* o) { { ReadFile rf(writer.fname_); bool succeeded = HypergraphIO::ReadFromJSON(rf.stream(), &new_hg); - assert(succeeded); + if (!succeeded) abort(); } new_hg.Union(forest); bool succeeded = writer.Write(new_hg, false); - assert(succeeded); + if (!succeeded) abort(); } else { bool succeeded = writer.Write(forest, false); - assert(succeeded); + if (!succeeded) abort(); } } if (aligner_mode && !output_training_vector) |