Skip to content

Commit

Permalink
Cache: const fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Dec 28, 2021
1 parent 7cb1459 commit da888b8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Engine/Cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -1601,7 +1601,7 @@ class Cache
const EntryTypePtr & front = entries.front();

if (front->getKey().getCacheHolderID() == holderID) {
for (typename std::list<EntryTypePtr>::iterator it = entries.begin(); it != entries.end(); ++it) {
for (typename std::list<EntryTypePtr>::const_iterator it = entries.begin(); it != entries.end(); ++it) {
*ramOccupied += (*it)->size();
}
}
Expand All @@ -1614,7 +1614,7 @@ class Cache
const EntryTypePtr & front = entries.front();

if (front->getKey().getCacheHolderID() == holderID) {
for (typename std::list<EntryTypePtr>::iterator it = entries.begin(); it != entries.end(); ++it) {
for (typename std::list<EntryTypePtr>::const_iterator it = entries.begin(); it != entries.end(); ++it) {
*diskOccupied += (*it)->size();
}
}
Expand All @@ -1640,7 +1640,7 @@ class Cache

if ( (front->getKey().getCacheHolderID() == holderID) &&
( ( front->getKey().getTreeVersion() != nodeHash) || removeAll ) ) {
for (typename std::list<EntryTypePtr>::iterator it = entries.begin(); it != entries.end(); ++it) {
for (typename std::list<EntryTypePtr>::const_iterator it = entries.begin(); it != entries.end(); ++it) {
toDelete.push_back(*it);
}
} else {
Expand All @@ -1657,7 +1657,7 @@ class Cache

if ( (front->getKey().getCacheHolderID() == holderID) &&
( ( front->getKey().getTreeVersion() != nodeHash) || removeAll ) ) {
for (typename std::list<EntryTypePtr>::iterator it = entries.begin(); it != entries.end(); ++it) {
for (typename std::list<EntryTypePtr>::const_iterator it = entries.begin(); it != entries.end(); ++it) {
toDelete.push_back(*it);
}
} else {
Expand Down

0 comments on commit da888b8

Please sign in to comment.