diff options
Diffstat (limited to 'tools/thirdparty/OpenFst/fst/lib/symbol-table.cpp')
-rw-r--r-- | tools/thirdparty/OpenFst/fst/lib/symbol-table.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/thirdparty/OpenFst/fst/lib/symbol-table.cpp b/tools/thirdparty/OpenFst/fst/lib/symbol-table.cpp index d4715da..a27d3cf 100644 --- a/tools/thirdparty/OpenFst/fst/lib/symbol-table.cpp +++ b/tools/thirdparty/OpenFst/fst/lib/symbol-table.cpp @@ -138,9 +138,11 @@ bool SymbolTableImpl::Write(ostream &strm) const { WriteType(strm, it->second); } strm.flush(); - if (!strm) + if (!strm) { LOG(ERROR) << "SymbolTable::Write: write failed"; - return strm; + return false; + } + return true; } bool SymbolTableImpl::WriteText(ostream &strm) const { @@ -150,9 +152,11 @@ bool SymbolTableImpl::WriteText(ostream &strm) const { strm.write(line, strlen(line)); } strm.flush(); - if (!strm) + if (!strm) { LOG(ERROR) << "SymbolTable::WriteText: write failed"; - return strm; + return false; + } + return true; } } // namespace fst |