Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2021-09-20 13:15:37 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-09-20 13:15:37 +0300
commit029d042e8518c53dffe2471d113d5daf4acf97d3 (patch)
treeed88fba74f93666ad35708a5a0ec829cc3a0dd59 /source/blender/blenlib/BLI_uuid.h
parent07b482c2ffdf88c6930b621bb0b18c3a5d0c0130 (diff)
UUID: add nil value for UUIDs
Add `BLI_uuid_nil()` that returns the nil UUID (used to indicate "not set") and `BLI_uuid_is_nil(uuid)` to do an equality test with the nil value.
Diffstat (limited to 'source/blender/blenlib/BLI_uuid.h')
-rw-r--r--source/blender/blenlib/BLI_uuid.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_uuid.h b/source/blender/blenlib/BLI_uuid.h
index 5440e9426bf..15913cc1017 100644
--- a/source/blender/blenlib/BLI_uuid.h
+++ b/source/blender/blenlib/BLI_uuid.h
@@ -37,6 +37,14 @@ extern "C" {
* This function is not thread-safe. */
UUID BLI_uuid_generate_random(void);
+/**
+ * Return the UUID nil value, consisting of all-zero fields.
+ */
+UUID BLI_uuid_nil(void);
+
+/** Return true iff this is the nil UUID. */
+bool BLI_uuid_is_nil(UUID uuid);
+
/** Compare two UUIDs, return true if they are equal. */
bool BLI_uuid_equal(UUID uuid1, UUID uuid2);