From 364b4ec4392f294ddc75b9231a7e9ba935383995 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 21 Aug 2022 13:41:50 +0100 Subject: Suppress redundantPointerOp cppcheck --- lib/glRef.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') 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 class glRef { public: + // cppcheck-suppress redundantPointerOp template explicit glRef(Args &&... args) : id {(*get)(fixed..., std::forward(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 = {}; -- cgit v1.2.3