From d575b72c16d217353795594032196a5857907de2 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Tue, 28 Apr 2020 16:35:49 +0200 Subject: BLI: add Set.is_empty method --- source/blender/blenlib/BLI_set.hh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source') 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 @@ -276,6 +276,14 @@ class Set { return m_array.slots_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. -- cgit v1.2.3