diff options
author | David Robillard <d@drobilla.net> | 2020-11-01 13:32:11 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-11-01 13:43:16 +0100 |
commit | f0f058dbeb40d016501328ed755392b46eefec9b (patch) | |
tree | 3fe5ede0194084d6475ee25c0d07cda271d565f5 /bindings/cxx | |
parent | 71a9fbf296928d3599743e88f72390ff827c5ab3 (diff) | |
download | pugl-f0f058dbeb40d016501328ed755392b46eefec9b.tar.gz pugl-f0f058dbeb40d016501328ed755392b46eefec9b.tar.bz2 pugl-f0f058dbeb40d016501328ed755392b46eefec9b.zip |
Run clang-tidy on all headers and fix various issues
It's a nightmare trying to get this thing to check everything.
Diffstat (limited to 'bindings/cxx')
-rw-r--r-- | bindings/cxx/include/.clang-tidy | 7 | ||||
-rw-r--r-- | bindings/cxx/include/pugl/cairo.hpp | 2 | ||||
-rw-r--r-- | bindings/cxx/include/pugl/gl.hpp | 4 | ||||
-rw-r--r-- | bindings/cxx/include/pugl/pugl.hpp | 4 | ||||
-rw-r--r-- | bindings/cxx/include/pugl/stub.hpp | 2 | ||||
-rw-r--r-- | bindings/cxx/include/pugl/vulkan.hpp | 2 |
6 files changed, 15 insertions, 6 deletions
diff --git a/bindings/cxx/include/.clang-tidy b/bindings/cxx/include/.clang-tidy index 6453ca0..182d0d7 100644 --- a/bindings/cxx/include/.clang-tidy +++ b/bindings/cxx/include/.clang-tidy @@ -1,5 +1,12 @@ Checks: > *, -*-uppercase-literal-suffix, + -clang-diagnostic-unused-macros, + -cppcoreguidelines-pro-bounds-pointer-arithmetic, + -cppcoreguidelines-pro-type-static-cast-downcast, + -google-runtime-references, + -modernize-use-trailing-return-type, + -readability-implicit-bool-conversion, + -readability-named-parameter, FormatStyle: file HeaderFilterRegex: 'pugl/.*' diff --git a/bindings/cxx/include/pugl/cairo.hpp b/bindings/cxx/include/pugl/cairo.hpp index 4df2702..d321b0b 100644 --- a/bindings/cxx/include/pugl/cairo.hpp +++ b/bindings/cxx/include/pugl/cairo.hpp @@ -35,7 +35,7 @@ namespace pugl { */ /// @copydoc puglCairoBackend -static inline const PuglBackend* +inline const PuglBackend* cairoBackend() noexcept { return puglCairoBackend(); diff --git a/bindings/cxx/include/pugl/gl.hpp b/bindings/cxx/include/pugl/gl.hpp index 2777cbf..ba7143b 100644 --- a/bindings/cxx/include/pugl/gl.hpp +++ b/bindings/cxx/include/pugl/gl.hpp @@ -38,14 +38,14 @@ namespace pugl { using GlFunc = PuglGlFunc; /// @copydoc puglGetProcAddress -static inline GlFunc +inline GlFunc getProcAddress(const char* name) noexcept { return puglGetProcAddress(name); } /// @copydoc puglGlBackend -static inline const PuglBackend* +inline const PuglBackend* glBackend() noexcept { return puglGlBackend(); diff --git a/bindings/cxx/include/pugl/pugl.hpp b/bindings/cxx/include/pugl/pugl.hpp index 4f5f3cf..31903a9 100644 --- a/bindings/cxx/include/pugl/pugl.hpp +++ b/bindings/cxx/include/pugl/pugl.hpp @@ -210,7 +210,7 @@ enum class Status { static_assert(Status(PUGL_UNSUPPORTED_TYPE) == Status::unsupportedType, ""); /// @copydoc puglStrerror -static inline const char* +inline const char* strerror(const Status status) noexcept { return puglStrerror(static_cast<PuglStatus>(status)); @@ -278,6 +278,8 @@ public: World(World&&) = delete; World& operator=(World&&) = delete; + ~World() = default; + explicit World(WorldType type, WorldFlags flags) : Wrapper{puglNewWorld(static_cast<PuglWorldType>(type), flags)} { diff --git a/bindings/cxx/include/pugl/stub.hpp b/bindings/cxx/include/pugl/stub.hpp index 74e8ef2..02a8dc2 100644 --- a/bindings/cxx/include/pugl/stub.hpp +++ b/bindings/cxx/include/pugl/stub.hpp @@ -35,7 +35,7 @@ namespace pugl { */ /// @copydoc puglStubBackend -static inline const PuglBackend* +inline const PuglBackend* stubBackend() noexcept { return puglStubBackend(); diff --git a/bindings/cxx/include/pugl/vulkan.hpp b/bindings/cxx/include/pugl/vulkan.hpp index a7b16cb..5ce8acd 100644 --- a/bindings/cxx/include/pugl/vulkan.hpp +++ b/bindings/cxx/include/pugl/vulkan.hpp @@ -155,7 +155,7 @@ createSurface(const VulkanLoader& loader, } /// @copydoc puglVulkanBackend -static inline const PuglBackend* +inline const PuglBackend* vulkanBackend() noexcept { return puglVulkanBackend(); |