diff --git a/src/reader.cpp b/src/reader.cpp index bfd3e78b8..d224bf6b3 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -128,7 +128,7 @@ namespace kiwix { if (counterMap.empty()) { counter = this->nsACount; } else { - std::map::const_iterator it = counterMap.find("text/html"); + auto it = counterMap.find("text/html"); if (it != counterMap.end()) counter = it->second; } @@ -144,9 +144,7 @@ namespace kiwix { if (counterMap.empty()) counter = this->nsICount; else { - std::map::const_iterator it; - - it = counterMap.find("image/jpeg"); + auto it = counterMap.find("image/jpeg"); if (it != counterMap.end()) counter += it->second;