diff options
author | tldr <[email protected]> | 2022-10-11 11:21:16 +0300 |
---|---|---|
committer | tldr <[email protected]> | 2022-10-11 11:21:16 +0300 |
commit | 128195d32b1e2057a59cb74b66a2144f6d1e1853 (patch) | |
tree | b0f784fa6283d7c4c64a54d0874d9e0f8aa0d144 /util/generic/lazy_value.h | |
parent | 184cd08ea40981258180039a6b3f40aed6e8caae (diff) |
[util]TLazyValue: remove operator bool and Defined
Diffstat (limited to 'util/generic/lazy_value.h')
-rw-r--r-- | util/generic/lazy_value.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/util/generic/lazy_value.h b/util/generic/lazy_value.h index 3c720f76b5a..e54cdb31d0d 100644 --- a/util/generic/lazy_value.h +++ b/util/generic/lazy_value.h @@ -15,16 +15,12 @@ public: { } - explicit operator bool() const noexcept { - return Defined(); - } - - bool Defined() const noexcept { + bool WasLazilyInitialized() const noexcept { return ValueHolder.Defined(); } const T& GetRef() const { - if (!Defined()) { + if (!WasLazilyInitialized()) { InitDefault(); } return *ValueHolder; |