summaryrefslogtreecommitdiffstats
path: root/include/raul/Array.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/Array.hpp
parentcf72f2855fccaf1c579388bcdba2a219a9983d96 (diff)
downloadraul-d855f8f67a4588f44ade0ed19744c99bfe81e76c.tar.gz
raul-d855f8f67a4588f44ade0ed19744c99bfe81e76c.tar.bz2
raul-d855f8f67a4588f44ade0ed19744c99bfe81e76c.zip
Use nodiscard attribute
Diffstat (limited to 'include/raul/Array.hpp')
-rw-r--r--include/raul/Array.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/raul/Array.hpp b/include/raul/Array.hpp
index 3c6234c..0ed0ae0 100644
--- a/include/raul/Array.hpp
+++ b/include/raul/Array.hpp
@@ -126,15 +126,15 @@ public:
}
}
- size_t size() const { return _size; }
+ [[nodiscard]] size_t size() const { return _size; }
- T& operator[](size_t i) const
+ [[nodiscard]] T& operator[](size_t i) const
{
assert(i < _size);
return _elems[i];
}
- T& at(size_t i) const
+ [[nodiscard]] T& at(size_t i) const
{
assert(i < _size);
return _elems[i];