From: Otto Moerbeek Date: Wed, 3 Apr 2024 12:25:15 +0000 (+0200) Subject: A few type fixes, mostly cosmetical X-Git-Tag: rec-5.1.0-alpha1~55^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F14025%2Fhead;p=thirdparty%2Fpdns.git A few type fixes, mostly cosmetical --- diff --git a/pdns/stat_t.hh b/pdns/stat_t.hh index b084e761ec..96c7433514 100644 --- a/pdns/stat_t.hh +++ b/pdns/stat_t.hh @@ -62,11 +62,11 @@ namespace pdns { base_t operator--() { return --(ref()); } - base_t operator+=(const stat_t_trait& arg) { - return ref() += arg.ref(); + base_t operator+=(base_t arg) { + return ref() += arg; } - base_t operator-=(const stat_t_trait& arg) { - return ref() -= arg.ref(); + base_t operator-=(base_t arg) { + return ref() -= arg; } base_t load() const { return ref().load(); @@ -85,7 +85,7 @@ namespace pdns { const atomic_t& ref() const { return *reinterpret_cast(&counter); // NOLINT(cppcoreguidelines-pro-type-reinterpret-cast) } - typename std::aligned_storage_t counter; + typename std::aligned_storage_t counter; }; using stat_t = stat_t_trait;