Module: check_mk
Branch: master
Commit: 06e4fd36471a455169c8893e46e83e57b6ea6157
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=06e4fd36471a45…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Tue Mar 20 12:58:36 2018 +0100
Win-agent: remove floating point I/O manipulators
Clear some unnecessary floating point I/O manipulators as they were
leftovers from previous commits as the output types were changed from
floating point to integer types.
---
agents/windows/build_version | 2 +-
agents/windows/sections/SectionFileinfo.cc | 4 ++--
agents/windows/sections/SectionSystemtime.cc | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/agents/windows/build_version b/agents/windows/build_version
index 517d20b..c8ae077 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-3196
+3198
diff --git a/agents/windows/sections/SectionFileinfo.cc
b/agents/windows/sections/SectionFileinfo.cc
index 170d213..130c59a 100644
--- a/agents/windows/sections/SectionFileinfo.cc
+++ b/agents/windows/sections/SectionFileinfo.cc
@@ -41,7 +41,7 @@ SectionFileinfo::SectionFileinfo(Configuration &config, Logger
*logger,
bool SectionFileinfo::produceOutputInner(std::ostream &out,
const std::optional<std::string> &) {
Debug(_logger) << "SectionFileinfo::produceOutputInner";
- out << std::fixed << section_helpers::current_time() <<
"\n";
+ out << section_helpers::current_time() << "\n";
for (const std::string &path : *_fileinfo_paths) {
outputFileinfos(out, path.c_str());
@@ -149,7 +149,7 @@ bool SectionFileinfo::outputFileinfo(std::ostream &out,
out << filename << "|" << fs::file_size(path)
<< "|";
const auto timeEntry = chrono::duration_cast<chrono::seconds>(
fs::last_write_time(path).time_since_epoch());
- out << std::fixed << std::setprecision(0) << timeEntry.count()
<< "\n";
+ out << timeEntry.count() << "\n";
return true;
} catch (const fs::filesystem_error &e) {
Error(_logger) << e.what();
diff --git a/agents/windows/sections/SectionSystemtime.cc
b/agents/windows/sections/SectionSystemtime.cc
index bbb59c3..afde771 100644
--- a/agents/windows/sections/SectionSystemtime.cc
+++ b/agents/windows/sections/SectionSystemtime.cc
@@ -33,6 +33,6 @@ SectionSystemtime::SectionSystemtime(const Environment &env, Logger
*logger,
bool SectionSystemtime::produceOutputInner(std::ostream &out,
const std::optional<std::string> &)
{
Debug(_logger) << "SectionSystemtime::produceOutputInner";
- out << std::fixed << section_helpers::current_time();
+ out << section_helpers::current_time();
return true;
}