You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
865 B
27 lines
865 B
Index: src/lib/symbol-table-ops.cc |
|
--- src/lib/symbol-table-ops.cc.orig 2017-03-13 20:54:43.000000000 +0100 |
|
+++ src/lib/symbol-table-ops.cc 2017-03-14 08:18:37.871243000 +0100 |
|
@@ -6,6 +6,14 @@ |
|
|
|
#include <string> |
|
|
|
+#include <sstream> |
|
+ |
|
+template <typename T> std::string my_to_string(const T& n) { |
|
+ std::ostringstream stm; |
|
+ stm << n; |
|
+ return stm.str(); |
|
+} |
|
+ |
|
namespace fst { |
|
|
|
SymbolTable *MergeSymbolTable(const SymbolTable &left, const SymbolTable &right, |
|
@@ -111,7 +119,7 @@ |
|
int64 nlabels, SymbolTable *syms) { |
|
for (int64 i = 0; i < nlabels; ++i) { |
|
auto index = i + start_label; |
|
- if (index != syms->AddSymbol(prefix + std::to_string(i), index)) { |
|
+ if (index != syms->AddSymbol(prefix + my_to_string(i), index)) { |
|
FSTERROR() << "AddAuxiliarySymbols: Symbol table clash"; |
|
return false; |
|
}
|
|
|