Skip to content

Commit

Permalink
Better use kiwix::startsWith()
Browse files Browse the repository at this point in the history
  • Loading branch information
kelson42 committed Jan 3, 2021
1 parent 95b32b1 commit 44c4aa9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 44c4aa9

Please sign in to comment.