From 68e011ed8dfdffdd1446d5375a8ce7c0dc1dd6bc Mon Sep 17 00:00:00 2001 From: lm Date: Fri, 14 May 2010 16:27:57 +0200 Subject: [PATCH] Improved log compressor to write out NaN for unknown values --- src/LogCompressor.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/LogCompressor.cc b/src/LogCompressor.cc index 5737c7379..9b5dcc196 100644 --- a/src/LogCompressor.cc +++ b/src/LogCompressor.cc @@ -81,6 +81,11 @@ void LogCompressor::run() QString time = parts.first(); QString field = parts.at(2); QString value = parts.at(3); + // Enforce NaN if no value is present + if (value.length() == 0 || value == "" || value == " " || value == "\t" || value == "\n") + { + value = "NaN"; + } // Get matching output line quint64 index = times->indexOf(time); QString outLine = outLines->at(index); -- 2.22.0