diff options
| author | Stefan Boberg <[email protected]> | 2025-03-06 17:35:39 +0100 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2025-03-06 17:35:39 +0100 |
| commit | b044289e3c8fbc4eb4ffa5c1d96da51aa0a41f9b (patch) | |
| tree | a511dd945c87415fb5389e6579299095e3f3afc8 /src/zenutil/cache/cachepolicy.cpp | |
| parent | switched std::vector -> eastl::vector (diff) | |
| download | zen-sb/eastl.tar.xz zen-sb/eastl.zip | |
std::span -> eastl::spansb/eastl
Diffstat (limited to 'src/zenutil/cache/cachepolicy.cpp')
| -rw-r--r-- | src/zenutil/cache/cachepolicy.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/zenutil/cache/cachepolicy.cpp b/src/zenutil/cache/cachepolicy.cpp index 8bfb11a30..0b3551d38 100644 --- a/src/zenutil/cache/cachepolicy.cpp +++ b/src/zenutil/cache/cachepolicy.cpp @@ -163,7 +163,7 @@ public: Values.insert(Insert, Value); } - inline std::span<const CacheValuePolicy> GetValuePolicies() const final { return Values; } + inline eastl::span<const CacheValuePolicy> GetValuePolicies() const final { return Values; } private: eastl::vector<CacheValuePolicy> Values; @@ -174,8 +174,8 @@ CacheRecordPolicy::GetValuePolicy(const Oid& Id) const { if (Shared) { - const std::span<const CacheValuePolicy> Values = Shared->GetValuePolicies(); - const auto Iter = + const eastl::span<const CacheValuePolicy> Values = Shared->GetValuePolicies(); + const auto Iter = std::lower_bound(Values.begin(), Values.end(), Id, [](const CacheValuePolicy& A, const Oid& B) { return A.Id < B; }); if (Iter != Values.end() && Iter->Id == Id) { @@ -272,8 +272,8 @@ CacheRecordPolicyBuilder::Build() const auto Add = [](const CachePolicy A, const CachePolicy B) { return ((A | B) & ~CachePolicy::SkipData) | ((A & B) & CachePolicy::SkipData); }; - const std::span<const CacheValuePolicy> Values = Shared->GetValuePolicies(); - Policy.RecordPolicy = BasePolicy; + const eastl::span<const CacheValuePolicy> Values = Shared->GetValuePolicies(); + Policy.RecordPolicy = BasePolicy; for (const CacheValuePolicy& ValuePolicy : Values) { Policy.RecordPolicy = Add(Policy.RecordPolicy, ValuePolicy.Policy); |