From c05ef1459c68e0a37e645b1c32caeea0961edef5 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Tue, 28 Apr 2020 16:41:37 +0200 Subject: BLI: add Set.clear method --- source/blender/blenlib/BLI_set.hh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/blenlib/BLI_set.hh') 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. -- cgit v1.2.3