diff --git a/modules/juce_core/misc/juce_Uuid.cpp b/modules/juce_core/misc/juce_Uuid.cpp index ce134b69b1..a9d71ec31d 100644 --- a/modules/juce_core/misc/juce_Uuid.cpp +++ b/modules/juce_core/misc/juce_Uuid.cpp @@ -51,6 +51,8 @@ Uuid& Uuid::operator= (const Uuid& other) noexcept bool Uuid::operator== (const Uuid& other) const noexcept { return memcmp (uuid, other.uuid, sizeof (uuid)) == 0; } bool Uuid::operator!= (const Uuid& other) const noexcept { return ! operator== (other); } +Uuid Uuid::null ((const uint8*) nullptr); + bool Uuid::isNull() const noexcept { for (size_t i = 0; i < sizeof (uuid); ++i) diff --git a/modules/juce_core/misc/juce_Uuid.h b/modules/juce_core/misc/juce_Uuid.h index 29974dec66..b05b3c2a62 100644 --- a/modules/juce_core/misc/juce_Uuid.h +++ b/modules/juce_core/misc/juce_Uuid.h @@ -60,6 +60,9 @@ public: /** Returns true if the ID is zero. */ bool isNull() const noexcept; + /** A static null Uuid object. */ + static Uuid null; + bool operator== (const Uuid& other) const noexcept; bool operator!= (const Uuid& other) const noexcept;