diff options
| author | pacefist <[email protected]> | 2022-02-10 16:50:19 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:50:19 +0300 | 
| commit | da16e7702d9b0a8a42761ad877f102ef6aa85ec0 (patch) | |
| tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/cache | |
| parent | 1b93b0d524d4c7a90f7741e61c47886723764b24 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/cache')
| -rw-r--r-- | library/cpp/cache/cache.h | 40 | 
1 files changed, 20 insertions, 20 deletions
| diff --git a/library/cpp/cache/cache.h b/library/cpp/cache/cache.h index 59a602660e7..6dc997076d9 100644 --- a/library/cpp/cache/cache.h +++ b/library/cpp/cache/cache.h @@ -406,18 +406,18 @@ public:          }          TIterator& operator++() { -            ++Iter;  -            return *this;  -        }  -  -        const TKey& Key() const {  -            return Iter->Key;  -        }  -  -        const TValue& Value() const {  -            return Iter->Value;  -        }  -  +            ++Iter; +            return *this; +        } + +        const TKey& Key() const { +            return Iter->Key; +        } + +        const TValue& Value() const { +            return Iter->Value; +        } +          friend class TCache<TKey, TValue, TListType, TDeleter>;      private: @@ -439,10 +439,10 @@ public:          return Index.size();      } -    TIterator Begin() const {  -        return TIterator(Index.begin());  -    }  -  +    TIterator Begin() const { +        return TIterator(Index.begin()); +    } +      TIterator End() const {          return TIterator(Index.end());      } @@ -454,10 +454,10 @@ public:          return TIterator(it);      } -    TIterator FindWithoutPromote(const TKey& key) const {  -        return TIterator(Index.find(TItem(key)));  -    }  -  +    TIterator FindWithoutPromote(const TKey& key) const { +        return TIterator(Index.find(TItem(key))); +    } +      // note: it shouldn't touch 'value' if it returns false.      bool PickOut(const TKey& key, TValue* value) {          Y_ASSERT(value); | 
