using boost::iostreams::newline_filter to fix possible new line issues when reading...
authorAlexey Chernobaev <achernobaev@dev.rtsoft.ru>
Wed, 28 Mar 2018 14:04:08 +0000 (17:04 +0300)
committerAlexey Chernobaev <achernobaev@dev.rtsoft.ru>
Wed, 28 Mar 2018 14:04:08 +0000 (17:04 +0300)
src/analyze/accumulatedtracedata.cpp

index 9aed5ba..d94eff0 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <boost/algorithm/string/predicate.hpp>
 #include <boost/iostreams/filter/gzip.hpp>
+#include <boost/iostreams/filter/newline.hpp>
 #include <boost/iostreams/filtering_stream.hpp>
 
 #include "util/config.h"
@@ -146,6 +147,7 @@ bool AccumulatedTraceData::read(const std::string& inputFile, const ParsePass pa
     }
 
     boost::iostreams::filtering_istream in;
+    in.push(boost::iostreams::newline_filter(boost::iostreams::newline::posix)); // fix possible newline issues
     if (isCompressed) {
         in.push(boost::iostreams::gzip_decompressor());
     }