From: Arvin Schnell Date: Thu, 24 Apr 2025 10:50:23 +0000 (+0200) Subject: - coding style X-Git-Tag: v0.13.0~125^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f0b493ca153182198e87ba6bfcd4400d6b105bc4;p=thirdparty%2Fsnapper.git - coding style --- diff --git a/client/proxy/proxy-dbus.cc b/client/proxy/proxy-dbus.cc index 6c3a9186..743e705e 100644 --- a/client/proxy/proxy-dbus.cc +++ b/client/proxy/proxy-dbus.cc @@ -239,7 +239,7 @@ ProxySnapperDbus::createSingleSnapshot(const SCD& scd, Plugins::Report& report) proxy_snapshots.emplace_back(new ProxySnapshotDbus(&proxy_snapshots, num)); - return --proxy_snapshots.end(); + return prev(proxy_snapshots.end()); } @@ -252,7 +252,7 @@ ProxySnapperDbus::createSingleSnapshot(ProxySnapshots::const_iterator parent, co proxy_snapshots.emplace_back(new ProxySnapshotDbus(&proxy_snapshots, num)); - return --proxy_snapshots.end(); + return prev(proxy_snapshots.end()); } @@ -265,7 +265,7 @@ ProxySnapperDbus::createSingleSnapshotOfDefault(const SCD& scd, Plugins::Report& proxy_snapshots.emplace_back(new ProxySnapshotDbus(&proxy_snapshots, num)); - return --proxy_snapshots.end(); + return prev(proxy_snapshots.end()); } @@ -277,7 +277,7 @@ ProxySnapperDbus::createPreSnapshot(const SCD& scd, Plugins::Report& report) proxy_snapshots.emplace_back(new ProxySnapshotDbus(&proxy_snapshots, num)); - return --proxy_snapshots.end(); + return prev(proxy_snapshots.end()); } @@ -289,7 +289,7 @@ ProxySnapperDbus::createPostSnapshot(ProxySnapshots::const_iterator pre, const S proxy_snapshots.emplace_back(new ProxySnapshotDbus(&proxy_snapshots, num)); - return --proxy_snapshots.end(); + return prev(proxy_snapshots.end()); } diff --git a/client/proxy/proxy-lib.cc b/client/proxy/proxy-lib.cc index 6b8b42cc..ea8ca36f 100644 --- a/client/proxy/proxy-lib.cc +++ b/client/proxy/proxy-lib.cc @@ -92,7 +92,7 @@ ProxySnapperLib::createSingleSnapshot(const SCD& scd, Plugins::Report& report) { proxy_snapshots.emplace_back(new ProxySnapshotLib(snapper->createSingleSnapshot(scd, report))); - return --proxy_snapshots.end(); + return prev(proxy_snapshots.end()); } @@ -101,7 +101,7 @@ ProxySnapperLib::createSingleSnapshot(ProxySnapshots::const_iterator parent, con { proxy_snapshots.emplace_back(new ProxySnapshotLib(snapper->createSingleSnapshot(to_lib(*parent).it, scd, report))); - return --proxy_snapshots.end(); + return prev(proxy_snapshots.end()); } @@ -110,7 +110,7 @@ ProxySnapperLib::createSingleSnapshotOfDefault(const SCD& scd, Plugins::Report& { proxy_snapshots.emplace_back(new ProxySnapshotLib(snapper->createSingleSnapshotOfDefault(scd, report))); - return --proxy_snapshots.end(); + return prev(proxy_snapshots.end()); } @@ -119,7 +119,7 @@ ProxySnapperLib::createPreSnapshot(const SCD& scd, Plugins::Report& report) { proxy_snapshots.emplace_back(new ProxySnapshotLib(snapper->createPreSnapshot(scd, report))); - return --proxy_snapshots.end(); + return prev(proxy_snapshots.end()); } @@ -128,7 +128,7 @@ ProxySnapperLib::createPostSnapshot(ProxySnapshots::const_iterator pre, const SC { proxy_snapshots.emplace_back(new ProxySnapshotLib(snapper->createPostSnapshot(to_lib(*pre).it, scd, report))); - return --proxy_snapshots.end(); + return prev(proxy_snapshots.end()); }