mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-02-06 12:25:10 +01:00
Lazy: Fix bool
This commit is contained in:
parent
719fa6ffb3
commit
5db01482eb
@ -54,8 +54,8 @@ class Lazy {
|
||||
|
||||
T* operator->() const { return get(); }
|
||||
|
||||
// Returns true if the object is not yet initialized.
|
||||
explicit operator bool() const { return ptr_; }
|
||||
// Returns true if the object is initialized.
|
||||
explicit operator bool() const { return ptr_ != nullptr; }
|
||||
|
||||
// Deletes the underlying object and will re-run the initialization function if the object is requested again.
|
||||
void reset() { ptr_.reset(); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user