From 47c4b6358b005b6db0bc61a798f8d1c24a4f4258 Mon Sep 17 00:00:00 2001 From: Joan Sola <jsola@iri.upc.edu> Date: Wed, 19 Dec 2018 16:23:30 +0100 Subject: [PATCH] Fix std::setfill so that we always leave the ctout state with a space fill --- src/test/gtest_odom_2D.cpp | 1 + src/time_stamp.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/test/gtest_odom_2D.cpp b/src/test/gtest_odom_2D.cpp index 0ee5206e8..da1e5ca48 100644 --- a/src/test/gtest_odom_2D.cpp +++ b/src/test/gtest_odom_2D.cpp @@ -364,6 +364,7 @@ TEST(Odom2D, KF_callback) std::cout << "capture ts: " << capture->getTimeStamp() << " - " << capture->getTimeStamp().get(); std::cout << "nsec: " << capture->getTimeStamp().getNanoSeconds() << std::endl; std::cout << "filled nsec: " << std::setfill('0') << std::setw(9) << std::right << capture->getTimeStamp().getNanoSeconds() << std::endl; + std::cout << std::setfill(' '); // Processor sensor_odom2d->process(capture); diff --git a/src/time_stamp.cpp b/src/time_stamp.cpp index 3ec68441b..543ceb2ca 100644 --- a/src/time_stamp.cpp +++ b/src/time_stamp.cpp @@ -6,6 +6,7 @@ namespace wolf { std::ostream& operator<<(std::ostream& os, const TimeStamp& _ts) { os << _ts.getSeconds() << "." << std::setfill('0') << std::setw(9) << std::right <<_ts.getNanoSeconds(); // write obj to stream + os << std::setfill(' '); return os; } -- GitLab