diff --git a/reading_machine/src/Config.cpp b/reading_machine/src/Config.cpp index 902b1cd84f48d3c62f74f819201770ce09c6bfb9..ab35b3a58218bacbcc51e40fd063d50317a040a3 100644 --- a/reading_machine/src/Config.cpp +++ b/reading_machine/src/Config.cpp @@ -319,15 +319,11 @@ const Config::String & Config::getLastNotEmptyHypConst(const std::string & colNa Config::ValueIterator Config::getIterator(int colIndex, int lineIndex, int hypothesisIndex) { - if (!has(colIndex, lineIndex, 0)) - util::myThrow(fmt::format("asked for line {} but nbLines = {}", lineIndex, getNbLines())); return lines.begin() + getIndexOfLine(lineIndex-getFirstLineIndex()) + getIndexOfCol(colIndex) + hypothesisIndex; } Config::ConstValueIterator Config::getConstIterator(int colIndex, int lineIndex, int hypothesisIndex) const { - if (!has(colIndex, lineIndex, 0)) - util::myThrow(fmt::format("asked for line {} but nbLines = {}", lineIndex, getNbLines())); return lines.begin() + getIndexOfLine(lineIndex-getFirstLineIndex()) + getIndexOfCol(colIndex) + hypothesisIndex; } diff --git a/reading_machine/src/SubConfig.cpp b/reading_machine/src/SubConfig.cpp index 8ad29d3ea5bb4939bf5b186ef71b5c1b16c9a31c..1b63ed242fc2d900060c8cef513529d270e9c3fc 100644 --- a/reading_machine/src/SubConfig.cpp +++ b/reading_machine/src/SubConfig.cpp @@ -37,7 +37,7 @@ bool SubConfig::update() while (firstToSave != lastToSave) *linesBegin++ = *firstToSave++; - } // The new window is a bit shifted to the write, we will keep the lasts elements from old window + } // The new window is a bit shifted to the right, we will keep the lasts elements from old window else if (currentLastLineIndex > newFirstLineIndex and currentLastLineIndex < newLastLineIndex) { auto linesBegin = getIterator(0, firstLineIndex, 0);