summaryrefslogtreecommitdiffstats
path: root/include/raul/Maid.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-06-29 09:45:46 -0400
committerDavid Robillard <d@drobilla.net>2022-07-20 16:24:23 -0400
commitd855f8f67a4588f44ade0ed19744c99bfe81e76c (patch)
tree83128be6067bdd21a4c6a9440e15f387e20e9025 /include/raul/Maid.hpp
parentcf72f2855fccaf1c579388bcdba2a219a9983d96 (diff)
downloadraul-d855f8f67a4588f44ade0ed19744c99bfe81e76c.tar.gz
raul-d855f8f67a4588f44ade0ed19744c99bfe81e76c.tar.bz2
raul-d855f8f67a4588f44ade0ed19744c99bfe81e76c.zip
Use nodiscard attribute
Diffstat (limited to 'include/raul/Maid.hpp')
-rw-r--r--include/raul/Maid.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/raul/Maid.hpp b/include/raul/Maid.hpp
index db957d3..51e2dca 100644
--- a/include/raul/Maid.hpp
+++ b/include/raul/Maid.hpp
@@ -103,7 +103,10 @@ public:
~Maid() { cleanup(); }
/// Return false iff there is currently no garbage
- bool empty() const { return !_disposed.load(std::memory_order_relaxed); }
+ [[nodiscard]] bool empty() const
+ {
+ return !_disposed.load(std::memory_order_relaxed);
+ }
/**
Enqueue an object for deletion when cleanup() is called next.