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:
authorJacques Lucke <jacques@blender.org>2020-04-28 17:35:49 +0300
committerJacques Lucke <jacques@blender.org>2020-04-28 17:35:49 +0300
commitd575b72c16d217353795594032196a5857907de2 (patch)
tree3eee36f974a89d421d102cfde34f61213c401f7d /source/blender/blenlib/BLI_set.hh
parent69e8de434ffda6b0135b7d0656bc29d60b9dca08 (diff)
BLI: add Set.is_empty method
Diffstat (limited to 'source/blender/blenlib/BLI_set.hh')
-rw-r--r--source/blender/blenlib/BLI_set.hh8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_set.hh b/source/blender/blenlib/BLI_set.hh
index b09dd910007..f9d4bbfaed4 100644
--- a/source/blender/blenlib/BLI_set.hh
+++ b/source/blender/blenlib/BLI_set.hh
@@ -277,6 +277,14 @@ class Set {
}
/**
+ * Return true if this set contains no elements.
+ */
+ bool is_empty() const
+ {
+ return this->size() == 0;
+ }
+
+ /**
* Returns true when there is at least one element that is in both sets.
* Otherwise false.
*/