]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Some more `auto` instead of explicit types 11780/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 2 Aug 2022 08:19:58 +0000 (10:19 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 2 Aug 2022 08:19:58 +0000 (10:19 +0200)
pdns/syncres.cc

index 70b8e3ac510bf3f43b40e6015352fb168db2a168..1533b5f269c330b623dbe0328f238d5033ef171a 100644 (file)
@@ -123,13 +123,13 @@ private:
     void submit(int arg, const struct timeval& last, const struct timeval& now)
     {
       d_last = arg;
-      float val = static_cast<float>(arg);
+      auto val = static_cast<float>(arg);
       if (d_val == 0) {
         d_val = val;
       }
       else {
-        float diff = makeFloat(last - now);
-        float factor = expf(diff) / 2.0f; // might be '0.5', or 0.0001
+        auto diff = makeFloat(last - now);
+        auto factor = expf(diff) / 2.0f; // might be '0.5', or 0.0001
         d_val = (1.0f - factor) * val + factor * d_val;
       }
     }