diff options
author | myltsev <myltsev@yandex-team.ru> | 2022-02-10 16:46:03 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:03 +0300 |
commit | fc361854fd6ee8d747229b090f0b8018e260d1fb (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/generic/mapfindptr.h | |
parent | 9166d66c30c23c9e85a7c88185a068987148d23f (diff) | |
download | ydb-fc361854fd6ee8d747229b090f0b8018e260d1fb.tar.gz |
Restoring authorship annotation for <myltsev@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/mapfindptr.h')
-rw-r--r-- | util/generic/mapfindptr.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util/generic/mapfindptr.h b/util/generic/mapfindptr.h index 98aad17984..bc10cac60f 100644 --- a/util/generic/mapfindptr.h +++ b/util/generic/mapfindptr.h @@ -36,14 +36,14 @@ struct TMapOps { inline auto FindPtr(const K& key) const { return MapFindPtr(static_cast<const Derived&>(*this), key); } - + template <class K, class DefaultValue> inline auto Value(const K& key, const DefaultValue& defaultValue) const -> std::remove_reference_t<decltype(*this->FindPtr(key))> { if (auto found = FindPtr(key)) { - return *found; - } + return *found; + } return defaultValue; - } + } template <class K, class V> inline const V& ValueRef(const K& key, V& defaultValue) const { |