We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17bf5c1 commit a8c85f5Copy full SHA for a8c85f5
modules/juce_gui_basics/components/juce_Component.h
@@ -2414,6 +2414,9 @@ class JUCE_API Component : public MouseListener
2414
/** If the component is valid, this deletes it and sets this pointer to null. */
2415
void deleteAndZero() { delete std::exchange (weakRef, nullptr); }
2416
2417
+ bool operator== (SafePointer other) const noexcept { return weakRef == other.weakRef; }
2418
+ bool operator!= (SafePointer other) const noexcept { return ! operator== (other); }
2419
+
2420
bool operator== (ComponentType* component) const noexcept { return weakRef == component; }
2421
bool operator!= (ComponentType* component) const noexcept { return weakRef != component; }
2422
0 commit comments