diff options
| author | tender-bum <[email protected]> | 2022-02-10 16:50:01 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:50:01 +0300 |
| commit | c78b06a63de7beec995c1007bc5332bdf3d75b69 (patch) | |
| tree | 729de992758f40b85278d4abaad655be5dd68dbc /library/cpp/containers/flat_hash/lib/expanders.h | |
| parent | 95ab23a39b5482a434361566cabdd5b0a433cb43 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/containers/flat_hash/lib/expanders.h')
| -rw-r--r-- | library/cpp/containers/flat_hash/lib/expanders.h | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/library/cpp/containers/flat_hash/lib/expanders.h b/library/cpp/containers/flat_hash/lib/expanders.h index 25b10e6bf1e..85fcda1d934 100644 --- a/library/cpp/containers/flat_hash/lib/expanders.h +++ b/library/cpp/containers/flat_hash/lib/expanders.h @@ -1,25 +1,25 @@ -#pragma once - -#include <utility> - -namespace NFlatHash { - -struct TSimpleExpander { - static constexpr bool NeedGrow(size_t size, size_t buckets) noexcept { - return size >= buckets / 2; - } - - static constexpr bool WillNeedGrow(size_t size, size_t buckets) noexcept { - return NeedGrow(size + 1, buckets); - } - - static constexpr size_t EvalNewSize(size_t buckets) noexcept { - return buckets * 2; - } - - static constexpr size_t SuitableSize(size_t size) noexcept { - return size * 2 + 1; - } -}; - -} // namespace NFlatHash +#pragma once + +#include <utility> + +namespace NFlatHash { + +struct TSimpleExpander { + static constexpr bool NeedGrow(size_t size, size_t buckets) noexcept { + return size >= buckets / 2; + } + + static constexpr bool WillNeedGrow(size_t size, size_t buckets) noexcept { + return NeedGrow(size + 1, buckets); + } + + static constexpr size_t EvalNewSize(size_t buckets) noexcept { + return buckets * 2; + } + + static constexpr size_t SuitableSize(size_t size) noexcept { + return size * 2 + 1; + } +}; + +} // namespace NFlatHash |
