From af9737504054a05694c22dd4511bdc8ae96244bf Mon Sep 17 00:00:00 2001 From: Franck Dary <franck.dary@lis-lab.fr> Date: Fri, 14 Feb 2020 09:00:59 +0100 Subject: [PATCH] Config::print now print '_' symbol instead of blank --- reading_machine/src/Config.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/reading_machine/src/Config.cpp b/reading_machine/src/Config.cpp index fe65a06..0e5f6d0 100644 --- a/reading_machine/src/Config.cpp +++ b/reading_machine/src/Config.cpp @@ -71,8 +71,12 @@ void Config::print(FILE * dest) const } for (unsigned int i = 0; i < getNbColumns()-1; i++) { - auto & colContent = isPredicted(getColName(i)) ? getLastNotEmptyHypConst(i, getFirstLineIndex()+line) : getLastNotEmptyConst(i, line); - fmt::print(dest, "{}{}", colContent, i < getNbColumns()-2 ? "\t" : "\n"); + auto & colContent = isPredicted(getColName(i)) ? getLastNotEmptyHypConst(i, getFirstLineIndex()+line) : getLastNotEmptyConst(i, getFirstLineIndex()+line); + std::string valueToPrint = colContent; + if (valueToPrint.empty()) + valueToPrint = "_"; + + fmt::print(dest, "{}{}", valueToPrint, i < getNbColumns()-2 ? "\t" : "\n"); } if (getLastNotEmptyConst(EOSColName, getFirstLineIndex()+line) == EOSSymbol1) fmt::print(dest, "\n"); -- GitLab