Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dirty flag and integrate #1725

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Use contains()
Co-authored-by: Christoph Heine <6852422+heinezen@users.noreply.github.com>
  • Loading branch information
dmwever and heinezen authored Dec 6, 2024
commit 3adb80210e7c5ca52d6deefe8a0c8c2ab20708d5
3 changes: 1 addition & 2 deletions libopenage/pathfinding/field_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ void FieldCache::evict(std::pair<unsigned long long, unsigned long long> cache_k
}

bool FieldCache::is_cached(std::pair<unsigned long long, unsigned long long> cache_key) {
auto cached = this->cache.find(cache_key);
return cached != this->cache.end();
return this->cache.contains(cache_key);
}

std::shared_ptr<IntegrationField> FieldCache::get_integration_field(std::pair<unsigned long long, unsigned long long> cache_key) {
Expand Down