Better use kiwix::startsWith()

This commit is contained in:
Emmanuel Engelhart 2021-01-03 15:17:03 +01:00
parent 95b32b168d
commit 44c4aa931a
1 changed files with 3 additions and 3 deletions

View File

@ -120,9 +120,9 @@ unsigned int Reader::getMediaCount() const
= this->parseCounterMetadata();
unsigned int counter = 0;
for (auto it = counterMap.begin(); it != counterMap.end(); ++it) {
if (it->first.rfind("image/", 0) == 0) {
counter += it->second;
for (auto &pair:counterMap) {
if (startsWith(pair.first, "image/")) {
counter += pair.second;
}
}