Skip to content

Commit 479dc59

Browse files
HuaHuaYwgtmac
andauthored
Update src/iceberg/util/lazy.h
Co-authored-by: Gang Wu <[email protected]>
1 parent 0ee0a47 commit 479dc59

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/iceberg/util/lazy.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,21 @@ class Lazy {
4646
template <typename... Args>
4747
requires std::invocable<decltype(InitFunc), Args...> &&
4848
std::same_as<std::invoke_result_t<decltype(InitFunc), Args...>, Result<T>>
49-
Result<T*> get(Args&&... args) const {
49+
Result<T*> Get(Args&&... args) const {
5050
Result<T> result;
51-
std::call_once(flag, [&result, this, &args...]() {
51+
std::call_once(flag_, [&result, this, &args...]() {
5252
result = InitFunc(std::forward<Args>(args)...);
5353
if (result) {
54-
this->value = std::move(result.value());
54+
this->value_ = std::move(result.value());
5555
}
5656
});
5757
ICEBERG_RETURN_UNEXPECTED(result);
58-
return &value;
58+
return &value_;
5959
}
6060

6161
private:
62-
mutable T value;
63-
mutable std::once_flag flag;
62+
mutable T value_;
63+
mutable std::once_flag flag_;
6464
};
6565

6666
}; // namespace iceberg

0 commit comments

Comments
 (0)