1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2025-02-06 12:25:10 +01:00

Lazy: Fix bool

This commit is contained in:
Jonas Kvinge 2025-01-22 17:49:52 +01:00
parent 719fa6ffb3
commit 5db01482eb

View File

@ -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(); }