summaryrefslogtreecommitdiff
path: root/lib/glRef.hpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-08-21 13:41:50 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2022-08-21 13:41:50 +0100
commit364b4ec4392f294ddc75b9231a7e9ba935383995 (patch)
tree2092186a9d975421810ed8af68fabad7245d6c81 /lib/glRef.hpp
parentAdd missing includes (diff)
downloadilt-364b4ec4392f294ddc75b9231a7e9ba935383995.tar.bz2
ilt-364b4ec4392f294ddc75b9231a7e9ba935383995.tar.xz
ilt-364b4ec4392f294ddc75b9231a7e9ba935383995.zip
Suppress redundantPointerOp cppcheck
Diffstat (limited to 'lib/glRef.hpp')
-rw-r--r--lib/glRef.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/glRef.hpp b/lib/glRef.hpp
index fc0c1c6..1ab239d 100644
--- a/lib/glRef.hpp
+++ b/lib/glRef.hpp
@@ -5,6 +5,7 @@
template<typename IdType, auto get, auto release, auto... fixed> class glRef {
public:
+ // cppcheck-suppress redundantPointerOp
template<typename... Args> explicit glRef(Args &&... args) : id {(*get)(fixed..., std::forward<Args>(args)...)}
{
if (!id) {
@@ -20,6 +21,7 @@ public:
~glRef()
{
if (id) {
+ // cppcheck-suppress redundantPointerOp
(*release)(id);
}
}
@@ -30,7 +32,8 @@ public:
operator=(glRef && other)
{
if (id) {
- release(id);
+ // cppcheck-suppress redundantPointerOp
+ (*release)(id);
}
id = other.id;
other.id = {};