From 4f1da1644afc4a8a6569b484663aaa856b2678af Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 26 Mar 2026 20:41:55 +0000 Subject: Fix warnings in glAllocator.h Missing #pragma once in particular. --- lib/glAllocator.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/glAllocator.h b/lib/glAllocator.h index 02690c3..b592ecb 100644 --- a/lib/glAllocator.h +++ b/lib/glAllocator.h @@ -1,3 +1,5 @@ +#pragma once + #include "special_members.h" #include #include @@ -13,6 +15,8 @@ namespace Detail { { } + ~glPointer() noexcept = default; + DEFAULT_MOVE_COPY(glPointer); constexpr glPointer() : ptr {nullptr}, name {0} { } @@ -65,6 +69,7 @@ namespace Detail { glPointer & operator++() noexcept { + // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic) ++ptr; return *this; } @@ -72,6 +77,7 @@ namespace Detail { glPointer & operator--() noexcept { + // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic) --ptr; return *this; } @@ -120,6 +126,7 @@ namespace Detail { using pointer = glPointer; using const_pointer = glPointer; using value_type = T; + using is_always_equal = std::true_type; // NOLINTEND(readability-identifier-naming) @@ -144,20 +151,19 @@ namespace Detail { { deallocateBuffer(ptr.bufferName()); } - - using is_always_equal = std::true_type; }; } template struct std::iterator_traits> { + // NOLINTBEGIN(readability-identifier-naming) - STL like using iterator_category = std::random_access_iterator_tag; using iterator_concept = std::contiguous_iterator_tag; using value_type = T; using difference_type = std::ptrdiff_t; using reference = T &; using pointer = T *; + // NOLINTEND(readability-identifier-naming) - STL like }; template -// NOLINTNEXTLINE(readability-identifier-naming) - OpenGL like using glVector = std::vector>::allocator_type>; -- cgit v1.3