From 1ae28e07b6aae2d933af42b689bd07568fc2214d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Tue, 15 Feb 2022 21:08:12 -0500
Subject: [PATCH] storage: cleanup

---
 src/storage.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/storage.h b/src/storage.h
index 29bd5067..9c9f9db9 100644
--- a/src/storage.h
+++ b/src/storage.h
@@ -37,8 +37,7 @@ public:
         storedValues_.emplace(expiration, std::pair<InfoHash, Value::Id>(id, value.id));
     }
     void erase(const InfoHash& id, const Value& value, time_point expiration) {
-        auto size = value.size();
-        totalSize_ -= size;
+        totalSize_ -= value.size();
         auto range = storedValues_.equal_range(expiration);
         for (auto rit = range.first; rit != range.second;) {
             if (rit->second.first == id && rit->second.second == value.id) {
-- 
GitLab