diff options
Diffstat (limited to 'source/blender/blenlib/BLI_set.hh')
-rw-r--r-- | source/blender/blenlib/BLI_set.hh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_set.hh b/source/blender/blenlib/BLI_set.hh index b09dd910007..dc9df5d116a 100644 --- a/source/blender/blenlib/BLI_set.hh +++ b/source/blender/blenlib/BLI_set.hh @@ -277,6 +277,20 @@ class Set { } /** + * Return true if this set contains no elements. + */ + bool is_empty() const + { + return this->size() == 0; + } + + void clear() + { + this->~Set(); + new (this) Set(); + } + + /** * Returns true when there is at least one element that is in both sets. * Otherwise false. */ |