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:41:37 +0300
committerJacques Lucke <jacques@blender.org>2020-04-28 17:41:37 +0300
commitc05ef1459c68e0a37e645b1c32caeea0961edef5 (patch)
treec7c5f3337abfd01a8c362d73c6c2409ead180ce8 /source/blender/blenlib
parentd575b72c16d217353795594032196a5857907de2 (diff)
BLI: add Set.clear method
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/BLI_set.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_set.hh b/source/blender/blenlib/BLI_set.hh
index f9d4bbfaed4..dc9df5d116a 100644
--- a/source/blender/blenlib/BLI_set.hh
+++ b/source/blender/blenlib/BLI_set.hh
@@ -284,6 +284,12 @@ class Set {
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.