From d3b568a0f5231d9615827dadf13318c71fe58c6f Mon Sep 17 00:00:00 2001 From: Arvin Schnell Date: Fri, 7 Jun 2024 13:12:07 +0200 Subject: [PATCH] - coding style (sync with libstorage-ng) --- snapper/AppUtil.cc | 8 ++++---- snapper/AppUtil.h | 6 +++--- snapper/Btrfs.cc | 2 +- snapper/Compare.cc | 2 +- snapper/SystemCmd.cc | 2 +- testsuite-cmp/cmp.cc | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/snapper/AppUtil.cc b/snapper/AppUtil.cc index f3432e03d..3f91cd38e 100644 --- a/snapper/AppUtil.cc +++ b/snapper/AppUtil.cc @@ -411,14 +411,14 @@ namespace snapper } - StopWatch::StopWatch() + Stopwatch::Stopwatch() : start_time(chrono::steady_clock::now()) { } double - StopWatch::read() const + Stopwatch::read() const { chrono::steady_clock::time_point stop_time = chrono::steady_clock::now(); chrono::steady_clock::duration duration = stop_time - start_time; @@ -427,10 +427,10 @@ namespace snapper std::ostream& - operator<<(std::ostream& s, const StopWatch& sw) + operator<<(std::ostream& s, const Stopwatch& stopwatch) { boost::io::ios_all_saver ias(s); - return s << fixed << sw.read() << "s"; + return s << fixed << stopwatch.read() << "s"; } diff --git a/snapper/AppUtil.h b/snapper/AppUtil.h index c136c1f01..d9c95603e 100644 --- a/snapper/AppUtil.h +++ b/snapper/AppUtil.h @@ -119,15 +119,15 @@ namespace snapper vector getgrouplist(const char* username, gid_t gid); - class StopWatch + class Stopwatch { public: - StopWatch(); + Stopwatch(); double read() const; - friend std::ostream& operator<<(std::ostream& s, const StopWatch& sw); + friend std::ostream& operator<<(std::ostream& s, const Stopwatch& sopwatch); protected: diff --git a/snapper/Btrfs.cc b/snapper/Btrfs.cc index 8ebdcf600..cd6a9ac18 100644 --- a/snapper/Btrfs.cc +++ b/snapper/Btrfs.cc @@ -1361,7 +1361,7 @@ namespace snapper try { - StopWatch stopwatch; + Stopwatch stopwatch; const SDir subvolume(openSubvolumeDir()); diff --git a/snapper/Compare.cc b/snapper/Compare.cc index d713b9b27..afebdb61e 100644 --- a/snapper/Compare.cc +++ b/snapper/Compare.cc @@ -450,7 +450,7 @@ namespace snapper y2mil("dev1:" << cmp_data.dev1 << " dev2:" << cmp_data.dev2); - StopWatch stopwatch; + Stopwatch stopwatch; cmpDirsWorker(cmp_data, dir1, dir2, ""); y2mil("stopwatch " << stopwatch << " for comparing directories"); } diff --git a/snapper/SystemCmd.cc b/snapper/SystemCmd.cc index d3bded76b..bdda70ac3 100644 --- a/snapper/SystemCmd.cc +++ b/snapper/SystemCmd.cc @@ -81,7 +81,7 @@ SystemCmd::~SystemCmd() void SystemCmd::execute() { - StopWatch stopwatch; + Stopwatch stopwatch; File_aC[IDX_STDERR] = File_aC[IDX_STDOUT] = NULL; invalidate(); diff --git a/testsuite-cmp/cmp.cc b/testsuite-cmp/cmp.cc index 17a08038f..6812edef5 100644 --- a/testsuite-cmp/cmp.cc +++ b/testsuite-cmp/cmp.cc @@ -36,7 +36,7 @@ cmp(const string& fstype, const string& subvolume, unsigned int num1, unsigned i double t1; { - StopWatch sw1; + Stopwatch sw1; #if 1 cmpdirs_cb_t cb1 = helper(result1); @@ -58,7 +58,7 @@ cmp(const string& fstype, const string& subvolume, unsigned int num1, unsigned i double t2; { - StopWatch sw2; + Stopwatch sw2; #if 1 cmpdirs_cb_t cb2 = helper(result2);