Enabled checks: abseil-cleanup-ctad abseil-duration-addition abseil-duration-comparison abseil-duration-conversion-cast abseil-duration-division abseil-duration-factory-float abseil-duration-factory-scale abseil-duration-subtraction abseil-duration-unnecessary-conversion abseil-faster-strsplit-delimiter abseil-no-internal-dependencies abseil-no-namespace abseil-redundant-strcat-calls abseil-str-cat-append abseil-string-find-startswith abseil-string-find-str-contains abseil-time-comparison abseil-time-subtraction abseil-upgrade-duration-conversions altera-id-dependent-backward-branch altera-kernel-name-restriction altera-single-work-item-barrier altera-struct-pack-align altera-unroll-loops android-cloexec-accept android-cloexec-accept4 android-cloexec-creat android-cloexec-dup android-cloexec-epoll-create android-cloexec-epoll-create1 android-cloexec-fopen android-cloexec-inotify-init android-cloexec-inotify-init1 android-cloexec-memfd-create android-cloexec-open android-cloexec-pipe android-cloexec-pipe2 android-cloexec-socket android-comparison-in-temp-failure-retry boost-use-to-string bugprone-argument-comment bugprone-assert-side-effect bugprone-assignment-in-if-condition bugprone-bad-signal-to-kill-thread bugprone-bool-pointer-implicit-conversion bugprone-branch-clone bugprone-casting-through-void bugprone-chained-comparison bugprone-compare-pointer-to-member-virtual-function bugprone-copy-constructor-init bugprone-dangling-handle bugprone-dynamic-static-initializers bugprone-easily-swappable-parameters bugprone-empty-catch bugprone-exception-escape bugprone-fold-init-type bugprone-forward-declaration-namespace bugprone-forwarding-reference-overload bugprone-implicit-widening-of-multiplication-result bugprone-inaccurate-erase bugprone-inc-dec-in-conditions bugprone-incorrect-enable-if bugprone-incorrect-roundings bugprone-infinite-loop bugprone-integer-division bugprone-lambda-function-name bugprone-macro-parentheses bugprone-macro-repeated-side-effects bugprone-misplaced-operator-in-strlen-in-alloc bugprone-misplaced-pointer-arithmetic-in-alloc bugprone-misplaced-widening-cast bugprone-move-forwarding-reference bugprone-multi-level-implicit-pointer-conversion bugprone-multiple-new-in-one-expression bugprone-multiple-statement-macro bugprone-narrowing-conversions bugprone-no-escape bugprone-non-zero-enum-to-bool-conversion bugprone-not-null-terminated-result bugprone-optional-value-conversion bugprone-parent-virtual-call bugprone-posix-return bugprone-redundant-branch-condition bugprone-reserved-identifier bugprone-shared-ptr-array-mismatch bugprone-signal-handler bugprone-signed-char-misuse bugprone-sizeof-container bugprone-sizeof-expression bugprone-spuriously-wake-up-functions bugprone-standalone-empty bugprone-string-constructor bugprone-string-integer-assignment bugprone-string-literal-with-embedded-nul bugprone-stringview-nullptr bugprone-suspicious-enum-usage bugprone-suspicious-include bugprone-suspicious-memory-comparison bugprone-suspicious-memset-usage bugprone-suspicious-missing-comma bugprone-suspicious-realloc-usage bugprone-suspicious-semicolon bugprone-suspicious-string-compare bugprone-swapped-arguments bugprone-switch-missing-default-case bugprone-terminating-continue bugprone-throw-keyword-missing bugprone-too-small-loop-variable bugprone-unchecked-optional-access bugprone-undefined-memory-manipulation bugprone-undelegated-constructor bugprone-unhandled-exception-at-new bugprone-unhandled-self-assignment bugprone-unique-ptr-array-mismatch bugprone-unsafe-functions bugprone-unused-local-non-trivial-variable bugprone-unused-raii bugprone-unused-return-value bugprone-use-after-move bugprone-virtual-near-miss cert-con36-c cert-con54-cpp cert-dcl03-c cert-dcl16-c cert-dcl21-cpp cert-dcl37-c cert-dcl50-cpp cert-dcl51-cpp cert-dcl54-cpp cert-dcl58-cpp cert-dcl59-cpp cert-env33-c cert-err09-cpp cert-err33-c cert-err34-c cert-err52-cpp cert-err58-cpp cert-err60-cpp cert-err61-cpp cert-exp42-c cert-fio38-c cert-flp30-c cert-flp37-c cert-mem57-cpp cert-msc24-c cert-msc30-c cert-msc32-c cert-msc33-c cert-msc50-cpp cert-msc51-cpp cert-msc54-cpp cert-oop11-cpp cert-oop54-cpp cert-oop57-cpp cert-oop58-cpp cert-pos44-c cert-pos47-c cert-sig30-c cert-str34-c clang-analyzer-apiModeling.Errno clang-analyzer-apiModeling.TrustNonnull clang-analyzer-apiModeling.TrustReturnsNonnull clang-analyzer-apiModeling.google.GTest clang-analyzer-apiModeling.llvm.CastValue clang-analyzer-apiModeling.llvm.ReturnValue clang-analyzer-core.BitwiseShift clang-analyzer-core.CallAndMessage clang-analyzer-core.CallAndMessageModeling clang-analyzer-core.DivideZero clang-analyzer-core.DynamicTypePropagation clang-analyzer-core.NonNullParamChecker clang-analyzer-core.NonnilStringConstants clang-analyzer-core.NullDereference clang-analyzer-core.StackAddrEscapeBase clang-analyzer-core.StackAddressEscape clang-analyzer-core.UndefinedBinaryOperatorResult clang-analyzer-core.VLASize clang-analyzer-core.builtin.BuiltinFunctions clang-analyzer-core.builtin.NoReturnFunctions clang-analyzer-core.uninitialized.ArraySubscript clang-analyzer-core.uninitialized.Assign clang-analyzer-core.uninitialized.Branch clang-analyzer-core.uninitialized.CapturedBlockVariable clang-analyzer-core.uninitialized.NewArraySize clang-analyzer-core.uninitialized.UndefReturn clang-analyzer-cplusplus.InnerPointer clang-analyzer-cplusplus.Move clang-analyzer-cplusplus.NewDelete clang-analyzer-cplusplus.NewDeleteLeaks clang-analyzer-cplusplus.PlacementNew clang-analyzer-cplusplus.PureVirtualCall clang-analyzer-cplusplus.SelfAssignment clang-analyzer-cplusplus.SmartPtrModeling clang-analyzer-cplusplus.StringChecker clang-analyzer-cplusplus.VirtualCallModeling clang-analyzer-deadcode.DeadStores clang-analyzer-fuchsia.HandleChecker clang-analyzer-nullability.NullPassedToNonnull clang-analyzer-nullability.NullReturnedFromNonnull clang-analyzer-nullability.NullabilityBase clang-analyzer-nullability.NullableDereferenced clang-analyzer-nullability.NullablePassedToNonnull clang-analyzer-nullability.NullableReturnedFromNonnull clang-analyzer-optin.core.EnumCastOutOfRange clang-analyzer-optin.cplusplus.UninitializedObject clang-analyzer-optin.cplusplus.VirtualCall clang-analyzer-optin.mpi.MPI-Checker clang-analyzer-optin.osx.OSObjectCStyleCast clang-analyzer-optin.osx.cocoa.localizability.EmptyLocalizationContextChecker clang-analyzer-optin.osx.cocoa.localizability.NonLocalizedStringChecker clang-analyzer-optin.performance.GCDAntipattern clang-analyzer-optin.performance.Padding clang-analyzer-optin.portability.UnixAPI clang-analyzer-osx.API clang-analyzer-osx.MIG clang-analyzer-osx.NSOrCFErrorDerefChecker clang-analyzer-osx.NumberObjectConversion clang-analyzer-osx.OSObjectRetainCount clang-analyzer-osx.ObjCProperty clang-analyzer-osx.SecKeychainAPI clang-analyzer-osx.cocoa.AtSync clang-analyzer-osx.cocoa.AutoreleaseWrite clang-analyzer-osx.cocoa.ClassRelease clang-analyzer-osx.cocoa.Dealloc clang-analyzer-osx.cocoa.IncompatibleMethodTypes clang-analyzer-osx.cocoa.Loops clang-analyzer-osx.cocoa.MissingSuperCall clang-analyzer-osx.cocoa.NSAutoreleasePool clang-analyzer-osx.cocoa.NSError clang-analyzer-osx.cocoa.NilArg clang-analyzer-osx.cocoa.NonNilReturnValue clang-analyzer-osx.cocoa.ObjCGenerics clang-analyzer-osx.cocoa.RetainCount clang-analyzer-osx.cocoa.RetainCountBase clang-analyzer-osx.cocoa.RunLoopAutoreleaseLeak clang-analyzer-osx.cocoa.SelfInit clang-analyzer-osx.cocoa.SuperDealloc clang-analyzer-osx.cocoa.UnusedIvars clang-analyzer-osx.cocoa.VariadicMethodTypes clang-analyzer-osx.coreFoundation.CFError clang-analyzer-osx.coreFoundation.CFNumber clang-analyzer-osx.coreFoundation.CFRetainRelease clang-analyzer-osx.coreFoundation.containers.OutOfBounds clang-analyzer-osx.coreFoundation.containers.PointerSizedValues clang-analyzer-security.FloatLoopCounter clang-analyzer-security.cert.env.InvalidPtr clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling clang-analyzer-security.insecureAPI.SecuritySyntaxChecker clang-analyzer-security.insecureAPI.UncheckedReturn clang-analyzer-security.insecureAPI.bcmp clang-analyzer-security.insecureAPI.bcopy clang-analyzer-security.insecureAPI.bzero clang-analyzer-security.insecureAPI.decodeValueOfObjCType clang-analyzer-security.insecureAPI.getpw clang-analyzer-security.insecureAPI.gets clang-analyzer-security.insecureAPI.mkstemp clang-analyzer-security.insecureAPI.mktemp clang-analyzer-security.insecureAPI.rand clang-analyzer-security.insecureAPI.strcpy clang-analyzer-security.insecureAPI.vfork clang-analyzer-unix.API clang-analyzer-unix.DynamicMemoryModeling clang-analyzer-unix.Errno clang-analyzer-unix.Malloc clang-analyzer-unix.MallocSizeof clang-analyzer-unix.MismatchedDeallocator clang-analyzer-unix.StdCLibraryFunctions clang-analyzer-unix.Vfork clang-analyzer-unix.cstring.BadSizeArg clang-analyzer-unix.cstring.CStringModeling clang-analyzer-unix.cstring.NullArg clang-analyzer-valist.CopyToSelf clang-analyzer-valist.Uninitialized clang-analyzer-valist.Unterminated clang-analyzer-valist.ValistBase clang-analyzer-webkit.NoUncountedMemberChecker clang-analyzer-webkit.RefCntblBaseVirtualDtor clang-analyzer-webkit.UncountedLambdaCapturesChecker concurrency-mt-unsafe concurrency-thread-canceltype-asynchronous cppcoreguidelines-avoid-c-arrays cppcoreguidelines-avoid-capturing-lambda-coroutines cppcoreguidelines-avoid-const-or-ref-data-members cppcoreguidelines-avoid-do-while cppcoreguidelines-avoid-goto cppcoreguidelines-avoid-non-const-global-variables cppcoreguidelines-avoid-reference-coroutine-parameters cppcoreguidelines-c-copy-assignment-signature cppcoreguidelines-explicit-virtual-functions cppcoreguidelines-init-variables cppcoreguidelines-interfaces-global-init cppcoreguidelines-macro-to-enum cppcoreguidelines-misleading-capture-default-by-value cppcoreguidelines-missing-std-forward cppcoreguidelines-narrowing-conversions cppcoreguidelines-no-malloc cppcoreguidelines-no-suspend-with-lock cppcoreguidelines-noexcept-destructor cppcoreguidelines-noexcept-move-operations cppcoreguidelines-noexcept-swap cppcoreguidelines-non-private-member-variables-in-classes cppcoreguidelines-owning-memory cppcoreguidelines-prefer-member-initializer cppcoreguidelines-pro-bounds-array-to-pointer-decay cppcoreguidelines-pro-bounds-constant-array-index cppcoreguidelines-pro-bounds-pointer-arithmetic cppcoreguidelines-pro-type-const-cast cppcoreguidelines-pro-type-cstyle-cast cppcoreguidelines-pro-type-member-init cppcoreguidelines-pro-type-reinterpret-cast cppcoreguidelines-pro-type-static-cast-downcast cppcoreguidelines-pro-type-union-access cppcoreguidelines-pro-type-vararg cppcoreguidelines-rvalue-reference-param-not-moved cppcoreguidelines-slicing cppcoreguidelines-special-member-functions cppcoreguidelines-use-default-member-init cppcoreguidelines-virtual-class-destructor darwin-avoid-spinlock darwin-dispatch-once-nonstatic fuchsia-header-anon-namespaces fuchsia-multiple-inheritance fuchsia-overloaded-operator fuchsia-statically-constructed-objects fuchsia-trailing-return fuchsia-virtual-inheritance google-build-explicit-make-pair google-build-namespaces google-build-using-namespace google-default-arguments google-explicit-constructor google-global-names-in-headers google-objc-avoid-nsobject-new google-objc-avoid-throwing-exception google-objc-function-naming google-objc-global-variable-declaration google-readability-avoid-underscore-in-googletest-name google-readability-braces-around-statements google-readability-casting google-readability-function-size google-readability-namespace-comments google-readability-todo google-runtime-int google-runtime-operator google-upgrade-googletest-case hicpp-avoid-c-arrays hicpp-avoid-goto hicpp-braces-around-statements hicpp-deprecated-headers hicpp-exception-baseclass hicpp-explicit-conversions hicpp-function-size hicpp-ignored-remove-result hicpp-invalid-access-moved hicpp-member-init hicpp-move-const-arg hicpp-multiway-paths-covered hicpp-named-parameter hicpp-new-delete-operators hicpp-no-array-decay hicpp-no-assembler hicpp-no-malloc hicpp-noexcept-move hicpp-signed-bitwise hicpp-special-member-functions hicpp-static-assert hicpp-undelegated-constructor hicpp-use-auto hicpp-use-emplace hicpp-use-equals-default hicpp-use-equals-delete hicpp-use-noexcept hicpp-use-nullptr hicpp-use-override hicpp-vararg linuxkernel-must-check-errs llvm-else-after-return llvm-header-guard llvm-include-order llvm-namespace-comment llvm-prefer-isa-or-dyn-cast-in-conditionals llvm-prefer-register-over-unsigned llvm-qualified-auto llvm-twine-local misc-const-correctness misc-coroutine-hostile-raii misc-definitions-in-headers misc-header-include-cycle misc-include-cleaner misc-misleading-bidirectional misc-misleading-identifier misc-misplaced-const misc-new-delete-overloads misc-no-recursion misc-non-copyable-objects misc-non-private-member-variables-in-classes misc-redundant-expression misc-static-assert misc-throw-by-value-catch-by-reference misc-unconventional-assign-operator misc-uniqueptr-reset-release misc-unused-alias-decls misc-unused-parameters misc-unused-using-decls misc-use-anonymous-namespace modernize-avoid-bind modernize-avoid-c-arrays modernize-concat-nested-namespaces modernize-deprecated-headers modernize-deprecated-ios-base-aliases modernize-loop-convert modernize-macro-to-enum modernize-make-shared modernize-make-unique modernize-pass-by-value modernize-raw-string-literal modernize-redundant-void-arg modernize-replace-auto-ptr modernize-replace-disallow-copy-and-assign-macro modernize-replace-random-shuffle modernize-return-braced-init-list modernize-shrink-to-fit modernize-type-traits modernize-unary-static-assert modernize-use-auto modernize-use-bool-literals modernize-use-constraints modernize-use-default-member-init modernize-use-emplace modernize-use-equals-default modernize-use-equals-delete modernize-use-nodiscard modernize-use-noexcept modernize-use-nullptr modernize-use-override modernize-use-starts-ends-with modernize-use-std-numbers modernize-use-std-print modernize-use-transparent-functors modernize-use-uncaught-exceptions modernize-use-using mpi-buffer-deref mpi-type-mismatch objc-assert-equals objc-avoid-nserror-init objc-dealloc-in-category objc-forbidden-subclassing objc-missing-hash objc-nsdate-formatter objc-nsinvocation-argument-lifetime objc-property-declaration objc-super-self openmp-exception-escape openmp-use-default-none performance-avoid-endl performance-enum-size performance-faster-string-find performance-for-range-copy performance-implicit-conversion-in-loop performance-inefficient-algorithm performance-inefficient-string-concatenation performance-inefficient-vector-operation performance-move-const-arg performance-move-constructor-init performance-no-automatic-move performance-no-int-to-ptr performance-noexcept-destructor performance-noexcept-move-constructor performance-noexcept-swap performance-trivially-destructible performance-type-promotion-in-math-fn performance-unnecessary-copy-initialization performance-unnecessary-value-param portability-restrict-system-includes portability-simd-intrinsics portability-std-allocator-const readability-avoid-const-params-in-decls readability-avoid-nested-conditional-operator readability-avoid-return-with-void-value readability-avoid-unconditional-preprocessor-if readability-braces-around-statements readability-const-return-type readability-container-contains readability-container-data-pointer readability-container-size-empty readability-convert-member-functions-to-static readability-delete-null-pointer readability-duplicate-include readability-else-after-return readability-function-cognitive-complexity readability-function-size readability-identifier-naming readability-implicit-bool-conversion readability-inconsistent-declaration-parameter-name readability-isolate-declaration readability-make-member-function-const readability-misleading-indentation readability-misplaced-array-index readability-named-parameter readability-non-const-parameter readability-operators-representation readability-qualified-auto readability-redundant-access-specifiers readability-redundant-casting readability-redundant-control-flow readability-redundant-declaration readability-redundant-function-ptr-dereference readability-redundant-inline-specifier readability-redundant-member-init readability-redundant-preprocessor readability-redundant-smartptr-get readability-redundant-string-cstr readability-redundant-string-init readability-reference-to-constructed-temporary readability-simplify-boolean-expr readability-simplify-subscript-expr readability-static-accessed-through-instance readability-static-definition-in-anonymous-namespace readability-string-compare readability-suspicious-call-argument readability-uniqueptr-delete-release readability-use-anyofallof zircon-temporary-objects /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/platform_desktop_web/main.cpp /code/include/base_internal/yourgame_internal/yourgame.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_INTERNAL_YOURGAME_H | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_YOURGAME_H 21 | #define YOURGAME_INTERNAL_YOURGAME_H | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_YOURGAME_H /code/include/base_internal/yourgame_internal/yourgame_desktop.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_INTERNAL_YOURGAME_DESKTOP_H | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_YOURGAME_DESKTOP_H 21 | #define YOURGAME_INTERNAL_YOURGAME_DESKTOP_H | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_YOURGAME_DESKTOP_H /code/include/base_internal/yourgame_internal/yourgame_desktop.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace desktop | ~~~~~~~~~~~~~~~~~ | namespace yourgame_internal::desktop 26 | { 27 | int init(int argc, char *argv[]); 28 | bool wantToExit(); 29 | } // namespace desktop | ~~~~~~~~~~~~~~~~~~~~~~ | } // namespace yourgame_internal::desktop 30 | } // namespace yourgame_internal | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/include/base_internal/yourgame_internal/yourgame_desktop.h:27:28: warning: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays] 27 | int init(int argc, char *argv[]); | ^ /code/src/platform_desktop_web/main.cpp:28:59: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 28 | if (yourgame_internal::desktop::init(argc, argv) != 0) | ^ | { 29 | return -1; | /code/src/platform_desktop_web/main.cpp:34:5: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 34 | while (true) | ^ /code/src/platform_desktop_web/main.cpp:37:54: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 37 | if (yourgame_internal::desktop::wantToExit()) | ^ | { 38 | break; | /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/toolbox/gl/shape.cpp /code/include/base/yourgame/gl_include.h:38:9: warning: header guard does not follow preferred style [llvm-header-guard] 38 | #ifndef YOURGAME_GL_INCLUDE_H | ^~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H 39 | #define YOURGAME_GL_INCLUDE_H | ~~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H /code/include/toolbox/yourgame/gl/buffer.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLBUFFER_H | ^~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_BUFFER_H 21 | #define YOURGAME_GLBUFFER_H | ~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_BUFFER_H /code/include/toolbox/yourgame/gl/buffer.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/buffer.h:29:15: warning: class 'Buffer' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 29 | class Buffer | ^ /code/include/toolbox/yourgame/gl/buffer.h:44:13: warning: constructor does not initialize these fields: m_target, m_handle, m_usage [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 44 | Buffer() {} | ^ 45 | GLenum m_target; | | {} 46 | GLuint m_handle; | | {} 47 | GLenum m_usage; | | {} /code/include/toolbox/yourgame/gl/shape.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLSHAPE_H | ^~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHAPE_H 21 | #define YOURGAME_GLSHAPE_H | ~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHAPE_H /code/include/toolbox/yourgame/gl/shape.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/buffer.h" 24 | #include "yourgame/gl_include.h" 25 | #include "yourgame/gl/buffer.h" | ~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/shape.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/shape.h:31:15: warning: class 'Shape' defines a non-default destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 31 | class Shape | ^ /code/include/toolbox/yourgame/gl/shape.h:34:20: warning: accessing fields in struct 'ArrBufferDescr' is inefficient due to padding; only needs 29 bytes but is using 40 bytes [altera-struct-pack-align] 34 | struct ArrBufferDescr | ^ 35 | { 36 | GLuint index; 37 | GLint size; 38 | GLenum type; 39 | GLboolean normalized; 40 | GLsizei stride; 41 | const GLvoid *pointer; 42 | GLuint attribDivisor; 43 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/gl/shape.h:34:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'ArrBufferDescr' /code/include/toolbox/yourgame/gl/shape.h:34:20: warning: accessing fields in struct 'ArrBufferDescr' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 32 bytes [altera-struct-pack-align] 34 | struct ArrBufferDescr | ^ 35 | { 36 | GLuint index; 37 | GLint size; 38 | GLenum type; 39 | GLboolean normalized; 40 | GLsizei stride; 41 | const GLvoid *pointer; 42 | GLuint attribDivisor; 43 | }; | | __attribute__((aligned(32))) /code/include/toolbox/yourgame/gl/shape.h:34:20: note: use "__attribute__((aligned(32)))" to align struct 'ArrBufferDescr' to 32 bytes /code/include/toolbox/yourgame/gl/shape.h:45:20: warning: accessing fields in struct 'ElemArrBufferDescr' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 16 bytes [altera-struct-pack-align] 45 | struct ElemArrBufferDescr | ^ 46 | { 47 | GLenum type; 48 | GLenum drawMode; 49 | GLsizei numElements; 50 | }; | | __attribute__((aligned(16))) /code/include/toolbox/yourgame/gl/shape.h:45:20: note: use "__attribute__((aligned(16)))" to align struct 'ElemArrBufferDescr' to 16 bytes /code/include/toolbox/yourgame/gl/shape.h:68:13: warning: constructor does not initialize these fields: m_elArDescr, m_vaoHandle [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 68 | Shape() {} | ^ 69 | ElemArrBufferDescr m_elArDescr; | | {} 70 | GLuint m_vaoHandle; | | {} /code/src/toolbox/gl/shape.cpp:22:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 22 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 23 | { | ~ 24 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/src/toolbox/gl/shape.cpp:26:33: warning: no header providing "std::vector" is directly included [misc-include-cleaner] 21 | 22 | namespace yourgame 23 | { 24 | namespace gl 25 | { 26 | Shape *Shape::make(std::vector arDescrs, | ^ /code/src/toolbox/gl/shape.cpp:27:40: warning: no header providing "yourgame::gl::Buffer" is directly included [misc-include-cleaner] 21 | 22 | namespace yourgame 23 | { 24 | namespace gl 25 | { 26 | Shape *Shape::make(std::vector arDescrs, 27 | std::vector arBuffers, | ^ /code/src/toolbox/gl/shape.cpp:36:13: warning: initializing non-owner 'Shape *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 36 | Shape *newShape = new Shape(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/gl/shape.cpp:36:13: warning: use auto when initializing with new to avoid duplicating the type name [hicpp-use-auto,modernize-use-auto] 36 | Shape *newShape = new Shape(); | ^~~~~ | auto /code/src/toolbox/gl/shape.cpp:42:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 42 | for (auto i = 0; i < arDescrs.size(); i++) | ^ /code/src/toolbox/gl/shape.cpp:68:21: warning: method 'addArrBuf' can be made const [readability-make-member-function-const] 68 | bool Shape::addArrBuf(ArrBufferDescr arDescr, Buffer *buf) | ^ | const /code/src/toolbox/gl/shape.cpp:72:17: warning: implicit conversion 'Buffer *' -> 'bool' [readability-implicit-bool-conversion] 72 | if (buf) | ^ | != nullptr /code/src/toolbox/gl/shape.cpp:98:21: warning: method 'draw' can be made const [readability-make-member-function-const] 98 | void Shape::draw() | ^ | const /code/src/toolbox/gl/shape.cpp:101:93: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 101 | glDrawElements(m_elArDescr.drawMode, m_elArDescr.numElements, m_elArDescr.type, 0); | ^ | nullptr /code/src/toolbox/gl/shape.cpp:105:21: warning: method 'drawInstanced' can be made const [readability-make-member-function-const] 105 | void Shape::drawInstanced(GLsizei instancecount) | ^ | const /code/src/toolbox/gl/shape.cpp:108:102: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 108 | glDrawElementsInstanced(m_elArDescr.drawMode, m_elArDescr.numElements, m_elArDescr.type, 0, instancecount); | ^ | nullptr /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/toolbox/util/image.cpp /code/include/toolbox/yourgame/util/image.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_IMAGE_H | ^~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_IMAGE_H 21 | #define YOURGAME_IMAGE_H | ~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_IMAGE_H /code/include/toolbox/yourgame/util/image.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~~ | 24 | #include | ~~~~~~~ | /code/include/toolbox/yourgame/util/image.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace util | ~~~~~~~~~~~~~~ | namespace yourgame::util /code/include/toolbox/yourgame/util/image.h:31:15: warning: class 'Image' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 31 | class Image | ^ /code/include/toolbox/yourgame/util/image.h:34:24: warning: enum 'Layout' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 34 | enum class Layout | ^ /code/include/toolbox/yourgame/util/image.h:70:13: warning: function 'getData' should be marked [[nodiscard]] [modernize-use-nodiscard] 70 | const uint8_t *getData() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/image.h:72:13: warning: function 'getWidth' should be marked [[nodiscard]] [modernize-use-nodiscard] 72 | int getWidth() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/image.h:74:13: warning: function 'getHeight' should be marked [[nodiscard]] [modernize-use-nodiscard] 74 | int getHeight() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/image.h:76:13: warning: function 'getLayout' should be marked [[nodiscard]] [modernize-use-nodiscard] 76 | Layout getLayout() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/image.h:78:13: warning: function 'getNumChannels' should be marked [[nodiscard]] [modernize-use-nodiscard] 78 | int getNumChannels() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/image.h:80:13: warning: function 'getNumDemandedBytes' should be marked [[nodiscard]] [modernize-use-nodiscard] 80 | size_t getNumDemandedBytes() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/image.h:83:13: warning: constructor does not initialize these fields: m_width, m_height, m_layout [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 83 | Image() {} | ^ 84 | std::vector m_data; 85 | int m_width; | | {} 86 | int m_height; | | {} /code/src/toolbox/util/image.cpp:20:1: warning: #includes are not sorted properly [llvm-include-order] 20 | #include | ^ ~~~~~~~ | "stb_image.h" 21 | #include | ~~~~~~~~ | "yourgame/util/image.h" 22 | #include "stb_image.h" | ~~~~~~~~~~~~~ | 23 | #include "yourgame/util/image.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/src/toolbox/util/image.cpp:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace util | ~~~~~~~~~~~~~~ | namespace yourgame::util /code/src/toolbox/util/image.cpp:29:47: warning: no header providing "uint8_t" is directly included [misc-include-cleaner] 21 | #include 22 | #include "stb_image.h" 23 | #include "yourgame/util/image.h" 24 | 25 | namespace yourgame 26 | { 27 | namespace util 28 | { 29 | Image *Image::fromMemoryEncoded(const uint8_t *data, | ^ /code/src/toolbox/util/image.cpp:30:41: warning: no header providing "size_t" is directly included [misc-include-cleaner] 21 | #include 22 | #include "stb_image.h" 23 | #include "yourgame/util/image.h" 24 | 25 | namespace yourgame 26 | { 27 | namespace util 28 | { 29 | Image *Image::fromMemoryEncoded(const uint8_t *data, 30 | size_t numBytes, | ^ /code/src/toolbox/util/image.cpp:34:46: warning: implicit conversion 'bool' -> 'int' [readability-implicit-bool-conversion] 34 | stbi_set_flip_vertically_on_load(flipVertically); | ^ | static_cast( ) /code/src/toolbox/util/image.cpp:36:17: warning: variable 'width' is not initialized [cppcoreguidelines-init-variables] 36 | int width; | ^ | = 0 /code/src/toolbox/util/image.cpp:37:17: warning: variable 'height' is not initialized [cppcoreguidelines-init-variables] 37 | int height; | ^ | = 0 /code/src/toolbox/util/image.cpp:38:17: warning: variable 'numChannels' is not initialized [cppcoreguidelines-init-variables] 38 | int numChannels; | ^ | = 0 /code/src/toolbox/util/image.cpp:39:13: warning: 'auto img' can be declared as 'auto *img' [llvm-qualified-auto,readability-qualified-auto] 39 | auto img = stbi_load_from_memory(static_cast(data), | ^~~~ | auto * /code/src/toolbox/util/image.cpp:40:46: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 40 | numBytes, | ^ /code/src/toolbox/util/image.cpp:46:46: warning: implicit conversion 'bool' -> 'int' [readability-implicit-bool-conversion] 46 | stbi_set_flip_vertically_on_load(false); | ^~~~~ | 0 /code/src/toolbox/util/image.cpp:48:17: warning: implicit conversion 'stbi_uc *' (aka 'unsigned char *') -> 'bool' [readability-implicit-bool-conversion] 48 | if (img) | ^ | != nullptr /code/src/toolbox/util/image.cpp:50:17: warning: initializing non-owner 'Image *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 50 | Image *newImage = new Image(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/util/image.cpp:50:17: warning: use auto when initializing with new to avoid duplicating the type name [hicpp-use-auto,modernize-use-auto] 50 | Image *newImage = new Image(); | ^~~~~ | auto /code/src/toolbox/util/image.cpp:55:50: warning: do not use pointer arithmetic [cppcoreguidelines-pro-bounds-pointer-arithmetic] 55 | newImage->m_data.assign(img, img + newImage->getNumDemandedBytes()); | ^ /code/src/toolbox/util/image.cpp:61:13: warning: do not use 'else' after 'return' [llvm-else-after-return,readability-else-after-return] 61 | else | ^~~~ 62 | { | ~ 63 | return nullptr; | ~~~~~~~~~~~~~~~ 64 | } | ~ /code/src/toolbox/util/image.cpp:77:13: warning: variable 'numBytes' of type 'size_t' (aka 'unsigned long') can be declared 'const' [misc-const-correctness] 77 | size_t numBytes = width * height * Image::getNumChannelsFromLayout(layout); | ^ | const /code/src/toolbox/util/image.cpp:77:31: warning: performing an implicit widening conversion to type 'size_t' (aka 'unsigned long') of a multiplication performed in type 'int' [bugprone-implicit-widening-of-multiplication-result] 77 | size_t numBytes = width * height * Image::getNumChannelsFromLayout(layout); | ^ /code/src/toolbox/util/image.cpp:77:31: note: make conversion explicit to silence this warning 21 | size_t numBytes = width * height * Image::getNumChannelsFromLayout(layout); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/util/image.cpp:77:31: note: perform multiplication in a wider type 77 | size_t numBytes = width * height * Image::getNumChannelsFromLayout(layout); | ^~~~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/util/image.cpp:79:13: warning: initializing non-owner 'Image *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 79 | Image *newImage = new Image(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/util/image.cpp:79:13: warning: use auto when initializing with new to avoid duplicating the type name [hicpp-use-auto,modernize-use-auto] 79 | Image *newImage = new Image(); | ^~~~~ | auto /code/src/toolbox/util/image.cpp:83:48: warning: do not use pointer arithmetic [cppcoreguidelines-pro-bounds-pointer-arithmetic] 83 | newImage->m_data.assign(data, data + numBytes); | ^ /code/src/toolbox/util/image.cpp:97:13: warning: variable 'numValues' of type 'size_t' (aka 'unsigned long') can be declared 'const' [misc-const-correctness] 97 | size_t numValues = width * height * Image::getNumChannelsFromLayout(layout); | ^ | const /code/src/toolbox/util/image.cpp:97:32: warning: performing an implicit widening conversion to type 'size_t' (aka 'unsigned long') of a multiplication performed in type 'int' [bugprone-implicit-widening-of-multiplication-result] 97 | size_t numValues = width * height * Image::getNumChannelsFromLayout(layout); | ^ /code/src/toolbox/util/image.cpp:97:32: note: make conversion explicit to silence this warning 97 | size_t numValues = width * height * Image::getNumChannelsFromLayout(layout); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/util/image.cpp:97:32: note: perform multiplication in a wider type 97 | size_t numValues = width * height * Image::getNumChannelsFromLayout(layout); | ^~~~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/util/image.cpp:99:13: warning: initializing non-owner 'Image *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 99 | Image *newImage = new Image(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/util/image.cpp:99:13: warning: use auto when initializing with new to avoid duplicating the type name [hicpp-use-auto,modernize-use-auto] 99 | Image *newImage = new Image(); | ^~~~~ | auto /code/src/toolbox/util/image.cpp:111:13: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 111 | int x, y, comp; | ^~~~~~~~~~~~~~~ /code/src/toolbox/util/image.cpp:111:17: warning: variable 'x' is not initialized [cppcoreguidelines-init-variables] 111 | int x, y, comp; | ^ note: this fix will not be applied because it overlaps with another fix /code/src/toolbox/util/image.cpp:111:20: warning: variable 'y' is not initialized [cppcoreguidelines-init-variables] 111 | int x, y, comp; | ^ note: this fix will not be applied because it overlaps with another fix /code/src/toolbox/util/image.cpp:111:23: warning: variable 'comp' is not initialized [cppcoreguidelines-init-variables] 111 | int x, y, comp; | ^ note: this fix will not be applied because it overlaps with another fix /code/src/toolbox/util/image.cpp:113:35: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 113 | numBytes, | ^ /code/src/toolbox/util/image.cpp:120:52: warning: parameter 'layout' is unused [misc-unused-parameters] 120 | int Image::getNumChannelsFromLayout(Layout layout) | ^~~~~~ | /*layout*/ /code/src/toolbox/util/image.cpp:133:13: warning: variable 'numPixels' of type 'unsigned int' can be declared 'const' [misc-const-correctness] 133 | unsigned int numPixels = m_width * m_height; | ^ | const /code/src/toolbox/util/image.cpp:135:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 135 | for (unsigned int i = 0; i < numPixels; i++) | ^ /code/src/toolbox/util/image.cpp:135:38: warning: backward branch (for loop) is ID-dependent due to variable reference to 'numPixels' and may cause performance degradation [altera-id-dependent-backward-branch] 135 | for (unsigned int i = 0; i < numPixels; i++) | ^ /code/src/toolbox/util/image.cpp:133:13: note: inferred assignment of ID-dependent value from ID-dependent member m_width 133 | unsigned int numPixels = m_width * m_height; | ^ /code/src/toolbox/util/image.cpp:140:37: warning: do not use pointer arithmetic [cppcoreguidelines-pro-bounds-pointer-arithmetic] 140 | auto alpha = m_data.data()[rIdx + 3]; | ^ /code/src/toolbox/util/image.cpp:140:37: warning: accessing an element of the container does not require a call to 'data()'; did you mean to use 'operator[]'? [readability-simplify-subscript-expr] 140 | auto alpha = m_data.data()[rIdx + 3]; | ~^~~~~~ /code/src/toolbox/util/image.cpp:141:24: warning: do not use pointer arithmetic [cppcoreguidelines-pro-bounds-pointer-arithmetic] 141 | m_data.data()[rIdx] = (m_data.data()[rIdx] * alpha) / 255; | ^ /code/src/toolbox/util/image.cpp:141:24: warning: accessing an element of the container does not require a call to 'data()'; did you mean to use 'operator[]'? [readability-simplify-subscript-expr] 141 | m_data.data()[rIdx] = (m_data.data()[rIdx] * alpha) / 255; | ~^~~~~~ /code/src/toolbox/util/image.cpp:141:47: warning: do not use pointer arithmetic [cppcoreguidelines-pro-bounds-pointer-arithmetic] 141 | m_data.data()[rIdx] = (m_data.data()[rIdx] * alpha) / 255; | ^ /code/src/toolbox/util/image.cpp:141:47: warning: accessing an element of the container does not require a call to 'data()'; did you mean to use 'operator[]'? [readability-simplify-subscript-expr] 141 | m_data.data()[rIdx] = (m_data.data()[rIdx] * alpha) / 255; | ~^~~~~~ /code/src/toolbox/util/image.cpp:142:24: warning: do not use pointer arithmetic [cppcoreguidelines-pro-bounds-pointer-arithmetic] 142 | m_data.data()[gIdx] = (m_data.data()[gIdx] * alpha) / 255; | ^ /code/src/toolbox/util/image.cpp:142:24: warning: accessing an element of the container does not require a call to 'data()'; did you mean to use 'operator[]'? [readability-simplify-subscript-expr] 142 | m_data.data()[gIdx] = (m_data.data()[gIdx] * alpha) / 255; | ~^~~~~~ /code/src/toolbox/util/image.cpp:142:47: warning: do not use pointer arithmetic [cppcoreguidelines-pro-bounds-pointer-arithmetic] 142 | m_data.data()[gIdx] = (m_data.data()[gIdx] * alpha) / 255; | ^ /code/src/toolbox/util/image.cpp:142:47: warning: accessing an element of the container does not require a call to 'data()'; did you mean to use 'operator[]'? [readability-simplify-subscript-expr] 142 | m_data.data()[gIdx] = (m_data.data()[gIdx] * alpha) / 255; | ~^~~~~~ /code/src/toolbox/util/image.cpp:143:24: warning: do not use pointer arithmetic [cppcoreguidelines-pro-bounds-pointer-arithmetic] 143 | m_data.data()[bIdx] = (m_data.data()[bIdx] * alpha) / 255; | ^ /code/src/toolbox/util/image.cpp:143:24: warning: accessing an element of the container does not require a call to 'data()'; did you mean to use 'operator[]'? [readability-simplify-subscript-expr] 143 | m_data.data()[bIdx] = (m_data.data()[bIdx] * alpha) / 255; | ~^~~~~~ /code/src/toolbox/util/image.cpp:143:47: warning: do not use pointer arithmetic [cppcoreguidelines-pro-bounds-pointer-arithmetic] 143 | m_data.data()[bIdx] = (m_data.data()[bIdx] * alpha) / 255; | ^ /code/src/toolbox/util/image.cpp:143:47: warning: accessing an element of the container does not require a call to 'data()'; did you mean to use 'operator[]'? [readability-simplify-subscript-expr] 143 | m_data.data()[bIdx] = (m_data.data()[bIdx] * alpha) / 255; | ~^~~~~~ /code/src/toolbox/util/image.cpp:161:13: warning: variable 'numBytes' of type 'size_t' (aka 'unsigned long') can be declared 'const' [misc-const-correctness] 161 | size_t numBytes = width * height * Image::getNumChannelsFromLayout(layout); | ^ | const /code/src/toolbox/util/image.cpp:161:31: warning: performing an implicit widening conversion to type 'size_t' (aka 'unsigned long') of a multiplication performed in type 'int' [bugprone-implicit-widening-of-multiplication-result] 161 | size_t numBytes = width * height * Image::getNumChannelsFromLayout(layout); | ^ /code/src/toolbox/util/image.cpp:161:31: note: make conversion explicit to silence this warning 161 | size_t numBytes = width * height * Image::getNumChannelsFromLayout(layout); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/util/image.cpp:161:31: note: perform multiplication in a wider type 161 | size_t numBytes = width * height * Image::getNumChannelsFromLayout(layout); | ^~~~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/util/image.cpp:162:38: warning: do not use pointer arithmetic [cppcoreguidelines-pro-bounds-pointer-arithmetic] 162 | m_data.assign(data, data + numBytes); | ^ /code/src/toolbox/util/image.cpp:192:20: warning: performing an implicit widening conversion to type 'size_t' (aka 'unsigned long') of a multiplication performed in type 'int' [bugprone-implicit-widening-of-multiplication-result] 192 | return m_width * m_height * getNumChannels(); | ^ /code/src/toolbox/util/image.cpp:192:20: note: make conversion explicit to silence this warning 192 | return m_width * m_height * getNumChannels(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/util/image.cpp:192:20: note: perform multiplication in a wider type 192 | return m_width * m_height * getNumChannels(); | ^~~~~~~~~~~~~~~~~~ | static_cast() /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/toolbox/util/physenv.cpp /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/toolbox/gl/spritegrid.cpp /code/include/base/yourgame/gl_include.h:38:9: warning: header guard does not follow preferred style [llvm-header-guard] 38 | #ifndef YOURGAME_GL_INCLUDE_H | ^~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H 39 | #define YOURGAME_GL_INCLUDE_H | ~~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H /code/include/toolbox/yourgame/gl/buffer.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLBUFFER_H | ^~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_BUFFER_H 21 | #define YOURGAME_GLBUFFER_H | ~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_BUFFER_H /code/include/toolbox/yourgame/gl/buffer.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/buffer.h:29:15: warning: class 'Buffer' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 29 | class Buffer | ^ /code/include/toolbox/yourgame/gl/buffer.h:44:13: warning: constructor does not initialize these fields: m_target, m_handle, m_usage [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 44 | Buffer() {} | ^ 45 | GLenum m_target; | | {} 46 | GLuint m_handle; | | {} 47 | GLenum m_usage; | | {} /code/include/toolbox/yourgame/gl/conventions.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLCONVENTIONS_H | ^~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_CONVENTIONS_H 21 | #define YOURGAME_GLCONVENTIONS_H | ~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_CONVENTIONS_H /code/include/toolbox/yourgame/gl/conventions.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/conventions.h:38:30: warning: variable 'unifNameMvpMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 38 | extern const GLchar *unifNameMvpMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:39:30: warning: variable 'unifNameVpMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 39 | extern const GLchar *unifNameVpMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:40:30: warning: variable 'unifNameModelMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 40 | extern const GLchar *unifNameModelMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:41:30: warning: variable 'unifNameNormalMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 41 | extern const GLchar *unifNameNormalMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:42:30: warning: variable 'unifNameCameraPosition' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 42 | extern const GLchar *unifNameCameraPosition; | ^ /code/include/toolbox/yourgame/gl/conventions.h:43:30: warning: variable 'unifNameCameraTrafo' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 43 | extern const GLchar *unifNameCameraTrafo; | ^ /code/include/toolbox/yourgame/gl/conventions.h:44:30: warning: variable 'unifNameSkyRotationInv' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 44 | extern const GLchar *unifNameSkyRotationInv; | ^ /code/include/toolbox/yourgame/gl/conventions.h:45:30: warning: variable 'unifNameTextureDiffuse' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 45 | extern const GLchar *unifNameTextureDiffuse; | ^ /code/include/toolbox/yourgame/gl/conventions.h:46:30: warning: variable 'unifNameTextureSkyCube' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 46 | extern const GLchar *unifNameTextureSkyCube; | ^ /code/include/toolbox/yourgame/gl/conventions.h:47:30: warning: variable 'unifNameTextureSky' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 47 | extern const GLchar *unifNameTextureSky; | ^ /code/include/toolbox/yourgame/gl/conventions.h:48:30: warning: variable 'unifNameTextureBufferDepth' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 48 | extern const GLchar *unifNameTextureBufferDepth; | ^ /code/include/toolbox/yourgame/gl/conventions.h:49:30: warning: variable 'unifNameTextureBufferColor0' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 49 | extern const GLchar *unifNameTextureBufferColor0; | ^ /code/include/toolbox/yourgame/gl/conventions.h:50:30: warning: variable 'unifNameLightAmbient' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 50 | extern const GLchar *unifNameLightAmbient; | ^ /code/include/toolbox/yourgame/gl/conventions.h:51:30: warning: variable 'unifNameLightDiffuse' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 51 | extern const GLchar *unifNameLightDiffuse; | ^ /code/include/toolbox/yourgame/gl/conventions.h:52:30: warning: variable 'unifNameLightSpecular' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 52 | extern const GLchar *unifNameLightSpecular; | ^ /code/include/toolbox/yourgame/gl/conventions.h:53:30: warning: variable 'unifNameLightPosition' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 53 | extern const GLchar *unifNameLightPosition; | ^ /code/include/toolbox/yourgame/gl/conventions.h:54:30: warning: variable 'unifNameSubtexture' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 54 | extern const GLchar *unifNameSubtexture; | ^ /code/include/toolbox/yourgame/gl/geometry.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLGEOMETRY_H | ^~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_GEOMETRY_H 21 | #define YOURGAME_GLGEOMETRY_H | ~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_GEOMETRY_H /code/include/toolbox/yourgame/gl/geometry.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/buffer.h" 24 | #include | ~~~~~ | "yourgame/gl/shape.h" 25 | #include | ~~~~~~~~ | "yourgame/gl_include.h" 26 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | 27 | #include "yourgame/gl/buffer.h" | ~~~~~~~~~~~~~~~~~~~~~~ | 28 | #include "yourgame/gl/shape.h" | ~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/geometry.h:30:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 30 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 31 | { | ~ 32 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/geometry.h:34:15: warning: class 'Geometry' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 34 | class Geometry | ^ /code/include/toolbox/yourgame/gl/shape.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLSHAPE_H | ^~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHAPE_H 21 | #define YOURGAME_GLSHAPE_H | ~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHAPE_H /code/include/toolbox/yourgame/gl/shape.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/buffer.h" 24 | #include "yourgame/gl_include.h" 25 | #include "yourgame/gl/buffer.h" | ~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/shape.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/shape.h:31:15: warning: class 'Shape' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 31 | class Shape | ^ /code/include/toolbox/yourgame/gl/shape.h:34:20: warning: accessing fields in struct 'ArrBufferDescr' is inefficient due to padding; only needs 29 bytes but is using 40 bytes [altera-struct-pack-align] 34 | struct ArrBufferDescr | ^ 35 | { 36 | GLuint index; 37 | GLint size; 38 | GLenum type; 39 | GLboolean normalized; 40 | GLsizei stride; 41 | const GLvoid *pointer; 42 | GLuint attribDivisor; 43 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/gl/shape.h:34:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'ArrBufferDescr' /code/include/toolbox/yourgame/gl/shape.h:34:20: warning: accessing fields in struct 'ArrBufferDescr' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 32 bytes [altera-struct-pack-align] 34 | struct ArrBufferDescr | ^ 35 | { 36 | GLuint index; 37 | GLint size; 38 | GLenum type; 39 | GLboolean normalized; 40 | GLsizei stride; 41 | const GLvoid *pointer; 42 | GLuint attribDivisor; 43 | }; | | __attribute__((aligned(32))) /code/include/toolbox/yourgame/gl/shape.h:34:20: note: use "__attribute__((aligned(32)))" to align struct 'ArrBufferDescr' to 32 bytes /code/include/toolbox/yourgame/gl/shape.h:45:20: warning: accessing fields in struct 'ElemArrBufferDescr' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 16 bytes [altera-struct-pack-align] 45 | struct ElemArrBufferDescr | ^ 46 | { 47 | GLenum type; 48 | GLenum drawMode; 49 | GLsizei numElements; 50 | }; | | __attribute__((aligned(16))) /code/include/toolbox/yourgame/gl/shape.h:45:20: note: use "__attribute__((aligned(16)))" to align struct 'ElemArrBufferDescr' to 16 bytes /code/include/toolbox/yourgame/gl/shape.h:68:13: warning: constructor does not initialize these fields: m_elArDescr, m_vaoHandle [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 68 | Shape() {} | ^ 69 | ElemArrBufferDescr m_elArDescr; | | {} 70 | GLuint m_vaoHandle; | | {} /code/include/toolbox/yourgame/gl/spritegrid.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLSPRITEGRID_H | ^~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SPRITEGRID_H 21 | #define YOURGAME_GLSPRITEGRID_H | ~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SPRITEGRID_H /code/include/toolbox/yourgame/gl/spritegrid.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/geometry.h" 24 | #include | ~~~~~~~~ | "yourgame/gl/texture.h" 25 | #include "yourgame/gl/geometry.h" | ~~~~~~~~~~~~~~~~~~~~~~~~ | 26 | #include "yourgame/gl/texture.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/spritegrid.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/spritegrid.h:32:15: warning: class 'SpriteGrid' defines a non-default destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 32 | class SpriteGrid | ^ /code/include/toolbox/yourgame/gl/spritegrid.h:67:13: warning: function 'geo' should be marked [[nodiscard]] [modernize-use-nodiscard] 67 | Geometry *geo() const { return m_geo; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLTEXTURE_H | ^~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_TEXTURE_H 21 | #define YOURGAME_GLTEXTURE_H | ~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_TEXTURE_H /code/include/toolbox/yourgame/gl/texture.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~ | "yourgame/gl_include.h" 24 | #include | ~~~~~~~~ | 25 | #include | ~~~~~~~~ | 26 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/texture.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/texture.h:32:16: warning: accessing fields in struct 'TextureCoords' is inefficient due to padding; only needs 41 bytes but is using 44 bytes [altera-struct-pack-align] 32 | struct TextureCoords | ^ /code/include/toolbox/yourgame/gl/texture.h:32:16: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'TextureCoords' /code/include/toolbox/yourgame/gl/texture.h:32:16: warning: accessing fields in struct 'TextureCoords' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 64 bytes [altera-struct-pack-align] 32 | struct TextureCoords | ^ /code/include/toolbox/yourgame/gl/texture.h:32:16: note: use "__attribute__((aligned(64)))" to align struct 'TextureCoords' to 64 bytes /code/include/toolbox/yourgame/gl/texture.h:35:13: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default,modernize-use-equals-default] 35 | TextureCoords() {} | ^ ~~ | = default; /code/include/toolbox/yourgame/gl/texture.h:37:27: warning: 2 adjacent parameters of 'TextureCoords' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters] 37 | TextureCoords(int x, int y, int width, int height, int texWidth, int texHeight, bool cwRot) | ^~~~~~~~~~~~ /code/include/toolbox/yourgame/gl/texture.h:37:31: note: the first parameter in the range is 'x' 37 | TextureCoords(int x, int y, int width, int height, int texWidth, int texHeight, bool cwRot) | ^ /code/include/toolbox/yourgame/gl/texture.h:37:38: note: the last parameter in the range is 'y' 37 | TextureCoords(int x, int y, int width, int height, int texWidth, int texHeight, bool cwRot) | ^ /code/include/toolbox/yourgame/gl/texture.h:55:19: warning: member variable 'uMin' has public visibility [misc-non-private-member-variables-in-classes] 55 | float uMin = 0.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:56:19: warning: member variable 'uMax' has public visibility [misc-non-private-member-variables-in-classes] 56 | float uMax = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:57:19: warning: member variable 'vMin' has public visibility [misc-non-private-member-variables-in-classes] 57 | float vMin = 0.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:58:19: warning: member variable 'vMax' has public visibility [misc-non-private-member-variables-in-classes] 58 | float vMax = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:59:17: warning: member variable 'xMinPixel' has public visibility [misc-non-private-member-variables-in-classes] 59 | int xMinPixel = 0; | ^ /code/include/toolbox/yourgame/gl/texture.h:60:17: warning: member variable 'xMaxPixel' has public visibility [misc-non-private-member-variables-in-classes] 60 | int xMaxPixel = 1; | ^ /code/include/toolbox/yourgame/gl/texture.h:61:17: warning: member variable 'yMinPixel' has public visibility [misc-non-private-member-variables-in-classes] 61 | int yMinPixel = 0; | ^ /code/include/toolbox/yourgame/gl/texture.h:62:17: warning: member variable 'yMaxPixel' has public visibility [misc-non-private-member-variables-in-classes] 62 | int yMaxPixel = 1; | ^ /code/include/toolbox/yourgame/gl/texture.h:63:19: warning: member variable 'aspectRatioPixel' has public visibility [misc-non-private-member-variables-in-classes] 63 | float aspectRatioPixel = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:64:19: warning: member variable 'aspectRatioPixelInverse' has public visibility [misc-non-private-member-variables-in-classes] 64 | float aspectRatioPixelInverse = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:65:18: warning: member variable 'cwRotated' has public visibility [misc-non-private-member-variables-in-classes] 65 | bool cwRotated = false; | ^ /code/include/toolbox/yourgame/gl/texture.h:68:15: warning: class 'Texture' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 68 | class Texture | ^ /code/include/toolbox/yourgame/gl/texture.h:95:13: warning: function 'handle' should be marked [[nodiscard]] [modernize-use-nodiscard] 95 | GLuint handle() const { return m_handle; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:96:13: warning: function 'getTarget' should be marked [[nodiscard]] [modernize-use-nodiscard] 96 | GLenum getTarget() const { return m_target; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:97:13: warning: function 'getWidth' should be marked [[nodiscard]] [modernize-use-nodiscard] 97 | GLsizei getWidth() const { return m_width; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:98:13: warning: function 'getHeight' should be marked [[nodiscard]] [modernize-use-nodiscard] 98 | GLsizei getHeight() const { return m_height; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:107:13: warning: function 'getCoords' should be marked [[nodiscard]] [modernize-use-nodiscard] 107 | TextureCoords getCoords(std::string name) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:122:13: warning: function 'getNumFrames' should be marked [[nodiscard]] [modernize-use-nodiscard] 122 | int getNumFrames(std::string sequenceName) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:127:13: warning: function 'getSequenceNames' should be marked [[nodiscard]] [modernize-use-nodiscard] 127 | std::vector getSequenceNames() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:136:13: warning: function 'getGridCoords' should be marked [[nodiscard]] [modernize-use-nodiscard] 136 | TextureCoords getGridCoords(int gridWidth, int gridHeight, int index) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:139:13: warning: constructor does not initialize these fields: m_handle, m_target, m_unit, m_width, m_height [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 139 | Texture() {} | ^ 140 | GLuint m_handle; | | {} 141 | GLenum m_target; | | {} 142 | GLenum m_unit; | | {} 143 | GLsizei m_width; | | {} 144 | GLsizei m_height; | | {} /code/include/toolbox/yourgame/gl/texture.h:146:20: warning: accessing fields in struct 'Sequence' is inefficient due to padding; only needs 73 bytes but is using 80 bytes [altera-struct-pack-align] 146 | struct Sequence | ^ 147 | { 148 | std::map frames; 149 | bool framesInvalidated; 150 | std::vector framesConsec; /**< \brief consecutive representation of the frame coordinates */ 151 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/gl/texture.h:146:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'Sequence' /code/include/toolbox/yourgame/gl/texture.h:146:20: warning: accessing fields in struct 'Sequence' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 128 bytes [altera-struct-pack-align] 146 | struct Sequence | ^ 147 | { 148 | std::map frames; 149 | bool framesInvalidated; 150 | std::vector framesConsec; /**< \brief consecutive representation of the frame coordinates */ 151 | }; | | __attribute__((aligned(128))) /code/include/toolbox/yourgame/gl/texture.h:146:20: note: use "__attribute__((aligned(128)))" to align struct 'Sequence' to 128 bytes /code/src/toolbox/gl/spritegrid.cpp:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/src/toolbox/gl/spritegrid.cpp:27:21: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default,modernize-use-equals-default] 27 | SpriteGrid::SpriteGrid() {} | ^ ~~ | = default; /code/src/toolbox/gl/spritegrid.cpp:29:50: warning: no header providing "yourgame::gl::Texture" is directly included [misc-include-cleaner] 21 | #include "yourgame/gl/spritegrid.h" 22 | 23 | namespace yourgame 24 | { 25 | namespace gl 26 | { 27 | SpriteGrid::SpriteGrid() {} 28 | 29 | int SpriteGrid::make(const yourgame::gl::Texture *atlas, | ^ /code/src/toolbox/gl/spritegrid.cpp:30:41: warning: no header providing "std::vector" is directly included [misc-include-cleaner] 21 | #include "yourgame/gl/spritegrid.h" 22 | 23 | namespace yourgame 24 | { 25 | namespace gl 26 | { 27 | SpriteGrid::SpriteGrid() {} 28 | 29 | int SpriteGrid::make(const yourgame::gl::Texture *atlas, 30 | const std::vector &tiles, | ^ /code/src/toolbox/gl/spritegrid.cpp:30:53: warning: no header providing "std::string" is directly included [misc-include-cleaner] 21 | #include "yourgame/gl/spritegrid.h" 22 | 23 | namespace yourgame 24 | { 25 | namespace gl 26 | { 27 | SpriteGrid::SpriteGrid() {} 28 | 29 | int SpriteGrid::make(const yourgame::gl::Texture *atlas, 30 | const std::vector &tiles, | ^ /code/src/toolbox/gl/spritegrid.cpp:31:30: warning: 3 adjacent parameters of 'make' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters] 31 | unsigned int width, | ^~~~~~~~~~~~~~~~~~~ 32 | float gridWidth, | ~~~~~~~~~~~~~~~~ 33 | float gridHeight) | ~~~~~~~~~~~~~~~~ /code/src/toolbox/gl/spritegrid.cpp:31:43: note: the first parameter in the range is 'width' 31 | unsigned int width, | ^~~~~ /code/src/toolbox/gl/spritegrid.cpp:33:36: note: the last parameter in the range is 'gridHeight' 33 | float gridHeight) | ^~~~~~~~~~ /code/src/toolbox/gl/spritegrid.cpp:32:30: note: 'unsigned int' and 'float' may be implicitly converted 32 | float gridWidth, | ^ /code/src/toolbox/gl/spritegrid.cpp:35:18: warning: implicit conversion 'const yourgame::gl::Texture *' -> 'bool' [readability-implicit-bool-conversion] 35 | if (!atlas || tiles.empty()) | ~^ | ( == nullptr) /code/src/toolbox/gl/spritegrid.cpp:41:13: warning: variable 'numTiles' of type 'unsigned int' can be declared 'const' [misc-const-correctness] 41 | unsigned int numTiles = tiles.size(); | ^ | const /code/src/toolbox/gl/spritegrid.cpp:47:45: warning: performing an implicit widening conversion to type 'size_type' (aka 'unsigned long') of a multiplication performed in type 'unsigned int' [bugprone-implicit-widening-of-multiplication-result] 47 | std::vector objPosData(numVerts * 3); | ^ /code/src/toolbox/gl/spritegrid.cpp:47:45: note: make conversion explicit to silence this warning 20 | std::vector objPosData(numVerts * 3); | ^~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/spritegrid.cpp:47:45: note: perform multiplication in a wider type 47 | std::vector objPosData(numVerts * 3); | ^~~~~~~~ | static_cast( ) /code/src/toolbox/gl/spritegrid.cpp:48:50: warning: performing an implicit widening conversion to type 'size_type' (aka 'unsigned long') of a multiplication performed in type 'unsigned int' [bugprone-implicit-widening-of-multiplication-result] 48 | std::vector objTexCoordData(numVerts * 2); | ^ /code/src/toolbox/gl/spritegrid.cpp:48:50: note: make conversion explicit to silence this warning 48 | std::vector objTexCoordData(numVerts * 2); | ^~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/spritegrid.cpp:48:50: note: perform multiplication in a wider type 48 | std::vector objTexCoordData(numVerts * 2); | ^~~~~~~~ | static_cast( ) /code/src/toolbox/gl/spritegrid.cpp:49:48: warning: performing an implicit widening conversion to type 'size_type' (aka 'unsigned long') of a multiplication performed in type 'unsigned int' [bugprone-implicit-widening-of-multiplication-result] 49 | std::vector objNormalData(numVerts * 3); | ^ /code/src/toolbox/gl/spritegrid.cpp:49:48: note: make conversion explicit to silence this warning 49 | std::vector objNormalData(numVerts * 3); | ^~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/spritegrid.cpp:49:48: note: perform multiplication in a wider type 49 | std::vector objNormalData(numVerts * 3); | ^~~~~~~~ | static_cast( ) /code/src/toolbox/gl/spritegrid.cpp:50:48: warning: performing an implicit widening conversion to type 'size_type' (aka 'unsigned long') of a multiplication performed in type 'unsigned int' [bugprone-implicit-widening-of-multiplication-result] 50 | std::vector objColordData(numVerts * 3, 1.0f); | ^ /code/src/toolbox/gl/spritegrid.cpp:50:48: note: make conversion explicit to silence this warning 50 | std::vector objColordData(numVerts * 3, 1.0f); | ^~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/spritegrid.cpp:50:48: note: perform multiplication in a wider type 50 | std::vector objColordData(numVerts * 3, 1.0f); | ^~~~~~~~ | static_cast( ) /code/src/toolbox/gl/spritegrid.cpp:55:13: warning: variable 'tileAspect' of type 'float' can be declared 'const' [misc-const-correctness] 55 | float tileAspect = coords.aspectRatioPixel; | ^ | const /code/src/toolbox/gl/spritegrid.cpp:59:57: warning: conditional operator is used as sub-expression of parent conditional operator, refrain from using nested conditional operators [readability-avoid-nested-conditional-operator] 59 | auto tilesWide = (width == 0) ? numTiles : (width > numTiles ? numTiles : width); | ^ /code/src/toolbox/gl/spritegrid.cpp:59:30: note: parent conditional operator here 59 | auto tilesWide = (width == 0) ? numTiles : (width > numTiles ? numTiles : width); | ^ /code/src/toolbox/gl/spritegrid.cpp:63:41: warning: C-style casts are discouraged; use static_cast [google-readability-casting] 63 | tileWidth = gridWidth / (float)tilesWide; | ^~~~~~~ | static_cast( ) /code/src/toolbox/gl/spritegrid.cpp:73:43: warning: C-style casts are discouraged; use static_cast [google-readability-casting] 73 | tileHeight = gridHeight / (float)height; | ^~~~~~~ | static_cast( ) /code/src/toolbox/gl/spritegrid.cpp:82:13: warning: variable 'orgZ' of type 'GLfloat' (aka 'float') can be declared 'const' [misc-const-correctness] 82 | GLfloat orgZ = 0.0f; | ^ | const /code/src/toolbox/gl/spritegrid.cpp:84:13: warning: no header providing "size_t" is directly included [misc-include-cleaner] 21 | size_t pWrite = 0; | ^ /code/src/toolbox/gl/spritegrid.cpp:89:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 89 | for (int i = 0; i < numTiles; i++) | ^ /code/src/toolbox/gl/spritegrid.cpp:89:29: warning: backward branch (for loop) is ID-dependent due to variable reference to 'numTiles' and may cause performance degradation [altera-id-dependent-backward-branch] 89 | for (int i = 0; i < numTiles; i++) | ^ /code/src/toolbox/gl/spritegrid.cpp:41:13: note: inferred assignment of ID-dependent value from ID-dependent 41 | unsigned int numTiles = tiles.size(); | ^ /code/src/toolbox/gl/spritegrid.cpp:97:47: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 97 | objPosData[pWrite++] = orgX + (GLfloat)tileWidth; | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/spritegrid.cpp:100:47: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 100 | objPosData[pWrite++] = orgX + (GLfloat)tileWidth; | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/spritegrid.cpp:101:47: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 101 | objPosData[pWrite++] = orgY - (GLfloat)tileHeight; | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/spritegrid.cpp:104:47: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 104 | objPosData[pWrite++] = orgY - (GLfloat)tileHeight; | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/spritegrid.cpp:108:45: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 108 | objTexCoordData[tWrite++] = (GLfloat)coords.uMin; | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/spritegrid.cpp:109:45: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 109 | objTexCoordData[tWrite++] = (GLfloat)coords.vMax; | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/spritegrid.cpp:110:45: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 110 | objTexCoordData[tWrite++] = (GLfloat)coords.uMax; | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/spritegrid.cpp:111:45: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 111 | objTexCoordData[tWrite++] = (GLfloat)coords.vMax; | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/spritegrid.cpp:112:45: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 112 | objTexCoordData[tWrite++] = (GLfloat)coords.uMax; | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/spritegrid.cpp:113:45: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 113 | objTexCoordData[tWrite++] = (GLfloat)coords.vMin; | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/spritegrid.cpp:114:45: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 114 | objTexCoordData[tWrite++] = (GLfloat)coords.uMin; | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/spritegrid.cpp:115:45: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 115 | objTexCoordData[tWrite++] = (GLfloat)coords.vMin; | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/spritegrid.cpp:147:29: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 147 | orgY -= (GLfloat)(tileHeight); | ^~~~~~~~~ | static_cast /code/src/toolbox/gl/spritegrid.cpp:148:28: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 148 | orgX = (GLfloat)0.0f; | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/spritegrid.cpp:152:29: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 152 | orgX += (GLfloat)(tileWidth); | ^~~~~~~~~ | static_cast /code/src/toolbox/gl/spritegrid.cpp:164:18: warning: implicit conversion 'Geometry *' -> 'bool' [readability-implicit-bool-conversion] 164 | if (!m_geo) | ~^ | == nullptr /code/src/toolbox/gl/spritegrid.cpp:166:39: warning: no header providing "yourgame::gl::Geometry" is directly included [misc-include-cleaner] 21 | m_geo = yourgame::gl::Geometry::make(); | ^ /code/src/toolbox/gl/spritegrid.cpp:168:58: warning: narrowing conversion from 'unsigned long' to signed type 'GLsizeiptr' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 168 | m_geo->addBuffer("pos", GL_ARRAY_BUFFER, vertPosSize, objPosData.data(), GL_STATIC_DRAW); | ^ /code/src/toolbox/gl/spritegrid.cpp:169:59: warning: narrowing conversion from 'unsigned long' to signed type 'GLsizeiptr' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 169 | m_geo->addBuffer("norm", GL_ARRAY_BUFFER, vertNormSize, objNormalData.data(), GL_STATIC_DRAW); | ^ /code/src/toolbox/gl/spritegrid.cpp:170:64: warning: narrowing conversion from 'unsigned long' to signed type 'GLsizeiptr' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 170 | m_geo->addBuffer("texcoords", GL_ARRAY_BUFFER, vertTexcoordsSize, objTexCoordData.data(), GL_STATIC_DRAW); | ^ /code/src/toolbox/gl/spritegrid.cpp:171:60: warning: narrowing conversion from 'unsigned long' to signed type 'GLsizeiptr' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 171 | m_geo->addBuffer("color", GL_ARRAY_BUFFER, vertColorSize, objColordData.data(), GL_STATIC_DRAW); | ^ /code/src/toolbox/gl/spritegrid.cpp:172:66: warning: narrowing conversion from 'unsigned long' to signed type 'GLsizeiptr' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 172 | m_geo->addBuffer("idx", GL_ELEMENT_ARRAY_BUFFER, vertIdxSize, objIdxData.data(), GL_STATIC_DRAW); | ^ /code/src/toolbox/gl/spritegrid.cpp:174:17: warning: variable 'arBufferNames' of type 'std::vector' (aka 'vector>') can be declared 'const' [misc-const-correctness] 174 | std::vector arBufferNames = {"pos", "norm", "texcoords", "color"}; | ^ | const /code/src/toolbox/gl/spritegrid.cpp:176:17: warning: variable 'arDescrs' of type 'std::vector' can be declared 'const' [misc-const-correctness] 176 | std::vector arDescrs = | ^ | const /code/src/toolbox/gl/spritegrid.cpp:176:43: warning: no header providing "yourgame::gl::Shape" is directly included [misc-include-cleaner] 21 | std::vector arDescrs = | ^ /code/src/toolbox/gl/spritegrid.cpp:177:70: warning: C-style casts are discouraged; use static_cast/const_cast/reinterpret_cast [google-readability-casting] 177 | {{gl::attrLocPosition, 3, GL_FLOAT, GL_FALSE, 0, (void *)0, 0}, | ^ /code/src/toolbox/gl/spritegrid.cpp:177:78: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 177 | {{gl::attrLocPosition, 3, GL_FLOAT, GL_FALSE, 0, (void *)0, 0}, | ^ | nullptr /code/src/toolbox/gl/spritegrid.cpp:178:68: warning: C-style casts are discouraged; use static_cast/const_cast/reinterpret_cast [google-readability-casting] 178 | {gl::attrLocNormal, 3, GL_FLOAT, GL_FALSE, 0, (void *)0, 0}, | ^ /code/src/toolbox/gl/spritegrid.cpp:178:76: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 178 | {gl::attrLocNormal, 3, GL_FLOAT, GL_FALSE, 0, (void *)0, 0}, | ^ | nullptr /code/src/toolbox/gl/spritegrid.cpp:179:71: warning: C-style casts are discouraged; use static_cast/const_cast/reinterpret_cast [google-readability-casting] 179 | {gl::attrLocTexcoords, 2, GL_FLOAT, GL_FALSE, 0, (void *)0, 0}, | ^ /code/src/toolbox/gl/spritegrid.cpp:179:79: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 179 | {gl::attrLocTexcoords, 2, GL_FLOAT, GL_FALSE, 0, (void *)0, 0}, | ^ | nullptr /code/src/toolbox/gl/spritegrid.cpp:180:67: warning: C-style casts are discouraged; use static_cast/const_cast/reinterpret_cast [google-readability-casting] 180 | {gl::attrLocColor, 3, GL_FLOAT, GL_FALSE, 0, (void *)0, 0}}; | ^ /code/src/toolbox/gl/spritegrid.cpp:180:75: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 180 | {gl::attrLocColor, 3, GL_FLOAT, GL_FALSE, 0, (void *)0, 0}}; | ^ | nullptr /code/src/toolbox/gl/spritegrid.cpp:182:98: warning: C-style casts are discouraged; use static_cast [google-readability-casting] 182 | m_geo->addShape("main", arDescrs, arBufferNames, {GL_UNSIGNED_INT, GL_TRIANGLES, (GLsizei)objIdxData.size()}, "idx"); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/spritegrid.cpp:188:42: warning: narrowing conversion from 'unsigned long' to signed type 'GLsizeiptr' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 188 | m_geo->bufferData("pos", vertPosSize, objPosData.data()); | ^ /code/src/toolbox/gl/spritegrid.cpp:189:43: warning: narrowing conversion from 'unsigned long' to signed type 'GLsizeiptr' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 189 | m_geo->bufferData("norm", vertNormSize, objNormalData.data()); | ^ /code/src/toolbox/gl/spritegrid.cpp:190:48: warning: narrowing conversion from 'unsigned long' to signed type 'GLsizeiptr' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 190 | m_geo->bufferData("texcoords", vertTexcoordsSize, objTexCoordData.data()); | ^ /code/src/toolbox/gl/spritegrid.cpp:191:44: warning: narrowing conversion from 'unsigned long' to signed type 'GLsizeiptr' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 191 | m_geo->bufferData("color", vertColorSize, objColordData.data()); | ^ /code/src/toolbox/gl/spritegrid.cpp:192:42: warning: narrowing conversion from 'unsigned long' to signed type 'GLsizeiptr' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 192 | m_geo->bufferData("idx", vertIdxSize, objIdxData.data()); | ^ /code/src/toolbox/gl/spritegrid.cpp:194:82: warning: C-style casts are discouraged; use static_cast [google-readability-casting] 194 | m_geo->setShapeElArDescr("main", {GL_UNSIGNED_INT, GL_TRIANGLES, (GLsizei)objIdxData.size()}); | ^~~~~~~~~ | static_cast( ) /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/platform_desktop_web/input.cpp /code/include/base/yourgame/input.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_INPUT_H | ^~~~~~~~~~~~~~~~ | BASE_YOURGAME_INPUT_H 21 | #define YOURGAME_INPUT_H | ~~~~~~~~~~~~~~~~ | BASE_YOURGAME_INPUT_H /code/include/base/yourgame/input.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace input | ~~~~~~~~~~~~~~~ | namespace yourgame::input /code/include/base/yourgame/input.h:28:14: warning: enum 'Source' uses a larger base type ('unsigned int', size: 4 bytes) than necessary for its value set, consider using 'std::uint16_t' (2 bytes) as the base type to reduce its size [performance-enum-size] 28 | enum Source | ^ /code/include/base_internal/yourgame_internal/input.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_INTERNAL_INPUT_H | ^~~~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_INPUT_H 21 | #define YOURGAME_INTERNAL_INPUT_H | ~~~~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_INPUT_H /code/include/base_internal/yourgame_internal/input.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~ | "yourgame/input.h" 24 | #include "yourgame/input.h" | ~~~~~~~~~~~~~~~~~~ | /code/include/base_internal/yourgame_internal/input.h:26:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 26 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 27 | { | ~ 28 | namespace input | ~~~~~~~~~~~~~~~ | namespace yourgame_internal::input /code/include/base_internal/yourgame_internal/input.h:30:16: warning: accessing fields in struct 'InputValue' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 8 bytes [altera-struct-pack-align] 30 | struct InputValue | ^ 31 | { 32 | InputValue(float v = 0.0f) : val(v), valLast(v) {} // default ctor 33 | float val; 34 | float valLast; 35 | }; | | __attribute__((aligned(8))) /code/include/base_internal/yourgame_internal/input.h:30:16: note: use "__attribute__((aligned(8)))" to align struct 'InputValue' to 8 bytes /code/include/base_internal/yourgame_internal/input.h:32:13: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,hicpp-explicit-conversions] 32 | InputValue(float v = 0.0f) : val(v), valLast(v) {} // default ctor | ^ | explicit /code/include/base_internal/yourgame_internal/input.h:33:19: warning: member variable 'val' has public visibility [misc-non-private-member-variables-in-classes] 33 | float val; | ^ /code/include/base_internal/yourgame_internal/input.h:34:19: warning: member variable 'valLast' has public visibility [misc-non-private-member-variables-in-classes] 34 | float valLast; | ^ /code/include/base_internal/yourgame_internal/input.h:37:62: warning: variable 'inputStates' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 37 | extern std::map inputStates; | ^ /code/src/platform_desktop_web/input.cpp:21:1: warning: #includes are not sorted properly [llvm-include-order] 21 | #include | ^ ~~~~~~~~~~~~~~ | "yourgame/input.h" 22 | #include "yourgame/input.h" | ~~~~~~~~~~~~~~~~~~ | "yourgame_internal/input.h" 23 | #include "yourgame_internal/input.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | /code/src/platform_desktop_web/input.cpp:27:5: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 27 | const std::map keyApiMapping = | ^ /code/src/platform_desktop_web/input.cpp:27:16: warning: no header providing "std::map" is directly included [misc-include-cleaner] 20 | #define GLFW_INCLUDE_NONE 21 | #include 22 | #include "yourgame/input.h" 23 | #include "yourgame_internal/input.h" 24 | 25 | namespace 26 | { 27 | const std::map keyApiMapping = | ^ /code/src/platform_desktop_web/input.cpp:27:50: warning: initialization of 'keyApiMapping' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 27 | const std::map keyApiMapping = | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_map.h:240:7: note: possibly throwing constructor declared here 240 | map(initializer_list __l, | ^ /code/src/platform_desktop_web/input.cpp:150:5: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 150 | const std::map mouseButtonApiMapping = | ^ /code/src/platform_desktop_web/input.cpp:150:50: warning: initialization of 'mouseButtonApiMapping' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 150 | const std::map mouseButtonApiMapping = | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_map.h:240:7: note: possibly throwing constructor declared here 240 | map(initializer_list __l, | ^ /code/src/platform_desktop_web/input.cpp:160:5: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 160 | const std::map gamepadConnectedApiMapping = | ^ /code/src/platform_desktop_web/input.cpp:160:50: warning: initialization of 'gamepadConnectedApiMapping' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 160 | const std::map gamepadConnectedApiMapping = | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_map.h:240:7: note: possibly throwing constructor declared here 240 | map(initializer_list __l, | ^ /code/src/platform_desktop_web/input.cpp:166:5: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 166 | const std::map> gamepadFirstButtonAxisIdx = | ^ /code/src/platform_desktop_web/input.cpp:166:30: warning: no header providing "std::pair" is directly included [misc-include-cleaner] 20 | const std::map> gamepadFirstButtonAxisIdx = | ^ /code/src/platform_desktop_web/input.cpp:166:86: warning: initialization of 'gamepadFirstButtonAxisIdx' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 166 | const std::map> gamepadFirstButtonAxisIdx = | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_map.h:240:7: note: possibly throwing constructor declared here 240 | map(initializer_list __l, | ^ /code/src/platform_desktop_web/input.cpp:172:34: warning: parameter 'window' is unused [misc-unused-parameters] 172 | void keyCallback(GLFWwindow *window, int key, int scancode, int action, int mods) | ^~~~~~ | /*window*/ /code/src/platform_desktop_web/input.cpp:172:42: warning: 4 adjacent parameters of 'keyCallback' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters] 172 | void keyCallback(GLFWwindow *window, int key, int scancode, int action, int mods) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/platform_desktop_web/input.cpp:172:46: note: the first parameter in the range is 'key' 172 | void keyCallback(GLFWwindow *window, int key, int scancode, int action, int mods) | ^~~ /code/src/platform_desktop_web/input.cpp:172:81: note: the last parameter in the range is 'mods' 172 | void keyCallback(GLFWwindow *window, int key, int scancode, int action, int mods) | ^~~~ /code/src/platform_desktop_web/input.cpp:172:55: warning: parameter 'scancode' is unused [misc-unused-parameters] 172 | void keyCallback(GLFWwindow *window, int key, int scancode, int action, int mods) | ^~~~~~~~ | /*scancode*/ /code/src/platform_desktop_web/input.cpp:172:81: warning: parameter 'mods' is unused [misc-unused-parameters] 172 | void keyCallback(GLFWwindow *window, int key, int scancode, int action, int mods) | ^~~~ | /*mods*/ /code/src/platform_desktop_web/input.cpp:177:38: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 177 | if (action == GLFW_PRESS) | ^ | { 178 | yourgame_internal::input::setInput(mapping->second, 1.0f); 179 | else if (action == GLFW_RELEASE) | } /code/src/platform_desktop_web/input.cpp:179:45: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 179 | else if (action == GLFW_RELEASE) | ^ | { 180 | yourgame_internal::input::setInput(mapping->second, 0.0f); | /code/src/platform_desktop_web/input.cpp:184:17: warning: 'cursorPositionCallback' is a static definition in anonymous namespace; static is redundant here [readability-static-definition-in-anonymous-namespace] 184 | static void cursorPositionCallback(GLFWwindow *window, double xpos, double ypos) | ~~~~~~ ^ /code/src/platform_desktop_web/input.cpp:184:52: warning: parameter 'window' is unused [misc-unused-parameters] 184 | static void cursorPositionCallback(GLFWwindow *window, double xpos, double ypos) | ^~~~~~ | /*window*/ /code/src/platform_desktop_web/input.cpp:186:71: warning: C-style casts are discouraged; use static_cast [google-readability-casting] 186 | yourgame_internal::input::setInput2(yourgame::input::MOUSE_X, (float)xpos); | ^~~~~~~ | static_cast( ) /code/src/platform_desktop_web/input.cpp:187:71: warning: C-style casts are discouraged; use static_cast [google-readability-casting] 187 | yourgame_internal::input::setInput2(yourgame::input::MOUSE_Y, (float)ypos); | ^~~~~~~ | static_cast( ) /code/src/platform_desktop_web/input.cpp:190:42: warning: parameter 'window' is unused [misc-unused-parameters] 190 | void mouseButtonCallback(GLFWwindow *window, int button, int action, int mods) | ^~~~~~ | /*window*/ /code/src/platform_desktop_web/input.cpp:190:50: warning: 3 adjacent parameters of 'mouseButtonCallback' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters] 190 | void mouseButtonCallback(GLFWwindow *window, int button, int action, int mods) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/platform_desktop_web/input.cpp:190:54: note: the first parameter in the range is 'button' 190 | void mouseButtonCallback(GLFWwindow *window, int button, int action, int mods) | ^~~~~~ /code/src/platform_desktop_web/input.cpp:190:78: note: the last parameter in the range is 'mods' 190 | void mouseButtonCallback(GLFWwindow *window, int button, int action, int mods) | ^~~~ /code/src/platform_desktop_web/input.cpp:190:78: warning: parameter 'mods' is unused [misc-unused-parameters] 190 | void mouseButtonCallback(GLFWwindow *window, int button, int action, int mods) | ^~~~ | /*mods*/ /code/src/platform_desktop_web/input.cpp:195:38: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 195 | if (action == GLFW_PRESS) | ^ | { 196 | yourgame_internal::input::setInput(mapping->second, 1.0f); 197 | else if (action == GLFW_RELEASE) | } /code/src/platform_desktop_web/input.cpp:197:45: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 197 | else if (action == GLFW_RELEASE) | ^ | { 198 | yourgame_internal::input::setInput(mapping->second, 0.0f); | /code/src/platform_desktop_web/input.cpp:202:37: warning: parameter 'window' is unused [misc-unused-parameters] 202 | void scrollCallback(GLFWwindow *window, double xoffset, double yoffset) | ^~~~~~ | /*window*/ /code/src/platform_desktop_web/input.cpp:204:78: warning: C-style casts are discouraged; use static_cast [google-readability-casting] 204 | yourgame_internal::input::setInput(yourgame::input::SCROLL_OFFSET_X, (float)xoffset); | ^~~~~~~ | static_cast( ) /code/src/platform_desktop_web/input.cpp:205:78: warning: C-style casts are discouraged; use static_cast [google-readability-casting] 205 | yourgame_internal::input::setInput(yourgame::input::SCROLL_OFFSET_Y, (float)yoffset); | ^~~~~~~ | static_cast( ) /code/src/platform_desktop_web/input.cpp:208:27: warning: 2 adjacent parameters of 'joystickCallback' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters] 208 | void joystickCallback(int jid, int event) | ^~~~~~~~~~~~~~~~~~ /code/src/platform_desktop_web/input.cpp:208:31: note: the first parameter in the range is 'jid' 208 | void joystickCallback(int jid, int event) | ^~~ /code/src/platform_desktop_web/input.cpp:208:40: note: the last parameter in the range is 'event' 208 | void joystickCallback(int jid, int event) | ^~~~~ /code/src/platform_desktop_web/input.cpp:213:41: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 213 | if (event == GLFW_CONNECTED) | ^ | { 214 | yourgame_internal::input::setInput(mapping->second, 1.0f); 215 | else if (event == GLFW_DISCONNECTED) | } /code/src/platform_desktop_web/input.cpp:215:49: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 215 | else if (event == GLFW_DISCONNECTED) | ^ | { 216 | yourgame_internal::input::setInput(mapping->second, 0.0f); | /code/src/platform_desktop_web/input.cpp:221:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 221 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 222 | { | ~ 223 | namespace input | ~~~~~~~~~~~~~~~ | namespace yourgame_internal::input /code/src/platform_desktop_web/input.cpp:225:14: warning: function 'tickInput' has cognitive complexity of 49 (threshold 25) [readability-function-cognitive-complexity] 225 | void tickInput() | ^ /code/src/platform_desktop_web/input.cpp:228:13: note: +1, including nesting penalty of 0, nesting level increased to 1 228 | for (auto &i : yourgame_internal::input::inputStates) | ^ /code/src/platform_desktop_web/input.cpp:243:13: note: +1, including nesting penalty of 0, nesting level increased to 1 243 | for (const auto &pad : gamepadFirstButtonAxisIdx) | ^ /code/src/platform_desktop_web/input.cpp:246:17: note: +2, including nesting penalty of 1, nesting level increased to 2 246 | if (glfwGetGamepadState(pad.first, &state)) | ^ /code/src/platform_desktop_web/input.cpp:249:163: note: +3, including nesting penalty of 2, nesting level increased to 3 249 | yourgame_internal::input::setInput(static_cast(buttonWriteIdx++), state.buttons[GLFW_GAMEPAD_BUTTON_A] == GLFW_PRESS ? 1.0f : 0.0f); | ^ /code/src/platform_desktop_web/input.cpp:250:163: note: +3, including nesting penalty of 2, nesting level increased to 3 250 | yourgame_internal::input::setInput(static_cast(buttonWriteIdx++), state.buttons[GLFW_GAMEPAD_BUTTON_B] == GLFW_PRESS ? 1.0f : 0.0f); | ^ /code/src/platform_desktop_web/input.cpp:251:163: note: +3, including nesting penalty of 2, nesting level increased to 3 251 | yourgame_internal::input::setInput(static_cast(buttonWriteIdx++), state.buttons[GLFW_GAMEPAD_BUTTON_X] == GLFW_PRESS ? 1.0f : 0.0f); | ^ /code/src/platform_desktop_web/input.cpp:252:163: note: +3, including nesting penalty of 2, nesting level increased to 3 252 | yourgame_internal::input::setInput(static_cast(buttonWriteIdx++), state.buttons[GLFW_GAMEPAD_BUTTON_Y] == GLFW_PRESS ? 1.0f : 0.0f); | ^ /code/src/platform_desktop_web/input.cpp:253:173: note: +3, including nesting penalty of 2, nesting level increased to 3 253 | yourgame_internal::input::setInput(static_cast(buttonWriteIdx++), state.buttons[GLFW_GAMEPAD_BUTTON_LEFT_BUMPER] == GLFW_PRESS ? 1.0f : 0.0f); | ^ /code/src/platform_desktop_web/input.cpp:254:174: note: +3, including nesting penalty of 2, nesting level increased to 3 254 | yourgame_internal::input::setInput(static_cast(buttonWriteIdx++), state.buttons[GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER] == GLFW_PRESS ? 1.0f : 0.0f); | ^ /code/src/platform_desktop_web/input.cpp:255:166: note: +3, including nesting penalty of 2, nesting level increased to 3 255 | yourgame_internal::input::setInput(static_cast(buttonWriteIdx++), state.buttons[GLFW_GAMEPAD_BUTTON_BACK] == GLFW_PRESS ? 1.0f : 0.0f); | ^ /code/src/platform_desktop_web/input.cpp:256:167: note: +3, including nesting penalty of 2, nesting level increased to 3 256 | yourgame_internal::input::setInput(static_cast(buttonWriteIdx++), state.buttons[GLFW_GAMEPAD_BUTTON_START] == GLFW_PRESS ? 1.0f : 0.0f); | ^ /code/src/platform_desktop_web/input.cpp:257:167: note: +3, including nesting penalty of 2, nesting level increased to 3 257 | yourgame_internal::input::setInput(static_cast(buttonWriteIdx++), state.buttons[GLFW_GAMEPAD_BUTTON_GUIDE] == GLFW_PRESS ? 1.0f : 0.0f); | ^ /code/src/platform_desktop_web/input.cpp:258:172: note: +3, including nesting penalty of 2, nesting level increased to 3 258 | yourgame_internal::input::setInput(static_cast(buttonWriteIdx++), state.buttons[GLFW_GAMEPAD_BUTTON_LEFT_THUMB] == GLFW_PRESS ? 1.0f : 0.0f); | ^ /code/src/platform_desktop_web/input.cpp:259:173: note: +3, including nesting penalty of 2, nesting level increased to 3 259 | yourgame_internal::input::setInput(static_cast(buttonWriteIdx++), state.buttons[GLFW_GAMEPAD_BUTTON_RIGHT_THUMB] == GLFW_PRESS ? 1.0f : 0.0f); | ^ /code/src/platform_desktop_web/input.cpp:260:169: note: +3, including nesting penalty of 2, nesting level increased to 3 260 | yourgame_internal::input::setInput(static_cast(buttonWriteIdx++), state.buttons[GLFW_GAMEPAD_BUTTON_DPAD_UP] == GLFW_PRESS ? 1.0f : 0.0f); | ^ /code/src/platform_desktop_web/input.cpp:261:172: note: +3, including nesting penalty of 2, nesting level increased to 3 261 | yourgame_internal::input::setInput(static_cast(buttonWriteIdx++), state.buttons[GLFW_GAMEPAD_BUTTON_DPAD_RIGHT] == GLFW_PRESS ? 1.0f : 0.0f); | ^ /code/src/platform_desktop_web/input.cpp:262:171: note: +3, including nesting penalty of 2, nesting level increased to 3 262 | yourgame_internal::input::setInput(static_cast(buttonWriteIdx++), state.buttons[GLFW_GAMEPAD_BUTTON_DPAD_DOWN] == GLFW_PRESS ? 1.0f : 0.0f); | ^ /code/src/platform_desktop_web/input.cpp:263:171: note: +3, including nesting penalty of 2, nesting level increased to 3 263 | yourgame_internal::input::setInput(static_cast(buttonWriteIdx++), state.buttons[GLFW_GAMEPAD_BUTTON_DPAD_LEFT] == GLFW_PRESS ? 1.0f : 0.0f); | ^ /code/src/platform_desktop_web/input.cpp:228:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 228 | for (auto &i : yourgame_internal::input::inputStates) | ^ /code/src/platform_desktop_web/input.cpp:243:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 243 | for (const auto &pad : gamepadFirstButtonAxisIdx) | ^ /code/src/platform_desktop_web/input.cpp:246:21: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 246 | if (glfwGetGamepadState(pad.first, &state)) | ^ | != 0 /code/src/platform_desktop_web/input.cpp:291:17: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 291 | for (const auto &p : gamepadConnectedApiMapping) | ^ /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/toolbox/util/motion.cpp /code/include/toolbox/yourgame/util/motion.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_MOTION_H | ^~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_MOTION_H 21 | #define YOURGAME_MOTION_H | ~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_MOTION_H /code/include/toolbox/yourgame/util/motion.h:26:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 26 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 27 | { | ~ 28 | namespace util | ~~~~~~~~~~~~~~ | namespace yourgame::util /code/include/toolbox/yourgame/util/motion.h:33:24: warning: enum 'FlowType' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 33 | enum class FlowType | ^ /code/include/toolbox/yourgame/util/motion.h:40:24: warning: enum 'SegmentEase' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 40 | enum class SegmentEase | ^ /code/include/toolbox/yourgame/util/motion.h:53:13: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,hicpp-explicit-conversions] 53 | Motion(FlowType flowType); | ^ | explicit /code/include/toolbox/yourgame/util/motion.h:69:20: warning: accessing fields in struct 'Segment' is inefficient due to padding; only needs 80 bytes but is using 88 bytes [altera-struct-pack-align] 69 | struct Segment | ^ 70 | { 71 | Segment(float dt, 72 | std::function calcFn, 73 | std::function easeFn, 74 | float val0, 75 | float val1, 76 | float val2) : dt(dt), calcFn(calcFn), easeFn(easeFn), val0(val0), val1(val1), val2(val2) {} 77 | 78 | float dt; 79 | std::function calcFn; 80 | std::function easeFn; 81 | float val0; 82 | float val1; 83 | float val2; 84 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/util/motion.h:69:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'Segment' /code/include/toolbox/yourgame/util/motion.h:69:20: warning: accessing fields in struct 'Segment' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 128 bytes [altera-struct-pack-align] 69 | struct Segment | ^ 70 | { 71 | Segment(float dt, 72 | std::function calcFn, 73 | std::function easeFn, 74 | float val0, 75 | float val1, 76 | float val2) : dt(dt), calcFn(calcFn), easeFn(easeFn), val0(val0), val1(val1), val2(val2) {} 77 | 78 | float dt; 79 | std::function calcFn; 80 | std::function easeFn; 81 | float val0; 82 | float val1; 83 | float val2; 84 | }; | | __attribute__((aligned(128))) /code/include/toolbox/yourgame/util/motion.h:69:20: note: use "__attribute__((aligned(128)))" to align struct 'Segment' to 128 bytes /code/include/toolbox/yourgame/util/motion.h:72:25: warning: pass by value and use std::move [modernize-pass-by-value] 24 | std::function calcFn, | ^ 25 | std::function easeFn, 26 | float val0, 27 | float val1, 28 | float val2) : dt(dt), calcFn(calcFn), easeFn(easeFn), val0(val0), val1(val1), val2(val2) {} | | std::move( ) /code/include/toolbox/yourgame/util/motion.h:73:25: warning: pass by value and use std::move [modernize-pass-by-value] 73 | std::function easeFn, | ^ 74 | float val0, 75 | float val1, 76 | float val2) : dt(dt), calcFn(calcFn), easeFn(easeFn), val0(val0), val1(val1), val2(val2) {} | | std::move( ) /code/include/toolbox/yourgame/util/motion.h:76:54: warning: parameter 'calcFn' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param] 24 | float val2) : dt(dt), calcFn(calcFn), easeFn(easeFn), val0(val0), val1(val1), val2(val2) {} | ^ | std::move( ) /code/include/toolbox/yourgame/util/motion.h:76:70: warning: parameter 'easeFn' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param] 76 | float val2) : dt(dt), calcFn(calcFn), easeFn(easeFn), val0(val0), val1(val1), val2(val2) {} | ^ | std::move( ) /code/include/toolbox/yourgame/util/motion.h:78:23: warning: member variable 'dt' has public visibility [misc-non-private-member-variables-in-classes] 78 | float dt; | ^ /code/include/toolbox/yourgame/util/motion.h:79:62: warning: member variable 'calcFn' has public visibility [misc-non-private-member-variables-in-classes] 79 | std::function calcFn; | ^ /code/include/toolbox/yourgame/util/motion.h:80:52: warning: member variable 'easeFn' has public visibility [misc-non-private-member-variables-in-classes] 80 | std::function easeFn; | ^ /code/include/toolbox/yourgame/util/motion.h:81:23: warning: member variable 'val0' has public visibility [misc-non-private-member-variables-in-classes] 81 | float val0; | ^ /code/include/toolbox/yourgame/util/motion.h:82:23: warning: member variable 'val1' has public visibility [misc-non-private-member-variables-in-classes] 82 | float val1; | ^ /code/include/toolbox/yourgame/util/motion.h:83:23: warning: member variable 'val2' has public visibility [misc-non-private-member-variables-in-classes] 83 | float val2; | ^ /code/include/toolbox/yourgame/util/motion.h:88:20: warning: use default member initializer for 'm_t' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 88 | double m_t; | ^ | {0.0} /code/include/toolbox/yourgame/util/motion.h:89:20: warning: use default member initializer for 'm_direction' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 89 | double m_direction; | ^ | {1.0} /code/include/toolbox/yourgame/util/motion.h:90:20: warning: use default member initializer for 'm_duration' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 90 | double m_duration; | ^ | {0.0} /code/include/toolbox/yourgame/util/motion.h:91:19: warning: use default member initializer for 'm_currentValue' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 91 | float m_currentValue; | ^ | {0.0f} /code/include/toolbox/yourgame/util/motion.h:92:18: warning: use default member initializer for 'm_finished' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 92 | bool m_finished; | ^ | {false} /code/include/toolbox/yourgame/util/motion.h:93:18: warning: use default member initializer for 'm_paused' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 93 | bool m_paused; | ^ | {false} /code/src/toolbox/util/motion.cpp:20:1: warning: #includes are not sorted properly [llvm-include-order] 20 | #include | ^ ~~~~~~~ | "yourgame/util/motion.h" 21 | #include "yourgame/util/motion.h" | ~~~~~~~~~~~~~~~~~~~~~~~~ | /code/src/toolbox/util/motion.cpp:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace util | ~~~~~~~~~~~~~~ | namespace yourgame::util /code/src/toolbox/util/motion.cpp:97:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 97 | for (const auto &seg : m_segments) | ^ /code/src/toolbox/util/motion.cpp:99:26: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 99 | tLocal = m_t - tFind; | ^ /code/src/toolbox/util/motion.cpp:115:23: warning: method 'val' can be made const [readability-make-member-function-const] 115 | float Motion::val() | ^ | const /code/src/toolbox/util/motion.cpp:138:22: warning: method 'isFinished' can be made const [readability-make-member-function-const] 138 | bool Motion::isFinished() | ^ | const /code/src/toolbox/util/motion.cpp:143:22: warning: method 'isPaused' can be made const [readability-make-member-function-const] 143 | bool Motion::isPaused() | ^ | const /code/src/toolbox/util/motion.cpp:148:22: warning: method 'getDirection' can be made const [readability-make-member-function-const] 148 | bool Motion::getDirection() | ^ | const /code/src/toolbox/util/motion.cpp:153:38: warning: parameter 't' is unused [misc-unused-parameters] 153 | float Motion::calcIdle(float t, const Segment &segment) | ^ | /*t*/ /code/src/toolbox/util/motion.cpp:163:14: warning: no header providing "std::function" is directly included [misc-include-cleaner] 21 | std::function Motion::getEaseFn(SegmentEase ease) | ^ /code/src/toolbox/util/motion.cpp:190:51: warning: parameter 'dt' is unused [misc-unused-parameters] 190 | float Motion::calcEaseNone(float t, float dt) | ^~ | /*dt*/ /code/src/toolbox/util/motion.cpp:202:13: warning: variable 't01' of type 'float' can be declared 'const' [misc-const-correctness] 202 | float t01 = t / dt; | ^ | const /code/src/toolbox/util/motion.cpp:213:13: warning: variable 't01' of type 'float' can be declared 'const' [misc-const-correctness] 213 | float t01 = 1.0f - t / dt; | ^ | const /code/src/toolbox/util/motion.cpp:224:13: warning: variable 't01' of type 'float' can be declared 'const' [misc-const-correctness] 224 | float t01 = 1.0f - t / dt; | ^ | const /code/src/toolbox/util/motion.cpp:230:13: warning: variable 't01' of type 'float' can be declared 'const' [misc-const-correctness] 230 | float t01 = t / dt; | ^ | const /code/src/toolbox/util/motion.cpp:236:13: warning: variable 't01' of type 'float' can be declared 'const' [misc-const-correctness] 236 | float t01 = t / dt; | ^ | const /code/src/toolbox/util/motion.cpp:237:13: warning: variable 't01s' of type 'float' can be declared 'const' [misc-const-correctness] 237 | float t01s = (3.0f * t01 * t01 - 2.0f * t01 * t01 * t01); | ^ | const /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/toolbox/gl/framebuffer.cpp /code/include/base/yourgame/gl_include.h:38:9: warning: header guard does not follow preferred style [llvm-header-guard] 38 | #ifndef YOURGAME_GL_INCLUDE_H | ^~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H 39 | #define YOURGAME_GL_INCLUDE_H | ~~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H /code/include/toolbox/yourgame/gl/framebuffer.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLFRAMEBUFFER_H | ^~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_FRAMEBUFFER_H 21 | #define YOURGAME_GLFRAMEBUFFER_H | ~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_FRAMEBUFFER_H /code/include/toolbox/yourgame/gl/framebuffer.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/texture.h" 24 | #include "yourgame/gl_include.h" 25 | #include "yourgame/gl/texture.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/framebuffer.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/framebuffer.h:31:15: warning: class 'Framebuffer' defines a non-default destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 31 | class Framebuffer | ^ /code/include/toolbox/yourgame/gl/framebuffer.h:34:20: warning: accessing fields in struct 'TextureAttachDescr' is inefficient due to padding; only needs 44 bytes but is using 48 bytes [altera-struct-pack-align] 34 | struct TextureAttachDescr | ^ 35 | { 36 | GLint internalformat; 37 | GLenum format; 38 | GLenum type; 39 | GLenum unit; 40 | std::vector> parameteri; 41 | GLenum attachment; 42 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/gl/framebuffer.h:34:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'TextureAttachDescr' /code/include/toolbox/yourgame/gl/framebuffer.h:34:20: warning: accessing fields in struct 'TextureAttachDescr' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 64 bytes [altera-struct-pack-align] 34 | struct TextureAttachDescr | ^ 35 | { 36 | GLint internalformat; 37 | GLenum format; 38 | GLenum type; 39 | GLenum unit; 40 | std::vector> parameteri; 41 | GLenum attachment; 42 | }; | | __attribute__((aligned(64))) /code/include/toolbox/yourgame/gl/framebuffer.h:34:20: note: use "__attribute__((aligned(64)))" to align struct 'TextureAttachDescr' to 64 bytes /code/include/toolbox/yourgame/gl/framebuffer.h:59:13: warning: constructor does not initialize these fields: m_handle [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 59 | Framebuffer() {} | ^ 60 | GLuint m_handle; | | {} /code/include/toolbox/yourgame/gl/texture.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLTEXTURE_H | ^~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_TEXTURE_H 21 | #define YOURGAME_GLTEXTURE_H | ~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_TEXTURE_H /code/include/toolbox/yourgame/gl/texture.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~ | "yourgame/gl_include.h" 24 | #include | ~~~~~~~~ | 25 | #include | ~~~~~~~~ | 26 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/texture.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/texture.h:32:16: warning: accessing fields in struct 'TextureCoords' is inefficient due to padding; only needs 41 bytes but is using 44 bytes [altera-struct-pack-align] 32 | struct TextureCoords | ^ /code/include/toolbox/yourgame/gl/texture.h:32:16: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'TextureCoords' /code/include/toolbox/yourgame/gl/texture.h:32:16: warning: accessing fields in struct 'TextureCoords' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 64 bytes [altera-struct-pack-align] 32 | struct TextureCoords | ^ /code/include/toolbox/yourgame/gl/texture.h:32:16: note: use "__attribute__((aligned(64)))" to align struct 'TextureCoords' to 64 bytes /code/include/toolbox/yourgame/gl/texture.h:35:13: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default,modernize-use-equals-default] 35 | TextureCoords() {} | ^ ~~ | = default; /code/include/toolbox/yourgame/gl/texture.h:37:27: warning: 2 adjacent parameters of 'TextureCoords' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters] 37 | TextureCoords(int x, int y, int width, int height, int texWidth, int texHeight, bool cwRot) | ^~~~~~~~~~~~ /code/include/toolbox/yourgame/gl/texture.h:37:31: note: the first parameter in the range is 'x' 37 | TextureCoords(int x, int y, int width, int height, int texWidth, int texHeight, bool cwRot) | ^ /code/include/toolbox/yourgame/gl/texture.h:37:38: note: the last parameter in the range is 'y' 37 | TextureCoords(int x, int y, int width, int height, int texWidth, int texHeight, bool cwRot) | ^ /code/include/toolbox/yourgame/gl/texture.h:55:19: warning: member variable 'uMin' has public visibility [misc-non-private-member-variables-in-classes] 55 | float uMin = 0.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:56:19: warning: member variable 'uMax' has public visibility [misc-non-private-member-variables-in-classes] 56 | float uMax = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:57:19: warning: member variable 'vMin' has public visibility [misc-non-private-member-variables-in-classes] 57 | float vMin = 0.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:58:19: warning: member variable 'vMax' has public visibility [misc-non-private-member-variables-in-classes] 58 | float vMax = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:59:17: warning: member variable 'xMinPixel' has public visibility [misc-non-private-member-variables-in-classes] 59 | int xMinPixel = 0; | ^ /code/include/toolbox/yourgame/gl/texture.h:60:17: warning: member variable 'xMaxPixel' has public visibility [misc-non-private-member-variables-in-classes] 60 | int xMaxPixel = 1; | ^ /code/include/toolbox/yourgame/gl/texture.h:61:17: warning: member variable 'yMinPixel' has public visibility [misc-non-private-member-variables-in-classes] 61 | int yMinPixel = 0; | ^ /code/include/toolbox/yourgame/gl/texture.h:62:17: warning: member variable 'yMaxPixel' has public visibility [misc-non-private-member-variables-in-classes] 62 | int yMaxPixel = 1; | ^ /code/include/toolbox/yourgame/gl/texture.h:63:19: warning: member variable 'aspectRatioPixel' has public visibility [misc-non-private-member-variables-in-classes] 63 | float aspectRatioPixel = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:64:19: warning: member variable 'aspectRatioPixelInverse' has public visibility [misc-non-private-member-variables-in-classes] 64 | float aspectRatioPixelInverse = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:65:18: warning: member variable 'cwRotated' has public visibility [misc-non-private-member-variables-in-classes] 65 | bool cwRotated = false; | ^ /code/include/toolbox/yourgame/gl/texture.h:68:15: warning: class 'Texture' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 68 | class Texture | ^ /code/include/toolbox/yourgame/gl/texture.h:95:13: warning: function 'handle' should be marked [[nodiscard]] [modernize-use-nodiscard] 95 | GLuint handle() const { return m_handle; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:96:13: warning: function 'getTarget' should be marked [[nodiscard]] [modernize-use-nodiscard] 96 | GLenum getTarget() const { return m_target; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:97:13: warning: function 'getWidth' should be marked [[nodiscard]] [modernize-use-nodiscard] 97 | GLsizei getWidth() const { return m_width; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:98:13: warning: function 'getHeight' should be marked [[nodiscard]] [modernize-use-nodiscard] 98 | GLsizei getHeight() const { return m_height; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:107:13: warning: function 'getCoords' should be marked [[nodiscard]] [modernize-use-nodiscard] 107 | TextureCoords getCoords(std::string name) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:122:13: warning: function 'getNumFrames' should be marked [[nodiscard]] [modernize-use-nodiscard] 122 | int getNumFrames(std::string sequenceName) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:127:13: warning: function 'getSequenceNames' should be marked [[nodiscard]] [modernize-use-nodiscard] 127 | std::vector getSequenceNames() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:136:13: warning: function 'getGridCoords' should be marked [[nodiscard]] [modernize-use-nodiscard] 136 | TextureCoords getGridCoords(int gridWidth, int gridHeight, int index) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:139:13: warning: constructor does not initialize these fields: m_handle, m_target, m_unit, m_width, m_height [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 139 | Texture() {} | ^ 140 | GLuint m_handle; | | {} 141 | GLenum m_target; | | {} 142 | GLenum m_unit; | | {} 143 | GLsizei m_width; | | {} 144 | GLsizei m_height; | | {} /code/include/toolbox/yourgame/gl/texture.h:146:20: warning: accessing fields in struct 'Sequence' is inefficient due to padding; only needs 73 bytes but is using 80 bytes [altera-struct-pack-align] 146 | struct Sequence | ^ 147 | { 148 | std::map frames; 149 | bool framesInvalidated; 150 | std::vector framesConsec; /**< \brief consecutive representation of the frame coordinates */ 151 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/gl/texture.h:146:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'Sequence' /code/include/toolbox/yourgame/gl/texture.h:146:20: warning: accessing fields in struct 'Sequence' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 128 bytes [altera-struct-pack-align] 146 | struct Sequence | ^ 147 | { 148 | std::map frames; 149 | bool framesInvalidated; 150 | std::vector framesConsec; /**< \brief consecutive representation of the frame coordinates */ 151 | }; | | __attribute__((aligned(128))) /code/include/toolbox/yourgame/gl/texture.h:146:20: note: use "__attribute__((aligned(128)))" to align struct 'Sequence' to 128 bytes /code/src/toolbox/gl/framebuffer.cpp:22:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 22 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 23 | { | ~ 24 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/src/toolbox/gl/framebuffer.cpp:26:76: warning: no header providing "std::vector" is directly included [misc-include-cleaner] 21 | 22 | namespace yourgame 23 | { 24 | namespace gl 25 | { 26 | Framebuffer *Framebuffer::make(GLsizei width, GLsizei height, std::vector texAttachDescrs) | ^ /code/src/toolbox/gl/framebuffer.cpp:26:103: warning: the parameter 'texAttachDescrs' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 26 | Framebuffer *Framebuffer::make(GLsizei width, GLsizei height, std::vector texAttachDescrs) | ^ | const & /code/src/toolbox/gl/framebuffer.cpp:28:13: warning: initializing non-owner 'Framebuffer *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 28 | Framebuffer *newFrameBuf = new Framebuffer(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/gl/framebuffer.cpp:28:13: warning: use auto when initializing with new to avoid duplicating the type name [hicpp-use-auto,modernize-use-auto] 28 | Framebuffer *newFrameBuf = new Framebuffer(); | ^~~~~~~~~~~ | auto /code/src/toolbox/gl/framebuffer.cpp:35:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 35 | for (const auto &ta : texAttachDescrs) | ^ /code/src/toolbox/gl/framebuffer.cpp:37:17: warning: no header providing "yourgame::gl::Texture" is directly included [misc-include-cleaner] 21 | Texture *newTex = Texture::make(GL_TEXTURE_2D, ta.unit, ta.parameteri); | ^ /code/src/toolbox/gl/framebuffer.cpp:60:17: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory] 60 | delete newFrameBuf; | ^ ~~~~~~~~~~~ /code/src/toolbox/gl/framebuffer.cpp:28:13: note: variable declared here 28 | Framebuffer *newFrameBuf = new Framebuffer(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/gl/framebuffer.cpp:69:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 69 | for (const auto &t : m_textureAttachments) | ^ /code/src/toolbox/gl/framebuffer.cpp:71:17: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory] 71 | delete t; | ^ ~ /code/src/toolbox/gl/framebuffer.cpp:69:18: note: variable declared here 69 | for (const auto &t : m_textureAttachments) | ^~~~~~~~~~~~~~~ /code/src/toolbox/gl/framebuffer.cpp:76:27: warning: method 'bind' can be made const [readability-make-member-function-const] 76 | void Framebuffer::bind() | ^ | const /code/src/toolbox/gl/framebuffer.cpp:81:27: warning: method 'unbindTarget' can be made static [readability-convert-member-functions-to-static] 81 | void Framebuffer::unbindTarget() | ^ /code/src/toolbox/gl/framebuffer.cpp:88:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 88 | for (auto i = 0; i < m_textureAttachments.size(); i++) | ^ /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/platform_desktop_web/file.cpp /code/include/base/yourgame/file.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_FILE_H | ^~~~~~~~~~~~~~~ | BASE_YOURGAME_FILE_H 21 | #define YOURGAME_FILE_H | ~~~~~~~~~~~~~~~ | BASE_YOURGAME_FILE_H /code/include/base/yourgame/file.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace file | ~~~~~~~~~~~~~~ | namespace yourgame::file /code/include/base/yourgame/log.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_LOG_H | ^~~~~~~~~~~~~~ | BASE_YOURGAME_LOG_H 21 | #define YOURGAME_LOG_H | ~~~~~~~~~~~~~~ | BASE_YOURGAME_LOG_H /code/include/base/yourgame/log.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace log | ~~~~~~~~~~~~~ | namespace yourgame::log /code/include/base/yourgame/log.h:35:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 35 | if (logr != nullptr) | ^ | { 36 | logr->debug(s, value, args...); | /code/include/base/yourgame/log.h:46:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 46 | if (logr != nullptr) | ^ | { 47 | logr->debug(value); | /code/include/base/yourgame/log.h:56:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 56 | if (logr != nullptr) | ^ | { 57 | logr->info(s, value, args...); | /code/include/base/yourgame/log.h:65:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 65 | if (logr != nullptr) | ^ | { 66 | logr->info(value); | /code/include/base/yourgame/log.h:74:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 74 | if (logr != nullptr) | ^ | { 75 | logr->warn(s, value, args...); | /code/include/base/yourgame/log.h:83:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 83 | if (logr != nullptr) | ^ | { 84 | logr->warn(value); | /code/include/base/yourgame/log.h:92:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 92 | if (logr != nullptr) | ^ | { 93 | logr->error(s, value, args...); | /code/include/base/yourgame/log.h:101:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 101 | if (logr != nullptr) | ^ | { 102 | logr->error(value); | /code/include/base_internal/yourgame_internal/file.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_INTERNAL_FILE_H | ^~~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_FILE_H 21 | #define YOURGAME_INTERNAL_FILE_H | ~~~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_FILE_H /code/include/base_internal/yourgame_internal/file.h:24:1: warning: #includes are not sorted properly [llvm-include-order] 24 | #include | ^ ~~~~~~~~ | 25 | #include | ~~~~~~~~ | /code/include/base_internal/yourgame_internal/file.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace file | ~~~~~~~~~~~~~~ | namespace yourgame_internal::file 30 | { 31 | const std::string ARCHIVE_FILE_EXTENSION = "zip"; 32 | 33 | int readFileFromPath(const std::string &filepath, std::vector &dst); 34 | 35 | int readFileFromArchive(const std::string &archivepath, const std::string &filename, std::vector &dst); 36 | 37 | int writeFileToPath(const std::string &filepath, const void *data, size_t numBytes); 38 | 39 | bool checkIfPathIsDirectory(const std::string &filepath); 40 | 41 | void normalizePath(std::string &path); 42 | } // namespace file | ~~~~~~~~~~~~~~~~~~~ | } // namespace yourgame_internal::file /code/include/base_internal/yourgame_internal/file.h:31:9: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 31 | const std::string ARCHIVE_FILE_EXTENSION = "zip"; | ^ /code/include/base_internal/yourgame_internal/file.h:31:27: warning: initialization of 'ARCHIVE_FILE_EXTENSION' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 31 | const std::string ARCHIVE_FILE_EXTENSION = "zip"; | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:641:7: note: possibly throwing constructor declared here 641 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^ /code/src/platform_desktop_web/file.cpp:20:1: warning: #includes are not sorted properly [llvm-include-order] 20 | #include // std::sort() | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ | "dirent.h" 21 | #include | ~~~~~~~~ | // std::sort() 22 | #include | ~~~~~~~~ | 23 | #include | ~~~~~~~ | 24 | #include "dirent.h" | ~~~~~~~~~~ | /code/src/platform_desktop_web/file.cpp:30:1: warning: #includes are not sorted properly [llvm-include-order] 30 | #include "yourgame/log.h" | ^ ~~~~~~~~~~~~~~~~ | "yourgame/file.h" 31 | #include "yourgame/file.h" | ~~~~~~~~~~~~~~~~~ | "yourgame/log.h" /code/src/platform_desktop_web/file.cpp:36:5: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 36 | std::string basePathAbs = ""; | ^ /code/src/platform_desktop_web/file.cpp:36:17: warning: initialization of 'basePathAbs' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 36 | std::string basePathAbs = ""; | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:641:7: note: possibly throwing constructor declared here 641 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^ /code/src/platform_desktop_web/file.cpp:36:17: warning: variable 'basePathAbs' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 36 | std::string basePathAbs = ""; | ^ /code/src/platform_desktop_web/file.cpp:36:17: warning: redundant string initialization [readability-redundant-string-init] 36 | std::string basePathAbs = ""; | ^~~~~~~~~~~~~~~~ | basePathAbs /code/src/platform_desktop_web/file.cpp:37:5: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 37 | std::string assetPathAbs = ""; | ^ /code/src/platform_desktop_web/file.cpp:37:17: warning: initialization of 'assetPathAbs' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 37 | std::string assetPathAbs = ""; | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:641:7: note: possibly throwing constructor declared here 641 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^ /code/src/platform_desktop_web/file.cpp:37:17: warning: variable 'assetPathAbs' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 37 | std::string assetPathAbs = ""; | ^ /code/src/platform_desktop_web/file.cpp:37:17: warning: redundant string initialization [readability-redundant-string-init] 37 | std::string assetPathAbs = ""; | ^~~~~~~~~~~~~~~~~ | assetPathAbs /code/src/platform_desktop_web/file.cpp:38:5: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 38 | std::string projectPath = ""; | ^ /code/src/platform_desktop_web/file.cpp:38:17: warning: initialization of 'projectPath' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 38 | std::string projectPath = ""; | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:641:7: note: possibly throwing constructor declared here 641 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^ /code/src/platform_desktop_web/file.cpp:38:17: warning: variable 'projectPath' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 38 | std::string projectPath = ""; | ^ /code/src/platform_desktop_web/file.cpp:38:17: warning: redundant string initialization [readability-redundant-string-init] 38 | std::string projectPath = ""; | ^~~~~~~~~~~~~~~~ | projectPath /code/src/platform_desktop_web/file.cpp:60:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 60 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 61 | { | ~ 62 | namespace file | ~~~~~~~~~~~~~~ 63 | { | ~ 64 | namespace desktop | ~~~~~~~~~~~~~~~~~ | namespace yourgame_internal::file::desktop /code/src/platform_desktop_web/file.cpp:72:21: warning: variable 'exeBasePathLength' is not initialized [cppcoreguidelines-init-variables] 72 | int exeBasePathLength; | ^ | = 0 /code/src/platform_desktop_web/file.cpp:73:17: warning: variable 'exePathLength' of type 'int' can be declared 'const' [misc-const-correctness] 73 | int exePathLength = wai_getExecutablePath(NULL, 0, NULL); | ^ | const /code/src/platform_desktop_web/file.cpp:73:59: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 73 | int exePathLength = wai_getExecutablePath(NULL, 0, NULL); | ^~~~ | nullptr /code/src/platform_desktop_web/file.cpp:73:59: warning: no header providing "NULL" is directly included [misc-include-cleaner] /code/src/platform_desktop_web/file.cpp:73:68: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 73 | int exePathLength = wai_getExecutablePath(NULL, 0, NULL); | ^~~~ | nullptr /code/src/platform_desktop_web/file.cpp:74:17: warning: initializing non-owner 'char *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 74 | char *path = (char *)malloc(exePathLength + 1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/platform_desktop_web/file.cpp:74:30: warning: do not use C-style cast to convert between unrelated types [cppcoreguidelines-pro-type-cstyle-cast] 74 | char *path = (char *)malloc(exePathLength + 1); | ^ /code/src/platform_desktop_web/file.cpp:74:30: warning: C-style casts are discouraged; use static_cast [google-readability-casting] 74 | char *path = (char *)malloc(exePathLength + 1); | ^~~~~~~~ | static_cast( ) /code/src/platform_desktop_web/file.cpp:74:38: warning: do not manage memory manually; consider a container or a smart pointer [cppcoreguidelines-no-malloc,hicpp-no-malloc] 74 | char *path = (char *)malloc(exePathLength + 1); | ^~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/platform_desktop_web/file.cpp:74:38: warning: no header providing "malloc" is directly included [misc-include-cleaner] 21 | char *path = (char *)malloc(exePathLength + 1); | ^ /code/src/platform_desktop_web/file.cpp:76:17: warning: do not use pointer arithmetic [cppcoreguidelines-pro-bounds-pointer-arithmetic] 76 | path[exeBasePathLength + 1] = '\0'; | ^ /code/src/platform_desktop_web/file.cpp:80:17: warning: do not manage memory manually; use RAII [cppcoreguidelines-no-malloc,hicpp-no-malloc] 80 | free(path); | ^~~~~~~~~~ /code/src/platform_desktop_web/file.cpp:80:17: warning: calling legacy resource function without passing a 'gsl::owner<>' [cppcoreguidelines-owning-memory] 80 | free(path); | ^~~~~~~~~~ /code/src/platform_desktop_web/file.cpp:80:17: warning: no header providing "free" is directly included [misc-include-cleaner] /code/src/platform_desktop_web/file.cpp:84:17: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 84 | for (const auto &a : {"assets/", "../assets/", "../../assets/", "../../../assets/"}) | ^ /code/src/platform_desktop_web/file.cpp:88:25: warning: implicit conversion 'DIR *' (aka '__dirstream *') -> 'bool' [readability-implicit-bool-conversion] 88 | if (dir) | ^ | != nullptr /code/src/platform_desktop_web/file.cpp:100:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 100 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 101 | { | ~ 102 | namespace file | ~~~~~~~~~~~~~~ | namespace yourgame::file /code/src/platform_desktop_web/file.cpp:114:68: warning: no header providing "uint8_t" is directly included [misc-include-cleaner] 21 | int readAssetFile(const std::string &filename, std::vector &dst) | ^ /code/src/platform_desktop_web/file.cpp:140:17: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] 140 | if (path.size() < 1) | ^~~~~~~~~~~~~~~ | path.empty() /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:1220:7: note: method 'basic_string'::empty() defined here 1220 | empty() const _GLIBCXX_NOEXCEPT | ^ /code/src/platform_desktop_web/file.cpp:185:77: warning: no header providing "size_t" is directly included [misc-include-cleaner] 21 | int writeProjectFile(const std::string &filename, const void *data, size_t numBytes) | ^ /code/src/platform_desktop_web/file.cpp:204:17: warning: switching on non-enum value without default case may not cover all cases [bugprone-switch-missing-default-case] 204 | switch (pathToOpen[0]) | ^ /code/src/platform_desktop_web/file.cpp:222:13: warning: variable 'reLsPattern' of type 'std::regex' (aka 'basic_regex') can be declared 'const' [misc-const-correctness] 222 | static std::regex reLsPattern(R"((.*\/|^)(.*\*[^\/\n]*)$)"); // match 0: full string, | ^ | const /code/src/platform_desktop_web/file.cpp:226:13: warning: variable 'tmp' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness] 226 | std::string tmp = pathToOpen; | ^ | const /code/src/platform_desktop_web/file.cpp:239:18: warning: implicit conversion 'DIR *' (aka '__dirstream *') -> 'bool' [readability-implicit-bool-conversion] 239 | if (!dir) | ~^ | == nullptr /code/src/platform_desktop_web/file.cpp:245:32: warning: variable 'ent' is not initialized [cppcoreguidelines-init-variables] 245 | struct dirent *ent; | ^ | = nullptr /code/src/platform_desktop_web/file.cpp:246:17: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 246 | while ((ent = readdir(dir)) != NULL) | ^ /code/src/platform_desktop_web/file.cpp:246:24: warning: backward branch (while loop) is ID-dependent due to variable reference to 'ent' and may cause performance degradation [altera-id-dependent-backward-branch] 246 | while ((ent = readdir(dir)) != NULL) | ^ /code/src/platform_desktop_web/file.cpp:245:17: note: inferred assignment of ID-dependent value from ID-dependent variable dir 245 | struct dirent *ent; | ^ /code/src/platform_desktop_web/file.cpp:246:31: warning: function is not thread safe [concurrency-mt-unsafe] 246 | while ((ent = readdir(dir)) != NULL) | ^ /code/src/platform_desktop_web/file.cpp:246:48: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 246 | while ((ent = readdir(dir)) != NULL) | ^~~~ | nullptr /code/src/platform_desktop_web/file.cpp:248:42: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,hicpp-no-array-decay] 248 | if (std::regex_match(ent->d_name, reFileFilter)) | ^ /code/src/platform_desktop_web/file.cpp:253:46: warning: unnecessary temporary object created while calling emplace_back [hicpp-use-emplace,modernize-use-emplace] 253 | ret.emplace_back(std::string(ent->d_name)); | ^~~~~~~~~~~~ ~ /code/src/platform_desktop_web/file.cpp:253:58: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,hicpp-no-array-decay] 253 | ret.emplace_back(std::string(ent->d_name)); | ^ /code/src/platform_desktop_web/file.cpp:256:58: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,hicpp-no-array-decay] 256 | ret.emplace_back(std::string(ent->d_name) + "/"); | ^ /code/src/platform_desktop_web/file.cpp:259:58: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,hicpp-no-array-decay] 259 | ret.emplace_back(std::string(ent->d_name) + "@"); | ^ /code/src/platform_desktop_web/file.cpp:262:58: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,hicpp-no-array-decay] 262 | ret.emplace_back(std::string(ent->d_name) + "*"); | ^ /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/toolbox/math/trafo.cpp /code/include/base/yourgame/math.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_MATH_H | ^~~~~~~~~~~~~~~ | BASE_YOURGAME_MATH_H 21 | #define YOURGAME_MATH_H | ~~~~~~~~~~~~~~~ | BASE_YOURGAME_MATH_H /code/include/base/yourgame/math.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/base/yourgame/math.h:27:20: warning: enum 'Projection' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 27 | enum class Projection | ^ /code/include/base/yourgame/math.h:33:20: warning: enum 'Axis' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 33 | enum class Axis | ^ /code/include/toolbox/yourgame/math/trafo.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_TRAFO_H | ^~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_TRAFO_H 21 | #define YOURGAME_TRAFO_H | ~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_TRAFO_H /code/include/toolbox/yourgame/math/trafo.h:24:1: warning: #includes are not sorted properly [llvm-include-order] 24 | #include | ^ ~~~~~~~~~~~~~ | "yourgame/math.h" 25 | #include 26 | #include "yourgame/math.h" | ~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/math/trafo.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/toolbox/yourgame/math/trafo.h:56:13: warning: function 'getAxisGlobal' should be marked [[nodiscard]] [modernize-use-nodiscard] 56 | glm::vec3 getAxisGlobal(math::Axis ax) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/math/trafo.h:57:13: warning: function 'getEye' should be marked [[nodiscard]] [modernize-use-nodiscard] 57 | glm::vec3 getEye() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/math/trafo.h:58:13: warning: function 'getRotation' should be marked [[nodiscard]] [modernize-use-nodiscard] 58 | glm::quat getRotation() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/math/trafo.h:59:13: warning: function 'getScale' should be marked [[nodiscard]] [modernize-use-nodiscard] 59 | glm::vec3 getScale() const; | ^ | [[nodiscard]] /code/src/toolbox/math/trafo.cpp:22:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 22 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 23 | { | ~ 24 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/src/toolbox/math/trafo.cpp:26:14: warning: no header providing "glm::mat4" is directly included [misc-include-cleaner] 21 | 22 | namespace yourgame 23 | { 24 | namespace math 25 | { 26 | glm::mat4 Trafo::mat() | ^ /code/src/toolbox/math/trafo.cpp:32:52: warning: no header providing "yourgame::math::Axis" is directly included [misc-include-cleaner] 21 | 22 | namespace yourgame 23 | { 24 | namespace math 25 | { 26 | glm::mat4 Trafo::mat() 27 | { 28 | updateMatrixIfInvalidated(); 29 | return m_mat; 30 | } 31 | 32 | void Trafo::rotateLocal(float angle, math::Axis ax) | ^ /code/src/toolbox/math/trafo.cpp:35:34: warning: no header providing "glm::angleAxis" is directly included [misc-include-cleaner] 21 | 22 | namespace yourgame 23 | { 24 | namespace math 25 | { 26 | glm::mat4 Trafo::mat() 27 | { 28 | updateMatrixIfInvalidated(); 29 | return m_mat; 30 | } 31 | 32 | void Trafo::rotateLocal(float angle, math::Axis ax) 33 | { 34 | // local rotation: use _global_ axis and this quaternion order: 35 | m_rot = m_rot * glm::angleAxis(angle, getAxisGlobal(ax)); | ^ /code/src/toolbox/math/trafo.cpp:39:51: warning: no header providing "glm::vec3" is directly included [misc-include-cleaner] 21 | void Trafo::rotateLocal(float angle, glm::vec3 const &ax) | ^ /code/src/toolbox/math/trafo.cpp:41:56: warning: no header providing "glm::normalize" is directly included [misc-include-cleaner] 21 | m_rot = m_rot * glm::angleAxis(angle, glm::normalize(ax)); | ^ /code/src/toolbox/math/trafo.cpp:66:34: warning: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access] 66 | translateLocal(trans.x, math::Axis::X); | ^ /code/src/toolbox/math/trafo.cpp:67:34: warning: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access] 67 | translateLocal(trans.y, math::Axis::Y); | ^ /code/src/toolbox/math/trafo.cpp:68:34: warning: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access] 68 | translateLocal(trans.z, math::Axis::Z); | ^ /code/src/toolbox/math/trafo.cpp:123:51: warning: 2 adjacent parameters of 'pointTo' of similar type ('const glm::vec3 &') are easily swapped by mistake [bugprone-easily-swappable-parameters] 123 | void Trafo::pointTo(glm::vec3 const &eye, glm::vec3 const ¢er, glm::vec3 const &up) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/math/trafo.cpp:123:68: note: the first parameter in the range is 'center' 123 | void Trafo::pointTo(glm::vec3 const &eye, glm::vec3 const ¢er, glm::vec3 const &up) | ^~~~~~ /code/src/toolbox/math/trafo.cpp:123:93: note: the last parameter in the range is 'up' 123 | void Trafo::pointTo(glm::vec3 const &eye, glm::vec3 const ¢er, glm::vec3 const &up) | ^~ /code/src/toolbox/math/trafo.cpp:127:26: warning: no header providing "glm::quatLookAtLH" is directly included [misc-include-cleaner] 21 | m_rot = glm::quatLookAtLH(dir, up); | ^ /code/src/toolbox/math/trafo.cpp:132:50: warning: 2 adjacent parameters of 'lookAt' of similar type ('const glm::vec3 &') are easily swapped by mistake [bugprone-easily-swappable-parameters] 132 | void Trafo::lookAt(glm::vec3 const &eye, glm::vec3 const ¢er, glm::vec3 const &up) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/math/trafo.cpp:132:67: note: the first parameter in the range is 'center' 132 | void Trafo::lookAt(glm::vec3 const &eye, glm::vec3 const ¢er, glm::vec3 const &up) | ^~~~~~ /code/src/toolbox/math/trafo.cpp:132:92: note: the last parameter in the range is 'up' 132 | void Trafo::lookAt(glm::vec3 const &eye, glm::vec3 const ¢er, glm::vec3 const &up) | ^~ /code/src/toolbox/math/trafo.cpp:135:26: warning: no header providing "glm::quatLookAt" is directly included [misc-include-cleaner] 135 | m_rot = glm::quatLookAt(dir, up); | ^ /code/src/toolbox/math/trafo.cpp:144:33: warning: no header providing "glm::clamp" is directly included [misc-include-cleaner] 21 | auto t01 = glm::clamp(t, 0.0f, 1.0f); | ^ /code/src/toolbox/math/trafo.cpp:145:35: warning: no header providing "glm::lerp" is directly included [misc-include-cleaner] 21 | dst->m_eye = glm::lerp(m_eye, target.m_eye, t01); | ^ /code/src/toolbox/math/trafo.cpp:146:35: warning: no header providing "glm::lerp" is directly included [misc-include-cleaner] 21 | dst->m_rot = glm::lerp(m_rot, target.m_rot, t01); | ^ /code/src/toolbox/math/trafo.cpp:157:30: warning: no header providing "glm::translate" is directly included [misc-include-cleaner] 21 | m_mat = glm::translate(m_eye) * m_matRot * glm::scale(m_scale); | ^ /code/src/toolbox/math/trafo.cpp:157:65: warning: no header providing "glm::scale" is directly included [misc-include-cleaner] 157 | m_mat = glm::translate(m_eye) * m_matRot * glm::scale(m_scale); | ^ /code/src/toolbox/math/trafo.cpp:188:26: warning: method 'getAxisGlobal' can be made static [readability-convert-member-functions-to-static] 188 | glm::vec3 Trafo::getAxisGlobal(math::Axis ax) const | ^ ~~~~~ /code/src/toolbox/math/trafo.cpp:194:24: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] 194 | return glm::vec3(1.0f, 0.0f, 0.0f); | ^~~~~~~~~~ ~ | { } /code/src/toolbox/math/trafo.cpp:197:24: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] 197 | return glm::vec3(0.0f, 1.0f, 0.0f); | ^~~~~~~~~~ ~ | { } /code/src/toolbox/math/trafo.cpp:200:24: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] 200 | return glm::vec3(0.0f, 0.0f, 1.0f); | ^~~~~~~~~~ ~ | { } /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/toolbox/gl/buffer.cpp /code/include/base/yourgame/gl_include.h:38:9: warning: header guard does not follow preferred style [llvm-header-guard] 38 | #ifndef YOURGAME_GL_INCLUDE_H | ^~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H 39 | #define YOURGAME_GL_INCLUDE_H | ~~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H /code/include/toolbox/yourgame/gl/buffer.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLBUFFER_H | ^~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_BUFFER_H 21 | #define YOURGAME_GLBUFFER_H | ~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_BUFFER_H /code/include/toolbox/yourgame/gl/buffer.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/buffer.h:29:15: warning: class 'Buffer' defines a non-default destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 29 | class Buffer | ^ /code/include/toolbox/yourgame/gl/buffer.h:44:13: warning: constructor does not initialize these fields: m_target, m_handle, m_usage [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 44 | Buffer() {} | ^ 45 | GLenum m_target; | | {} 46 | GLuint m_handle; | | {} 47 | GLenum m_usage; | | {} /code/src/toolbox/gl/buffer.cpp:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/src/toolbox/gl/buffer.cpp:29:20: warning: variable 'handle' is not initialized [cppcoreguidelines-init-variables] 29 | GLuint handle; | ^ | = 0 /code/src/toolbox/gl/buffer.cpp:42:13: warning: do not use 'else' after 'return' [llvm-else-after-return,readability-else-after-return] 42 | else | ^~~~ 43 | { | ~ 44 | Buffer *newBuf = new Buffer(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 45 | newBuf->m_target = target; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 46 | newBuf->m_handle = handle; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 47 | newBuf->m_usage = usage; | ~~~~~~~~~~~~~~~~~~~~~~~~ 48 | return newBuf; | ~~~~~~~~~~~~~~ 49 | } | ~ /code/src/toolbox/gl/buffer.cpp:44:17: warning: initializing non-owner 'Buffer *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 44 | Buffer *newBuf = new Buffer(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/gl/buffer.cpp:44:17: warning: use auto when initializing with new to avoid duplicating the type name [hicpp-use-auto,modernize-use-auto] note: this fix will not be applied because it overlaps with another fix /code/src/toolbox/gl/buffer.cpp:57:22: warning: method 'bind' can be made const [readability-make-member-function-const] 57 | void Buffer::bind() | ^ | const /code/src/toolbox/gl/buffer.cpp:62:22: warning: method 'unbindTarget' can be made const [readability-make-member-function-const] 62 | void Buffer::unbindTarget() | ^ | const /code/src/toolbox/gl/buffer.cpp:67:22: warning: method 'bufferData' can be made const [readability-make-member-function-const] 67 | bool Buffer::bufferData(GLsizeiptr size, const GLvoid *data) | ^ | const /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/toolbox/gl/shader.cpp /code/include/base/yourgame/gl_include.h:38:9: warning: header guard does not follow preferred style [llvm-header-guard] 38 | #ifndef YOURGAME_GL_INCLUDE_H | ^~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H 39 | #define YOURGAME_GL_INCLUDE_H | ~~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H /code/include/base/yourgame/math.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_MATH_H | ^~~~~~~~~~~~~~~ | BASE_YOURGAME_MATH_H 21 | #define YOURGAME_MATH_H | ~~~~~~~~~~~~~~~ | BASE_YOURGAME_MATH_H /code/include/base/yourgame/math.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/base/yourgame/math.h:27:20: warning: enum 'Projection' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 27 | enum class Projection | ^ /code/include/base/yourgame/math.h:33:20: warning: enum 'Axis' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 33 | enum class Axis | ^ /code/include/toolbox/yourgame/gl/conventions.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLCONVENTIONS_H | ^~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_CONVENTIONS_H 21 | #define YOURGAME_GLCONVENTIONS_H | ~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_CONVENTIONS_H /code/include/toolbox/yourgame/gl/conventions.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/conventions.h:38:30: warning: variable 'unifNameMvpMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 38 | extern const GLchar *unifNameMvpMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:39:30: warning: variable 'unifNameVpMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 39 | extern const GLchar *unifNameVpMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:40:30: warning: variable 'unifNameModelMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 40 | extern const GLchar *unifNameModelMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:41:30: warning: variable 'unifNameNormalMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 41 | extern const GLchar *unifNameNormalMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:42:30: warning: variable 'unifNameCameraPosition' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 42 | extern const GLchar *unifNameCameraPosition; | ^ /code/include/toolbox/yourgame/gl/conventions.h:43:30: warning: variable 'unifNameCameraTrafo' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 43 | extern const GLchar *unifNameCameraTrafo; | ^ /code/include/toolbox/yourgame/gl/conventions.h:44:30: warning: variable 'unifNameSkyRotationInv' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 44 | extern const GLchar *unifNameSkyRotationInv; | ^ /code/include/toolbox/yourgame/gl/conventions.h:45:30: warning: variable 'unifNameTextureDiffuse' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 45 | extern const GLchar *unifNameTextureDiffuse; | ^ /code/include/toolbox/yourgame/gl/conventions.h:46:30: warning: variable 'unifNameTextureSkyCube' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 46 | extern const GLchar *unifNameTextureSkyCube; | ^ /code/include/toolbox/yourgame/gl/conventions.h:47:30: warning: variable 'unifNameTextureSky' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 47 | extern const GLchar *unifNameTextureSky; | ^ /code/include/toolbox/yourgame/gl/conventions.h:48:30: warning: variable 'unifNameTextureBufferDepth' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 48 | extern const GLchar *unifNameTextureBufferDepth; | ^ /code/include/toolbox/yourgame/gl/conventions.h:49:30: warning: variable 'unifNameTextureBufferColor0' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 49 | extern const GLchar *unifNameTextureBufferColor0; | ^ /code/include/toolbox/yourgame/gl/conventions.h:50:30: warning: variable 'unifNameLightAmbient' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 50 | extern const GLchar *unifNameLightAmbient; | ^ /code/include/toolbox/yourgame/gl/conventions.h:51:30: warning: variable 'unifNameLightDiffuse' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 51 | extern const GLchar *unifNameLightDiffuse; | ^ /code/include/toolbox/yourgame/gl/conventions.h:52:30: warning: variable 'unifNameLightSpecular' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 52 | extern const GLchar *unifNameLightSpecular; | ^ /code/include/toolbox/yourgame/gl/conventions.h:53:30: warning: variable 'unifNameLightPosition' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 53 | extern const GLchar *unifNameLightPosition; | ^ /code/include/toolbox/yourgame/gl/conventions.h:54:30: warning: variable 'unifNameSubtexture' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 54 | extern const GLchar *unifNameSubtexture; | ^ /code/include/toolbox/yourgame/gl/lightsource.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLLIGHTSOURCE_H | ^~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_LIGHTSOURCE_H 21 | #define YOURGAME_GLLIGHTSOURCE_H | ~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_LIGHTSOURCE_H /code/include/toolbox/yourgame/gl/lightsource.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/shader.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLSHADER_H | ^~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHADER_H 21 | #define YOURGAME_GLSHADER_H | ~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHADER_H /code/include/toolbox/yourgame/gl/shader.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/lightsource.h" 24 | #include | ~~~~~~~~ | "yourgame/gl_include.h" 25 | #include | ~~~~~ | "yourgame/math/camera.h" 26 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | 27 | #include "yourgame/gl/lightsource.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 28 | #include "yourgame/math/camera.h" | ~~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/shader.h:30:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 30 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 31 | { | ~ 32 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/shader.h:34:15: warning: class 'Shader' defines a non-default destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 34 | class Shader | ^ /code/include/toolbox/yourgame/gl/shader.h:51:13: warning: constructor does not initialize these fields: m_programHandle [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 51 | Shader() {} | ^ 52 | GLuint m_programHandle; | | {} /code/include/toolbox/yourgame/math/camera.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_CAMERA_H | ^~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_CAMERA_H 21 | #define YOURGAME_CAMERA_H | ~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_CAMERA_H /code/include/toolbox/yourgame/math/camera.h:24:1: warning: #includes are not sorted properly [llvm-include-order] 24 | #include | ^ ~~~~~~~~~~~~~ | "yourgame/math.h" 25 | #include | ~~~~~~~~~~~~~ | "yourgame/math/trafo.h" 26 | #include "yourgame/math.h" | ~~~~~~~~~~~~~~~~~ | 27 | #include "yourgame/math/trafo.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/math/camera.h:29:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 29 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 30 | { | ~ 31 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/toolbox/yourgame/math/trafo.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_TRAFO_H | ^~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_TRAFO_H 21 | #define YOURGAME_TRAFO_H | ~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_TRAFO_H /code/include/toolbox/yourgame/math/trafo.h:24:1: warning: #includes are not sorted properly [llvm-include-order] 24 | #include | ^ ~~~~~~~~~~~~~ | "yourgame/math.h" 25 | #include 26 | #include "yourgame/math.h" | ~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/math/trafo.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/toolbox/yourgame/math/trafo.h:56:13: warning: function 'getAxisGlobal' should be marked [[nodiscard]] [modernize-use-nodiscard] 56 | glm::vec3 getAxisGlobal(math::Axis ax) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/math/trafo.h:57:13: warning: function 'getEye' should be marked [[nodiscard]] [modernize-use-nodiscard] 57 | glm::vec3 getEye() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/math/trafo.h:58:13: warning: function 'getRotation' should be marked [[nodiscard]] [modernize-use-nodiscard] 58 | glm::quat getRotation() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/math/trafo.h:59:13: warning: function 'getScale' should be marked [[nodiscard]] [modernize-use-nodiscard] 59 | glm::vec3 getScale() const; | ^ | [[nodiscard]] /code/src/toolbox/gl/shader.cpp:20:1: warning: #includes are not sorted properly [llvm-include-order] 20 | #include | ^ ~~~~~~~~ | "yourgame/gl/shader.h" 21 | #include "yourgame/gl/shader.h" | ~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/gl/conventions.h" 22 | #include "yourgame/gl/conventions.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | /code/src/toolbox/gl/shader.cpp:24:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 24 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 25 | { | ~ 26 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/src/toolbox/gl/shader.cpp:34:52: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 34 | glShaderSource(*handle, 1, &glsrc, NULL); | ^~~~ | nullptr /code/src/toolbox/gl/shader.cpp:34:52: warning: no header providing "NULL" is directly included [misc-include-cleaner] 20 | #include 21 | #include "yourgame/gl/shader.h" 22 | #include "yourgame/gl/conventions.h" 23 | 24 | namespace yourgame 25 | { 26 | namespace gl 27 | { 28 | namespace 29 | { 30 | int compileShader(GLenum type, const GLchar *source, GLuint *handle, std::string &errorLog) 31 | { 32 | const GLchar *glsrc = source; 33 | *handle = glCreateShader(type); 34 | glShaderSource(*handle, 1, &glsrc, NULL); | ^ /code/src/toolbox/gl/shader.cpp:37:23: warning: variable 'status' is not initialized [cppcoreguidelines-init-variables] 37 | GLint status; | ^ | = 0 /code/src/toolbox/gl/shader.cpp:41:21: warning: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays] 41 | GLchar infoLog[1024]; | ^ /code/src/toolbox/gl/shader.cpp:42:55: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 42 | glGetShaderInfoLog(*handle, 1024, NULL, infoLog); | ^~~~ | nullptr /code/src/toolbox/gl/shader.cpp:42:61: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,hicpp-no-array-decay] 42 | glGetShaderInfoLog(*handle, 1024, NULL, infoLog); | ^ /code/src/toolbox/gl/shader.cpp:43:33: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,hicpp-no-array-decay] 43 | errorLog += infoLog; | ^ /code/src/toolbox/gl/shader.cpp:52:30: warning: 3 adjacent parameters of 'make' of similar type ('const std::vector> &') are easily swapped by mistake [bugprone-easily-swappable-parameters] 52 | Shader *Shader::make(const std::vector> &shaderCodes, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 53 | const std::vector> &attrLocs, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 54 | const std::vector> &fragDataLocs, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/gl/shader.cpp:52:81: note: the first parameter in the range is 'shaderCodes' 52 | Shader *Shader::make(const std::vector> &shaderCodes, | ^~~~~~~~~~~ /code/src/toolbox/gl/shader.cpp:54:81: note: the last parameter in the range is 'fragDataLocs' 54 | const std::vector> &fragDataLocs, | ^~~~~~~~~~~~ /code/src/toolbox/gl/shader.cpp:52:41: warning: no header providing "std::vector" is directly included [misc-include-cleaner] 21 | Shader *Shader::make(const std::vector> &shaderCodes, | ^ /code/src/toolbox/gl/shader.cpp:52:53: warning: no header providing "std::pair" is directly included [misc-include-cleaner] 21 | Shader *Shader::make(const std::vector> &shaderCodes, | ^ /code/src/toolbox/gl/shader.cpp:61:24: warning: variable 'handle' is not initialized [cppcoreguidelines-init-variables] 61 | GLuint handle; | ^ | = 0 /code/src/toolbox/gl/shader.cpp:64:21: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 64 | for (const auto &shdrHandle : shdrHandles) | ^ /code/src/toolbox/gl/shader.cpp:73:13: warning: variable 'progHandle' of type 'GLuint' (aka 'unsigned int') can be declared 'const' [misc-const-correctness] 73 | GLuint progHandle = glCreateProgram(); | ^ | const /code/src/toolbox/gl/shader.cpp:75:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 75 | for (const auto &shdrHandle : shdrHandles) | ^ /code/src/toolbox/gl/shader.cpp:80:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 80 | for (const auto &attr : attrLocs) | ^ /code/src/toolbox/gl/shader.cpp:86:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 86 | for (const auto &frag : fragDataLocs) | ^ /code/src/toolbox/gl/shader.cpp:94:19: warning: variable 'linkStatus' is not initialized [cppcoreguidelines-init-variables] 94 | GLint linkStatus; | ^ | = 0 /code/src/toolbox/gl/shader.cpp:98:17: warning: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays] 98 | GLchar infoLog[1024]; | ^ /code/src/toolbox/gl/shader.cpp:99:55: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 99 | glGetProgramInfoLog(progHandle, 1024, NULL, infoLog); | ^~~~ | nullptr /code/src/toolbox/gl/shader.cpp:99:61: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,hicpp-no-array-decay] 99 | glGetProgramInfoLog(progHandle, 1024, NULL, infoLog); | ^ /code/src/toolbox/gl/shader.cpp:100:29: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,hicpp-no-array-decay] 100 | errorLog += infoLog; | ^ /code/src/toolbox/gl/shader.cpp:103:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 103 | for (const auto &shdrHandle : shdrHandles) | ^ /code/src/toolbox/gl/shader.cpp:118:23: warning: variable 'unif' is not initialized [cppcoreguidelines-init-variables] 118 | GLint unif; | ^ | = 0 /code/src/toolbox/gl/shader.cpp:158:13: warning: initializing non-owner 'Shader *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 158 | Shader *newShader = new Shader(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/gl/shader.cpp:158:13: warning: use auto when initializing with new to avoid duplicating the type name [hicpp-use-auto,modernize-use-auto] 158 | Shader *newShader = new Shader(); | ^~~~~~ | auto /code/src/toolbox/gl/shader.cpp:168:33: warning: no header providing "yourgame::gl::Lightsource" is directly included [misc-include-cleaner] 23 | void Shader::useProgram(Lightsource *lightsource, yourgame::math::Camera *camera) | ^ /code/src/toolbox/gl/shader.cpp:168:75: warning: no header providing "yourgame::math::Camera" is directly included [misc-include-cleaner] 23 | void Shader::useProgram(Lightsource *lightsource, yourgame::math::Camera *camera) | ^ /code/src/toolbox/gl/shader.cpp:172:19: warning: variable 'unif' is not initialized [cppcoreguidelines-init-variables] 172 | GLint unif; | ^ | = 0 /code/src/toolbox/gl/shader.cpp:173:17: warning: implicit conversion 'Lightsource *' -> 'bool' [readability-implicit-bool-conversion] 173 | if (lightsource) | ^ | != nullptr /code/src/toolbox/gl/shader.cpp:178:43: warning: 'data' should be used for accessing the data pointer instead of taking the address of the 0-th element [readability-container-data-pointer] 178 | glUniform3fv(unif, 1, &lightsource->ambient()[0]); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | lightsource->ambient().data() /code/src/toolbox/gl/shader.cpp:184:43: warning: 'data' should be used for accessing the data pointer instead of taking the address of the 0-th element [readability-container-data-pointer] 184 | glUniform3fv(unif, 1, &lightsource->diffuse()[0]); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | lightsource->diffuse().data() /code/src/toolbox/gl/shader.cpp:190:43: warning: 'data' should be used for accessing the data pointer instead of taking the address of the 0-th element [readability-container-data-pointer] 190 | glUniform3fv(unif, 1, &lightsource->specular()[0]); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | lightsource->specular().data() /code/src/toolbox/gl/shader.cpp:196:43: warning: 'data' should be used for accessing the data pointer instead of taking the address of the 0-th element [readability-container-data-pointer] 196 | glUniform3fv(unif, 1, &lightsource->position()[0]); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | lightsource->position().data() /code/src/toolbox/gl/shader.cpp:200:17: warning: implicit conversion 'yourgame::math::Camera *' -> 'bool' [readability-implicit-bool-conversion] 200 | if (camera) | ^ | != nullptr /code/src/toolbox/gl/shader.cpp:205:64: warning: no header providing "glm::value_ptr" is directly included [misc-include-cleaner] 22 | glUniformMatrix4fv(unif, 1, GL_FALSE, glm::value_ptr(camera->pMat() * camera->vMat())); | ^ /code/src/toolbox/gl/shader.cpp:218:13: warning: variable 'unifName' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness] 218 | std::string unifName(name); | ^ | const /code/src/toolbox/gl/shader.cpp:225:13: warning: do not use 'else' after 'return' [llvm-else-after-return,readability-else-after-return] 225 | else | ^~~~ 226 | { | ~ 227 | GLint unifLoc = glGetUniformLocation(m_programHandle, name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 228 | m_uniformLocations[unifName] = unifLoc; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 229 | return unifLoc; | ~~~~~~~~~~~~~~~ 230 | } | ~ /code/src/toolbox/gl/shader.cpp:227:17: warning: variable 'unifLoc' of type 'GLint' (aka 'int') can be declared 'const' [misc-const-correctness] 227 | GLint unifLoc = glGetUniformLocation(m_programHandle, name); | ^ note: this fix will not be applied because it overlaps with another fix /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/toolbox/gl/geometry.cpp /code/include/base/yourgame/gl_include.h:38:9: warning: header guard does not follow preferred style [llvm-header-guard] 38 | #ifndef YOURGAME_GL_INCLUDE_H | ^~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H 39 | #define YOURGAME_GL_INCLUDE_H | ~~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H /code/include/toolbox/yourgame/gl/buffer.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLBUFFER_H | ^~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_BUFFER_H 21 | #define YOURGAME_GLBUFFER_H | ~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_BUFFER_H /code/include/toolbox/yourgame/gl/buffer.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/buffer.h:29:15: warning: class 'Buffer' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 29 | class Buffer | ^ /code/include/toolbox/yourgame/gl/buffer.h:44:13: warning: constructor does not initialize these fields: m_target, m_handle, m_usage [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 44 | Buffer() {} | ^ 45 | GLenum m_target; | | {} 46 | GLuint m_handle; | | {} 47 | GLenum m_usage; | | {} /code/include/toolbox/yourgame/gl/geometry.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLGEOMETRY_H | ^~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_GEOMETRY_H 21 | #define YOURGAME_GLGEOMETRY_H | ~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_GEOMETRY_H /code/include/toolbox/yourgame/gl/geometry.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/buffer.h" 24 | #include | ~~~~~ | "yourgame/gl/shape.h" 25 | #include | ~~~~~~~~ | "yourgame/gl_include.h" 26 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | 27 | #include "yourgame/gl/buffer.h" | ~~~~~~~~~~~~~~~~~~~~~~ | 28 | #include "yourgame/gl/shape.h" | ~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/geometry.h:30:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 30 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 31 | { | ~ 32 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/geometry.h:34:15: warning: class 'Geometry' defines a non-default destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 34 | class Geometry | ^ /code/include/toolbox/yourgame/gl/shape.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLSHAPE_H | ^~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHAPE_H 21 | #define YOURGAME_GLSHAPE_H | ~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHAPE_H /code/include/toolbox/yourgame/gl/shape.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/buffer.h" 24 | #include "yourgame/gl_include.h" 25 | #include "yourgame/gl/buffer.h" | ~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/shape.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/shape.h:31:15: warning: class 'Shape' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 31 | class Shape | ^ /code/include/toolbox/yourgame/gl/shape.h:34:20: warning: accessing fields in struct 'ArrBufferDescr' is inefficient due to padding; only needs 29 bytes but is using 40 bytes [altera-struct-pack-align] 34 | struct ArrBufferDescr | ^ 35 | { 36 | GLuint index; 37 | GLint size; 38 | GLenum type; 39 | GLboolean normalized; 40 | GLsizei stride; 41 | const GLvoid *pointer; 42 | GLuint attribDivisor; 43 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/gl/shape.h:34:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'ArrBufferDescr' /code/include/toolbox/yourgame/gl/shape.h:34:20: warning: accessing fields in struct 'ArrBufferDescr' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 32 bytes [altera-struct-pack-align] 34 | struct ArrBufferDescr | ^ 35 | { 36 | GLuint index; 37 | GLint size; 38 | GLenum type; 39 | GLboolean normalized; 40 | GLsizei stride; 41 | const GLvoid *pointer; 42 | GLuint attribDivisor; 43 | }; | | __attribute__((aligned(32))) /code/include/toolbox/yourgame/gl/shape.h:34:20: note: use "__attribute__((aligned(32)))" to align struct 'ArrBufferDescr' to 32 bytes /code/include/toolbox/yourgame/gl/shape.h:45:20: warning: accessing fields in struct 'ElemArrBufferDescr' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 16 bytes [altera-struct-pack-align] 45 | struct ElemArrBufferDescr | ^ 46 | { 47 | GLenum type; 48 | GLenum drawMode; 49 | GLsizei numElements; 50 | }; | | __attribute__((aligned(16))) /code/include/toolbox/yourgame/gl/shape.h:45:20: note: use "__attribute__((aligned(16)))" to align struct 'ElemArrBufferDescr' to 16 bytes /code/include/toolbox/yourgame/gl/shape.h:68:13: warning: constructor does not initialize these fields: m_elArDescr, m_vaoHandle [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 68 | Shape() {} | ^ 69 | ElemArrBufferDescr m_elArDescr; | | {} 70 | GLuint m_vaoHandle; | | {} /code/src/toolbox/gl/geometry.cpp:22:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 22 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 23 | { | ~ 24 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/src/toolbox/gl/geometry.cpp:28:13: warning: returning a newly created resource of type 'Geometry *' or 'gsl::owner<>' from a function whose return type is not 'gsl::owner<>' [cppcoreguidelines-owning-memory] 28 | return new Geometry(); | ^~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/gl/geometry.cpp:33:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 33 | for (const auto &b : m_buffers) | ^ /code/src/toolbox/gl/geometry.cpp:35:17: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory] 35 | delete b.second; | ^ ~ /code/src/toolbox/gl/geometry.cpp:33:18: note: variable declared here 33 | for (const auto &b : m_buffers) | ^~~~~~~~~~~~~~~ /code/src/toolbox/gl/geometry.cpp:38:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 38 | for (const auto &s : m_shapes) | ^ /code/src/toolbox/gl/geometry.cpp:40:17: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory] 40 | delete s.second; | ^ ~ /code/src/toolbox/gl/geometry.cpp:38:18: note: variable declared here 38 | for (const auto &s : m_shapes) | ^~~~~~~~~~~~~~~ /code/src/toolbox/gl/geometry.cpp:44:39: warning: no header providing "std::string" is directly included [misc-include-cleaner] 21 | bool Geometry::addBuffer(std::string name, GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage) | ^ /code/src/toolbox/gl/geometry.cpp:44:46: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 44 | bool Geometry::addBuffer(std::string name, GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage) | ^ | const & /code/src/toolbox/gl/geometry.cpp:46:18: warning: implicit conversion 'size_type' (aka 'unsigned long') -> 'bool' [readability-implicit-bool-conversion] 46 | if (!m_buffers.count(name)) | ~^ | == 0u /code/src/toolbox/gl/geometry.cpp:48:17: warning: no header providing "yourgame::gl::Buffer" is directly included [misc-include-cleaner] 21 | Buffer *newBuffer = Buffer::make(target, size, data, usage); | ^ /code/src/toolbox/gl/geometry.cpp:49:21: warning: implicit conversion 'Buffer *' -> 'bool' [readability-implicit-bool-conversion] 49 | if (newBuffer) | ^ | != nullptr /code/src/toolbox/gl/geometry.cpp:51:43: warning: no header providing "std::pair" is directly included [misc-include-cleaner] 21 | m_buffers.insert(std::pair(name, newBuffer)); | ^ /code/src/toolbox/gl/geometry.cpp:59:47: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 59 | bool Geometry::bufferData(std::string name, GLsizeiptr size, const GLvoid *data) | ^ | const & /code/src/toolbox/gl/geometry.cpp:69:45: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 69 | bool Geometry::addShape(std::string name, | ^ | const & /code/src/toolbox/gl/geometry.cpp:70:38: warning: no header providing "std::vector" is directly included [misc-include-cleaner] 21 | std::vector arDescrs, | ^ /code/src/toolbox/gl/geometry.cpp:70:45: warning: no header providing "yourgame::gl::Shape" is directly included [misc-include-cleaner] 21 | std::vector arDescrs, | ^ /code/src/toolbox/gl/geometry.cpp:70:68: warning: the parameter 'arDescrs' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 70 | std::vector arDescrs, | ^ | const & /code/src/toolbox/gl/geometry.cpp:71:58: warning: the parameter 'arBufferNames' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 71 | std::vector arBufferNames, | ^ | const & /code/src/toolbox/gl/geometry.cpp:73:45: warning: the parameter 'elArBufferName' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 73 | std::string elArBufferName) | ^ | const & /code/src/toolbox/gl/geometry.cpp:80:18: warning: implicit conversion 'size_type' (aka 'unsigned long') -> 'bool' [readability-implicit-bool-conversion] 80 | if (!m_shapes.count(name)) | ~^ | == 0u /code/src/toolbox/gl/geometry.cpp:83:17: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 83 | for (const auto &arBufName : arBufferNames) | ^ /code/src/toolbox/gl/geometry.cpp:85:21: warning: 'push_back' is called inside a loop; consider pre-allocating the container capacity before the loop [performance-inefficient-vector-operation] 83 | for (const auto &arBufName : arBufferNames) 84 | { 85 | arBuffers.push_back(m_buffers[arBufName]); | ^ /code/src/toolbox/gl/geometry.cpp:89:21: warning: implicit conversion 'Shape *' -> 'bool' [readability-implicit-bool-conversion] 89 | if (newShape) | ^ | != nullptr /code/src/toolbox/gl/geometry.cpp:99:53: warning: the parameter 'shapeName' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 99 | bool Geometry::addBufferToShape(std::string shapeName, std::vector arDescrs, std::string bufferName) | ^ | const & /code/src/toolbox/gl/geometry.cpp:99:121: warning: the parameter 'bufferName' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 99 | bool Geometry::addBufferToShape(std::string shapeName, std::vector arDescrs, std::string bufferName) | ^ | const & /code/src/toolbox/gl/geometry.cpp:110:17: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 110 | for (auto i = 1; i < numArDescrs; i++) | ^ /code/src/toolbox/gl/geometry.cpp:110:34: warning: backward branch (for loop) is ID-dependent due to variable reference to 'numArDescrs' and may cause performance degradation [altera-id-dependent-backward-branch] 110 | for (auto i = 1; i < numArDescrs; i++) | ^ /code/src/toolbox/gl/geometry.cpp:105:17: note: inferred assignment of ID-dependent value from ID-dependent 105 | auto numArDescrs = arDescrs.size(); | ^ /code/src/toolbox/gl/geometry.cpp:118:54: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 118 | bool Geometry::setShapeElArDescr(std::string name, | ^ | const & /code/src/toolbox/gl/geometry.cpp:131:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 131 | for (const auto &s : m_shapes) | ^ /code/src/toolbox/gl/geometry.cpp:139:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 139 | for (const auto &s : m_shapes) | ^ /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/time.cpp /code/include/base_internal/yourgame_internal/time.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_INTERNAL_TIME_H | ^~~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_TIME_H 21 | #define YOURGAME_INTERNAL_TIME_H | ~~~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_TIME_H /code/include/base_internal/yourgame_internal/time.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace time | ~~~~~~~~~~~~~~ | namespace yourgame_internal::time 26 | { 27 | void init(); 28 | void tick(); 29 | } // namespace time | ~~~~~~~~~~~~~~~~~~~ | } // namespace yourgame_internal::time 30 | } // namespace yourgame_internal | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/time.cpp:20:1: warning: #includes are not sorted properly [llvm-include-order] 20 | #include | ^ ~~~~~~~~ | "yourgame_internal/time.h" 21 | #include "yourgame_internal/time.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~ | /code/src/time.cpp:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace time | ~~~~~~~~~~~~~~ | namespace yourgame_internal::time /code/src/time.cpp:29:20: warning: variable 'clockPeriod' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 29 | double clockPeriod = 0.0; | ^ /code/src/time.cpp:30:20: warning: variable 'deltaTimeS' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 30 | double deltaTimeS = 0.0; | ^ /code/src/time.cpp:31:51: warning: initialization of 'lastNowTime' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 31 | std::chrono::steady_clock::time_point lastNowTime; | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/chrono.h:933:12: note: possibly throwing constructor declared here 933 | constexpr time_point() : __d(duration::zero()) | ^ /code/src/time.cpp:31:51: warning: variable 'lastNowTime' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 31 | std::chrono::steady_clock::time_point lastNowTime; | ^ /code/src/time.cpp:32:51: warning: initialization of 'initTime' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 32 | std::chrono::steady_clock::time_point initTime; | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/chrono.h:933:12: note: possibly throwing constructor declared here 933 | constexpr time_point() : __d(duration::zero()) | ^ /code/src/time.cpp:32:51: warning: variable 'initTime' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 32 | std::chrono::steady_clock::time_point initTime; | ^ /code/src/time.cpp:37:27: warning: C-style casts are discouraged; use static_cast [google-readability-casting] 37 | clockPeriod = (double)std::chrono::steady_clock::period::num / | ^~~~~~~~ | static_cast( ) /code/src/time.cpp:38:27: warning: C-style casts are discouraged; use static_cast [google-readability-casting] 38 | (double)std::chrono::steady_clock::period::den; | ^~~~~~~~ | static_cast( ) /code/src/time.cpp:46:13: warning: variable 'duration' of type 'std::chrono::duration' can be declared 'const' [misc-const-correctness] 46 | std::chrono::duration duration = now - lastNowTime; | ^ | const /code/src/time.cpp:53:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 53 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 54 | { | ~ 55 | namespace time | ~~~~~~~~~~~~~~ | namespace yourgame::time /code/src/time.cpp:70:13: warning: variable 'duration' of type 'std::chrono::duration' can be declared 'const' [misc-const-correctness] 70 | std::chrono::duration duration = now - yourgame_internal::time::initTime; | ^ | const /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/input.cpp /code/include/base/yourgame/input.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_INPUT_H | ^~~~~~~~~~~~~~~~ | BASE_YOURGAME_INPUT_H 21 | #define YOURGAME_INPUT_H | ~~~~~~~~~~~~~~~~ | BASE_YOURGAME_INPUT_H /code/include/base/yourgame/input.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace input | ~~~~~~~~~~~~~~~ | namespace yourgame::input /code/include/base/yourgame/input.h:28:14: warning: enum 'Source' uses a larger base type ('unsigned int', size: 4 bytes) than necessary for its value set, consider using 'std::uint16_t' (2 bytes) as the base type to reduce its size [performance-enum-size] 28 | enum Source | ^ /code/include/base_internal/yourgame_internal/input.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_INTERNAL_INPUT_H | ^~~~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_INPUT_H 21 | #define YOURGAME_INTERNAL_INPUT_H | ~~~~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_INPUT_H /code/include/base_internal/yourgame_internal/input.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~ | "yourgame/input.h" 24 | #include "yourgame/input.h" | ~~~~~~~~~~~~~~~~~~ | /code/include/base_internal/yourgame_internal/input.h:26:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 26 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 27 | { | ~ 28 | namespace input | ~~~~~~~~~~~~~~~ | namespace yourgame_internal::input /code/include/base_internal/yourgame_internal/input.h:30:16: warning: accessing fields in struct 'InputValue' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 8 bytes [altera-struct-pack-align] 30 | struct InputValue | ^ 31 | { 32 | InputValue(float v = 0.0f) : val(v), valLast(v) {} // default ctor 33 | float val; 34 | float valLast; 35 | }; | | __attribute__((aligned(8))) /code/include/base_internal/yourgame_internal/input.h:30:16: note: use "__attribute__((aligned(8)))" to align struct 'InputValue' to 8 bytes /code/include/base_internal/yourgame_internal/input.h:32:13: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,hicpp-explicit-conversions] 32 | InputValue(float v = 0.0f) : val(v), valLast(v) {} // default ctor | ^ | explicit /code/include/base_internal/yourgame_internal/input.h:33:19: warning: member variable 'val' has public visibility [misc-non-private-member-variables-in-classes] 33 | float val; | ^ /code/include/base_internal/yourgame_internal/input.h:34:19: warning: member variable 'valLast' has public visibility [misc-non-private-member-variables-in-classes] 34 | float valLast; | ^ /code/include/base_internal/yourgame_internal/input.h:37:62: warning: variable 'inputStates' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 37 | extern std::map inputStates; | ^ /code/src/input.cpp:20:1: warning: #includes are not sorted properly [llvm-include-order] 20 | #include | ^ ~~~~~~~ | "yourgame/input.h" 21 | #include "yourgame/input.h" | ~~~~~~~~~~~~~~~~~~ | "yourgame_internal/input.h" 22 | #include "yourgame_internal/input.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | /code/src/input.cpp:24:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 24 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 25 | { | ~ 26 | namespace input | ~~~~~~~~~~~~~~~ | namespace yourgame_internal::input /code/src/input.cpp:28:9: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 28 | std::map inputStates; | ^ /code/src/input.cpp:28:14: warning: no header providing "std::map" is directly included [misc-include-cleaner] 21 | #include "yourgame/input.h" 22 | #include "yourgame_internal/input.h" 23 | 24 | namespace yourgame_internal 25 | { 26 | namespace input 27 | { 28 | std::map inputStates; | ^ /code/src/input.cpp:28:55: warning: variable 'inputStates' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 28 | std::map inputStates; | ^ /code/src/input.cpp:43:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 43 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 44 | { | ~ 45 | namespace input | ~~~~~~~~~~~~~~~ | namespace yourgame::input /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/toolbox/gl/lightsource.cpp /code/include/toolbox/yourgame/gl/lightsource.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLLIGHTSOURCE_H | ^~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_LIGHTSOURCE_H 21 | #define YOURGAME_GLLIGHTSOURCE_H | ~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_LIGHTSOURCE_H /code/include/toolbox/yourgame/gl/lightsource.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/src/toolbox/gl/lightsource.cpp:22:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 22 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 23 | { | ~ 24 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/src/toolbox/gl/lightsource.cpp:26:14: warning: no header providing "std::array" is directly included [misc-include-cleaner] 21 | 22 | namespace yourgame 23 | { 24 | namespace gl 25 | { 26 | std::array Lightsource::data() | ^ /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/toolbox/util/postproc.cpp /code/include/base/yourgame/gl_include.h:38:9: warning: header guard does not follow preferred style [llvm-header-guard] 38 | #ifndef YOURGAME_GL_INCLUDE_H | ^~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H 39 | #define YOURGAME_GL_INCLUDE_H | ~~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H /code/include/base/yourgame/input.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_INPUT_H | ^~~~~~~~~~~~~~~~ | BASE_YOURGAME_INPUT_H 21 | #define YOURGAME_INPUT_H | ~~~~~~~~~~~~~~~~ | BASE_YOURGAME_INPUT_H /code/include/base/yourgame/input.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace input | ~~~~~~~~~~~~~~~ | namespace yourgame::input /code/include/base/yourgame/input.h:28:14: warning: enum 'Source' uses a larger base type ('unsigned int', size: 4 bytes) than necessary for its value set, consider using 'std::uint16_t' (2 bytes) as the base type to reduce its size [performance-enum-size] 28 | enum Source | ^ /code/include/base/yourgame/math.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_MATH_H | ^~~~~~~~~~~~~~~ | BASE_YOURGAME_MATH_H 21 | #define YOURGAME_MATH_H | ~~~~~~~~~~~~~~~ | BASE_YOURGAME_MATH_H /code/include/base/yourgame/math.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/base/yourgame/math.h:27:20: warning: enum 'Projection' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 27 | enum class Projection | ^ /code/include/base/yourgame/math.h:33:20: warning: enum 'Axis' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 33 | enum class Axis | ^ /code/include/base_internal/yourgame_internal/input.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_INTERNAL_INPUT_H | ^~~~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_INPUT_H 21 | #define YOURGAME_INTERNAL_INPUT_H | ~~~~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_INPUT_H /code/include/base_internal/yourgame_internal/input.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~ | "yourgame/input.h" 24 | #include "yourgame/input.h" | ~~~~~~~~~~~~~~~~~~ | /code/include/base_internal/yourgame_internal/input.h:26:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 26 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 27 | { | ~ 28 | namespace input | ~~~~~~~~~~~~~~~ | namespace yourgame_internal::input /code/include/base_internal/yourgame_internal/input.h:30:16: warning: accessing fields in struct 'InputValue' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 8 bytes [altera-struct-pack-align] 30 | struct InputValue | ^ 31 | { 32 | InputValue(float v = 0.0f) : val(v), valLast(v) {} // default ctor 33 | float val; 34 | float valLast; 35 | }; | | __attribute__((aligned(8))) /code/include/base_internal/yourgame_internal/input.h:30:16: note: use "__attribute__((aligned(8)))" to align struct 'InputValue' to 8 bytes /code/include/base_internal/yourgame_internal/input.h:32:13: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,hicpp-explicit-conversions] 32 | InputValue(float v = 0.0f) : val(v), valLast(v) {} // default ctor | ^ | explicit /code/include/base_internal/yourgame_internal/input.h:33:19: warning: member variable 'val' has public visibility [misc-non-private-member-variables-in-classes] 33 | float val; | ^ /code/include/base_internal/yourgame_internal/input.h:34:19: warning: member variable 'valLast' has public visibility [misc-non-private-member-variables-in-classes] 34 | float valLast; | ^ /code/include/base_internal/yourgame_internal/input.h:37:62: warning: variable 'inputStates' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 37 | extern std::map inputStates; | ^ /code/include/toolbox/yourgame/gl/buffer.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLBUFFER_H | ^~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_BUFFER_H 21 | #define YOURGAME_GLBUFFER_H | ~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_BUFFER_H /code/include/toolbox/yourgame/gl/buffer.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/buffer.h:29:15: warning: class 'Buffer' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 29 | class Buffer | ^ /code/include/toolbox/yourgame/gl/buffer.h:44:13: warning: constructor does not initialize these fields: m_target, m_handle, m_usage [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 44 | Buffer() {} | ^ 45 | GLenum m_target; | | {} 46 | GLuint m_handle; | | {} 47 | GLenum m_usage; | | {} /code/include/toolbox/yourgame/gl/conventions.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLCONVENTIONS_H | ^~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_CONVENTIONS_H 21 | #define YOURGAME_GLCONVENTIONS_H | ~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_CONVENTIONS_H /code/include/toolbox/yourgame/gl/conventions.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/conventions.h:38:30: warning: variable 'unifNameMvpMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 38 | extern const GLchar *unifNameMvpMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:39:30: warning: variable 'unifNameVpMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 39 | extern const GLchar *unifNameVpMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:40:30: warning: variable 'unifNameModelMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 40 | extern const GLchar *unifNameModelMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:41:30: warning: variable 'unifNameNormalMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 41 | extern const GLchar *unifNameNormalMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:42:30: warning: variable 'unifNameCameraPosition' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 42 | extern const GLchar *unifNameCameraPosition; | ^ /code/include/toolbox/yourgame/gl/conventions.h:43:30: warning: variable 'unifNameCameraTrafo' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 43 | extern const GLchar *unifNameCameraTrafo; | ^ /code/include/toolbox/yourgame/gl/conventions.h:44:30: warning: variable 'unifNameSkyRotationInv' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 44 | extern const GLchar *unifNameSkyRotationInv; | ^ /code/include/toolbox/yourgame/gl/conventions.h:45:30: warning: variable 'unifNameTextureDiffuse' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 45 | extern const GLchar *unifNameTextureDiffuse; | ^ /code/include/toolbox/yourgame/gl/conventions.h:46:30: warning: variable 'unifNameTextureSkyCube' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 46 | extern const GLchar *unifNameTextureSkyCube; | ^ /code/include/toolbox/yourgame/gl/conventions.h:47:30: warning: variable 'unifNameTextureSky' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 47 | extern const GLchar *unifNameTextureSky; | ^ /code/include/toolbox/yourgame/gl/conventions.h:48:30: warning: variable 'unifNameTextureBufferDepth' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 48 | extern const GLchar *unifNameTextureBufferDepth; | ^ /code/include/toolbox/yourgame/gl/conventions.h:49:30: warning: variable 'unifNameTextureBufferColor0' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 49 | extern const GLchar *unifNameTextureBufferColor0; | ^ /code/include/toolbox/yourgame/gl/conventions.h:50:30: warning: variable 'unifNameLightAmbient' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 50 | extern const GLchar *unifNameLightAmbient; | ^ /code/include/toolbox/yourgame/gl/conventions.h:51:30: warning: variable 'unifNameLightDiffuse' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 51 | extern const GLchar *unifNameLightDiffuse; | ^ /code/include/toolbox/yourgame/gl/conventions.h:52:30: warning: variable 'unifNameLightSpecular' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 52 | extern const GLchar *unifNameLightSpecular; | ^ /code/include/toolbox/yourgame/gl/conventions.h:53:30: warning: variable 'unifNameLightPosition' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 53 | extern const GLchar *unifNameLightPosition; | ^ /code/include/toolbox/yourgame/gl/conventions.h:54:30: warning: variable 'unifNameSubtexture' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 54 | extern const GLchar *unifNameSubtexture; | ^ /code/include/toolbox/yourgame/gl/drawing.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLDRAWING_H | ^~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_DRAWING_H 21 | #define YOURGAME_GLDRAWING_H | ~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_DRAWING_H /code/include/toolbox/yourgame/gl/drawing.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~ | "yourgame/gl/geometry.h" 24 | #include | ~~~~~~~~ | "yourgame/gl/shader.h" 25 | #include "yourgame/math/camera.h" | ~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/gl/texture.h" 26 | #include "yourgame/math/trafo.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/math/camera.h" 27 | #include "yourgame/gl/geometry.h" | ~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/math/trafo.h" 28 | #include "yourgame/gl/shader.h" | ~~~~~~~~~~~~~~~~~~~~~~ | 29 | #include "yourgame/gl/texture.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/drawing.h:31:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 31 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 32 | { | ~ 33 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/drawing.h:35:16: warning: accessing fields in struct 'DrawConfig' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 128 bytes [altera-struct-pack-align] 35 | struct DrawConfig | ^ 36 | { 37 | yourgame::gl::Shader *shader = nullptr; 38 | yourgame::math::Camera *camera = nullptr; 39 | glm::mat4 modelMat = glm::mat4(1); 40 | std::vector textures = {}; 41 | std::array subtex = {0.0f, 1.0f, 0.0f, 1.0f}; 42 | GLsizei instancecount = 1; 43 | }; | | __attribute__((aligned(128))) /code/include/toolbox/yourgame/gl/drawing.h:35:16: note: use "__attribute__((aligned(128)))" to align struct 'DrawConfig' to 128 bytes /code/include/toolbox/yourgame/gl/drawing.h:40:59: warning: initializer for member 'textures' is redundant [readability-redundant-member-init] 40 | std::vector textures = {}; | ^~~~ /code/include/toolbox/yourgame/gl/framebuffer.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLFRAMEBUFFER_H | ^~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_FRAMEBUFFER_H 21 | #define YOURGAME_GLFRAMEBUFFER_H | ~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_FRAMEBUFFER_H /code/include/toolbox/yourgame/gl/framebuffer.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/texture.h" 24 | #include "yourgame/gl_include.h" 25 | #include "yourgame/gl/texture.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/framebuffer.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/framebuffer.h:31:15: warning: class 'Framebuffer' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 31 | class Framebuffer | ^ /code/include/toolbox/yourgame/gl/framebuffer.h:34:20: warning: accessing fields in struct 'TextureAttachDescr' is inefficient due to padding; only needs 44 bytes but is using 48 bytes [altera-struct-pack-align] 34 | struct TextureAttachDescr | ^ 35 | { 36 | GLint internalformat; 37 | GLenum format; 38 | GLenum type; 39 | GLenum unit; 40 | std::vector> parameteri; 41 | GLenum attachment; 42 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/gl/framebuffer.h:34:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'TextureAttachDescr' /code/include/toolbox/yourgame/gl/framebuffer.h:34:20: warning: accessing fields in struct 'TextureAttachDescr' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 64 bytes [altera-struct-pack-align] 34 | struct TextureAttachDescr | ^ 35 | { 36 | GLint internalformat; 37 | GLenum format; 38 | GLenum type; 39 | GLenum unit; 40 | std::vector> parameteri; 41 | GLenum attachment; 42 | }; | | __attribute__((aligned(64))) /code/include/toolbox/yourgame/gl/framebuffer.h:34:20: note: use "__attribute__((aligned(64)))" to align struct 'TextureAttachDescr' to 64 bytes /code/include/toolbox/yourgame/gl/framebuffer.h:59:13: warning: constructor does not initialize these fields: m_handle [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 59 | Framebuffer() {} | ^ 60 | GLuint m_handle; | | {} /code/include/toolbox/yourgame/gl/geometry.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLGEOMETRY_H | ^~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_GEOMETRY_H 21 | #define YOURGAME_GLGEOMETRY_H | ~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_GEOMETRY_H /code/include/toolbox/yourgame/gl/geometry.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/buffer.h" 24 | #include | ~~~~~ | "yourgame/gl/shape.h" 25 | #include | ~~~~~~~~ | "yourgame/gl_include.h" 26 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | 27 | #include "yourgame/gl/buffer.h" | ~~~~~~~~~~~~~~~~~~~~~~ | 28 | #include "yourgame/gl/shape.h" | ~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/geometry.h:30:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 30 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 31 | { | ~ 32 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/geometry.h:34:15: warning: class 'Geometry' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 34 | class Geometry | ^ /code/include/toolbox/yourgame/gl/lightsource.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLLIGHTSOURCE_H | ^~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_LIGHTSOURCE_H 21 | #define YOURGAME_GLLIGHTSOURCE_H | ~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_LIGHTSOURCE_H /code/include/toolbox/yourgame/gl/lightsource.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/shader.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLSHADER_H | ^~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHADER_H 21 | #define YOURGAME_GLSHADER_H | ~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHADER_H /code/include/toolbox/yourgame/gl/shader.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/lightsource.h" 24 | #include | ~~~~~~~~ | "yourgame/gl_include.h" 25 | #include | ~~~~~ | "yourgame/math/camera.h" 26 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | 27 | #include "yourgame/gl/lightsource.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 28 | #include "yourgame/math/camera.h" | ~~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/shader.h:30:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 30 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 31 | { | ~ 32 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/shader.h:34:15: warning: class 'Shader' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 34 | class Shader | ^ /code/include/toolbox/yourgame/gl/shader.h:51:13: warning: constructor does not initialize these fields: m_programHandle [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 51 | Shader() {} | ^ 52 | GLuint m_programHandle; | | {} /code/include/toolbox/yourgame/gl/shape.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLSHAPE_H | ^~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHAPE_H 21 | #define YOURGAME_GLSHAPE_H | ~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHAPE_H /code/include/toolbox/yourgame/gl/shape.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/buffer.h" 24 | #include "yourgame/gl_include.h" 25 | #include "yourgame/gl/buffer.h" | ~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/shape.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/shape.h:31:15: warning: class 'Shape' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 31 | class Shape | ^ /code/include/toolbox/yourgame/gl/shape.h:34:20: warning: accessing fields in struct 'ArrBufferDescr' is inefficient due to padding; only needs 29 bytes but is using 40 bytes [altera-struct-pack-align] 34 | struct ArrBufferDescr | ^ 35 | { 36 | GLuint index; 37 | GLint size; 38 | GLenum type; 39 | GLboolean normalized; 40 | GLsizei stride; 41 | const GLvoid *pointer; 42 | GLuint attribDivisor; 43 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/gl/shape.h:34:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'ArrBufferDescr' /code/include/toolbox/yourgame/gl/shape.h:34:20: warning: accessing fields in struct 'ArrBufferDescr' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 32 bytes [altera-struct-pack-align] 34 | struct ArrBufferDescr | ^ 35 | { 36 | GLuint index; 37 | GLint size; 38 | GLenum type; 39 | GLboolean normalized; 40 | GLsizei stride; 41 | const GLvoid *pointer; 42 | GLuint attribDivisor; 43 | }; | | __attribute__((aligned(32))) /code/include/toolbox/yourgame/gl/shape.h:34:20: note: use "__attribute__((aligned(32)))" to align struct 'ArrBufferDescr' to 32 bytes /code/include/toolbox/yourgame/gl/shape.h:45:20: warning: accessing fields in struct 'ElemArrBufferDescr' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 16 bytes [altera-struct-pack-align] 45 | struct ElemArrBufferDescr | ^ 46 | { 47 | GLenum type; 48 | GLenum drawMode; 49 | GLsizei numElements; 50 | }; | | __attribute__((aligned(16))) /code/include/toolbox/yourgame/gl/shape.h:45:20: note: use "__attribute__((aligned(16)))" to align struct 'ElemArrBufferDescr' to 16 bytes /code/include/toolbox/yourgame/gl/shape.h:68:13: warning: constructor does not initialize these fields: m_elArDescr, m_vaoHandle [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 68 | Shape() {} | ^ 69 | ElemArrBufferDescr m_elArDescr; | | {} 70 | GLuint m_vaoHandle; | | {} /code/include/toolbox/yourgame/gl/texture.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLTEXTURE_H | ^~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_TEXTURE_H 21 | #define YOURGAME_GLTEXTURE_H | ~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_TEXTURE_H /code/include/toolbox/yourgame/gl/texture.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~ | "yourgame/gl_include.h" 24 | #include | ~~~~~~~~ | 25 | #include | ~~~~~~~~ | 26 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/texture.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/texture.h:32:16: warning: accessing fields in struct 'TextureCoords' is inefficient due to padding; only needs 41 bytes but is using 44 bytes [altera-struct-pack-align] 32 | struct TextureCoords | ^ /code/include/toolbox/yourgame/gl/texture.h:32:16: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'TextureCoords' /code/include/toolbox/yourgame/gl/texture.h:32:16: warning: accessing fields in struct 'TextureCoords' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 64 bytes [altera-struct-pack-align] 32 | struct TextureCoords | ^ /code/include/toolbox/yourgame/gl/texture.h:32:16: note: use "__attribute__((aligned(64)))" to align struct 'TextureCoords' to 64 bytes /code/include/toolbox/yourgame/gl/texture.h:35:13: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default,modernize-use-equals-default] 35 | TextureCoords() {} | ^ ~~ | = default; /code/include/toolbox/yourgame/gl/texture.h:37:27: warning: 2 adjacent parameters of 'TextureCoords' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters] 37 | TextureCoords(int x, int y, int width, int height, int texWidth, int texHeight, bool cwRot) | ^~~~~~~~~~~~ /code/include/toolbox/yourgame/gl/texture.h:37:31: note: the first parameter in the range is 'x' 37 | TextureCoords(int x, int y, int width, int height, int texWidth, int texHeight, bool cwRot) | ^ /code/include/toolbox/yourgame/gl/texture.h:37:38: note: the last parameter in the range is 'y' 37 | TextureCoords(int x, int y, int width, int height, int texWidth, int texHeight, bool cwRot) | ^ /code/include/toolbox/yourgame/gl/texture.h:55:19: warning: member variable 'uMin' has public visibility [misc-non-private-member-variables-in-classes] 55 | float uMin = 0.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:56:19: warning: member variable 'uMax' has public visibility [misc-non-private-member-variables-in-classes] 56 | float uMax = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:57:19: warning: member variable 'vMin' has public visibility [misc-non-private-member-variables-in-classes] 57 | float vMin = 0.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:58:19: warning: member variable 'vMax' has public visibility [misc-non-private-member-variables-in-classes] 58 | float vMax = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:59:17: warning: member variable 'xMinPixel' has public visibility [misc-non-private-member-variables-in-classes] 59 | int xMinPixel = 0; | ^ /code/include/toolbox/yourgame/gl/texture.h:60:17: warning: member variable 'xMaxPixel' has public visibility [misc-non-private-member-variables-in-classes] 60 | int xMaxPixel = 1; | ^ /code/include/toolbox/yourgame/gl/texture.h:61:17: warning: member variable 'yMinPixel' has public visibility [misc-non-private-member-variables-in-classes] 61 | int yMinPixel = 0; | ^ /code/include/toolbox/yourgame/gl/texture.h:62:17: warning: member variable 'yMaxPixel' has public visibility [misc-non-private-member-variables-in-classes] 62 | int yMaxPixel = 1; | ^ /code/include/toolbox/yourgame/gl/texture.h:63:19: warning: member variable 'aspectRatioPixel' has public visibility [misc-non-private-member-variables-in-classes] 63 | float aspectRatioPixel = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:64:19: warning: member variable 'aspectRatioPixelInverse' has public visibility [misc-non-private-member-variables-in-classes] 64 | float aspectRatioPixelInverse = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:65:18: warning: member variable 'cwRotated' has public visibility [misc-non-private-member-variables-in-classes] 65 | bool cwRotated = false; | ^ /code/include/toolbox/yourgame/gl/texture.h:68:15: warning: class 'Texture' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 68 | class Texture | ^ /code/include/toolbox/yourgame/gl/texture.h:95:13: warning: function 'handle' should be marked [[nodiscard]] [modernize-use-nodiscard] 95 | GLuint handle() const { return m_handle; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:96:13: warning: function 'getTarget' should be marked [[nodiscard]] [modernize-use-nodiscard] 96 | GLenum getTarget() const { return m_target; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:97:13: warning: function 'getWidth' should be marked [[nodiscard]] [modernize-use-nodiscard] 97 | GLsizei getWidth() const { return m_width; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:98:13: warning: function 'getHeight' should be marked [[nodiscard]] [modernize-use-nodiscard] 98 | GLsizei getHeight() const { return m_height; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:107:13: warning: function 'getCoords' should be marked [[nodiscard]] [modernize-use-nodiscard] 107 | TextureCoords getCoords(std::string name) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:122:13: warning: function 'getNumFrames' should be marked [[nodiscard]] [modernize-use-nodiscard] 122 | int getNumFrames(std::string sequenceName) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:127:13: warning: function 'getSequenceNames' should be marked [[nodiscard]] [modernize-use-nodiscard] 127 | std::vector getSequenceNames() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:136:13: warning: function 'getGridCoords' should be marked [[nodiscard]] [modernize-use-nodiscard] 136 | TextureCoords getGridCoords(int gridWidth, int gridHeight, int index) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:139:13: warning: constructor does not initialize these fields: m_handle, m_target, m_unit, m_width, m_height [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 139 | Texture() {} | ^ 140 | GLuint m_handle; | | {} 141 | GLenum m_target; | | {} 142 | GLenum m_unit; | | {} 143 | GLsizei m_width; | | {} 144 | GLsizei m_height; | | {} /code/include/toolbox/yourgame/gl/texture.h:146:20: warning: accessing fields in struct 'Sequence' is inefficient due to padding; only needs 73 bytes but is using 80 bytes [altera-struct-pack-align] 146 | struct Sequence | ^ 147 | { 148 | std::map frames; 149 | bool framesInvalidated; 150 | std::vector framesConsec; /**< \brief consecutive representation of the frame coordinates */ 151 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/gl/texture.h:146:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'Sequence' /code/include/toolbox/yourgame/gl/texture.h:146:20: warning: accessing fields in struct 'Sequence' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 128 bytes [altera-struct-pack-align] 146 | struct Sequence | ^ 147 | { 148 | std::map frames; 149 | bool framesInvalidated; 150 | std::vector framesConsec; /**< \brief consecutive representation of the frame coordinates */ 151 | }; | | __attribute__((aligned(128))) /code/include/toolbox/yourgame/gl/texture.h:146:20: note: use "__attribute__((aligned(128)))" to align struct 'Sequence' to 128 bytes /code/include/toolbox/yourgame/math/camera.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_CAMERA_H | ^~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_CAMERA_H 21 | #define YOURGAME_CAMERA_H | ~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_CAMERA_H /code/include/toolbox/yourgame/math/camera.h:24:1: warning: #includes are not sorted properly [llvm-include-order] 24 | #include | ^ ~~~~~~~~~~~~~ | "yourgame/math.h" 25 | #include | ~~~~~~~~~~~~~ | "yourgame/math/trafo.h" 26 | #include "yourgame/math.h" | ~~~~~~~~~~~~~~~~~ | 27 | #include "yourgame/math/trafo.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/math/camera.h:29:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 29 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 30 | { | ~ 31 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/toolbox/yourgame/math/trafo.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_TRAFO_H | ^~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_TRAFO_H 21 | #define YOURGAME_TRAFO_H | ~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_TRAFO_H /code/include/toolbox/yourgame/math/trafo.h:24:1: warning: #includes are not sorted properly [llvm-include-order] 24 | #include | ^ ~~~~~~~~~~~~~ | "yourgame/math.h" 25 | #include 26 | #include "yourgame/math.h" | ~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/math/trafo.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/toolbox/yourgame/math/trafo.h:56:13: warning: function 'getAxisGlobal' should be marked [[nodiscard]] [modernize-use-nodiscard] 56 | glm::vec3 getAxisGlobal(math::Axis ax) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/math/trafo.h:57:13: warning: function 'getEye' should be marked [[nodiscard]] [modernize-use-nodiscard] 57 | glm::vec3 getEye() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/math/trafo.h:58:13: warning: function 'getRotation' should be marked [[nodiscard]] [modernize-use-nodiscard] 58 | glm::quat getRotation() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/math/trafo.h:59:13: warning: function 'getScale' should be marked [[nodiscard]] [modernize-use-nodiscard] 59 | glm::vec3 getScale() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/assetmanager.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_ASSETMANAGER_H | ^~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_ASSETMANAGER_H 21 | #define YOURGAME_ASSETMANAGER_H | ~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_ASSETMANAGER_H /code/include/toolbox/yourgame/util/assetmanager.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~~~~~ | // std::uintptr_t 24 | #include // std::uintptr_t | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 25 | #include | ~~~~~~~~~~ | 26 | #include | ~~~~~ | 27 | #include | ~~~~~~~~ | /code/include/toolbox/yourgame/util/assetmanager.h:29:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 29 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 30 | { | ~ 31 | namespace util | ~~~~~~~~~~~~~~ | namespace yourgame::util /code/include/toolbox/yourgame/util/assetmanager.h:46:15: warning: class 'AssetManager' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 46 | class AssetManager | ^ /code/include/toolbox/yourgame/util/assetmanager.h:63:37: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 63 | bool insert(std::string name, T *obj) | ^ /code/include/toolbox/yourgame/util/assetmanager.h:76:23: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory] 76 | { delete reinterpret_cast(ptr); }; | ^ ~~~ /code/include/toolbox/yourgame/util/assetmanager.h:75:28: note: variable declared here 75 | [](std::uintptr_t ptr) | ^~~~~~~~~~~~~~~~~~ /code/include/toolbox/yourgame/util/assetmanager.h:76:30: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast] 76 | { delete reinterpret_cast(ptr); }; | ^ /code/include/toolbox/yourgame/util/assetmanager.h:85:58: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast] 85 | m_ptrMaps[typeid(T).hash_code()][name] = reinterpret_cast(obj); | ^ /code/include/toolbox/yourgame/util/assetmanager.h:98:37: warning: parameter 'name' is unused [misc-unused-parameters] 98 | void insert(std::string name, T obj) | ^~~~ | /*name*/ /code/include/toolbox/yourgame/util/assetmanager.h:98:37: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] /code/include/toolbox/yourgame/util/assetmanager.h:98:45: warning: parameter 'obj' is unused [misc-unused-parameters] 98 | void insert(std::string name, T obj) | ^~~ | /*obj*/ /code/include/toolbox/yourgame/util/assetmanager.h:111:32: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 111 | T *get(std::string name) | ^ /code/include/toolbox/yourgame/util/assetmanager.h:119:32: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast] 119 | return reinterpret_cast(itT->second); | ^ /code/include/toolbox/yourgame/util/assetmanager.h:119:32: warning: integer to pointer cast pessimizes optimization opportunities [performance-no-int-to-ptr] /code/include/toolbox/yourgame/util/assetmanager.h:149:38: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 149 | void destroy(std::string name) | ^ /code/include/toolbox/yourgame/util/assetmanager.h:174:21: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 174 | for (const auto &ptr : itMap->second) | ^ /code/include/toolbox/yourgame/util/assetmanager.h:189:21: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 189 | for (const auto &ptr : map.second) | ^ /code/include/toolbox_internal/yourgame_internal/util/assets.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_INTERNAL_ASSETS_H | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_INTERNAL_YOURGAME_INTERNAL_UTIL_ASSETS_H 21 | #define YOURGAME_INTERNAL_ASSETS_H | ~~~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_INTERNAL_YOURGAME_INTERNAL_UTIL_ASSETS_H /code/include/toolbox_internal/yourgame_internal/util/assets.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace util | ~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace assets | ~~~~~~~~~~~~~~~~ | namespace yourgame_internal::util::assets 30 | { 31 | extern yourgame::util::AssetManager manager; 32 | bool loadStockAssets(); 33 | void clearStockAssets(); 34 | } // namespace assets | ~~~~~~~~~~~~~~~~~~~~~ | } // namespace yourgame_internal::util::assets 35 | } // namespace util | ~~~~~~~~~~~~~~~~~~~ 36 | } // namespace yourgame_internal | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/include/toolbox_internal/yourgame_internal/util/assets.h:31:49: warning: variable 'manager' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 31 | extern yourgame::util::AssetManager manager; | ^ /code/src/toolbox/util/postproc.cpp:20:1: warning: #includes are not sorted properly [llvm-include-order] 20 | #include | ^ ~~~~~~~~~~ | "yourgame/input.h" 21 | #include "yourgame/input.h" | ~~~~~~~~~~~~~~~~~~ | "yourgame/gl/conventions.h" 22 | #include "yourgame/gl/conventions.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/gl/drawing.h" 23 | #include "yourgame/gl/drawing.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/gl/framebuffer.h" 24 | #include "yourgame/gl/framebuffer.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/gl/shader.h" 25 | #include "yourgame/gl/shader.h" | ~~~~~~~~~~~~~~~~~~~~~~ | "yourgame_internal/input.h" 26 | #include "yourgame_internal/input.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame_internal/util/assets.h" 27 | #include "yourgame_internal/util/assets.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | /code/src/toolbox/util/postproc.cpp:20:10: warning: inclusion of deprecated C++ header 'stdint.h'; consider using 'cstdint' instead [hicpp-deprecated-headers,modernize-deprecated-headers] 20 | #include | ^ note: this fix will not be applied because it overlaps with another fix /code/src/toolbox/util/postproc.cpp:31:32: warning: variable 'g_framebuf' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 31 | yourgame::gl::Framebuffer *g_framebuf = nullptr; | ^ /code/src/toolbox/util/postproc.cpp:31:32: warning: variable 'g_framebuf' provides global access to a non-const object; consider making the pointed-to data 'const' [cppcoreguidelines-avoid-non-const-global-variables] /code/src/toolbox/util/postproc.cpp:32:27: warning: variable 'g_postprocShader' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 32 | yourgame::gl::Shader *g_postprocShader = nullptr; | ^ /code/src/toolbox/util/postproc.cpp:32:27: warning: variable 'g_postprocShader' provides global access to a non-const object; consider making the pointed-to data 'const' [cppcoreguidelines-avoid-non-const-global-variables] /code/src/toolbox/util/postproc.cpp:33:14: warning: variable 'g_framebufWidth' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 33 | uint32_t g_framebufWidth = 0; | ^ /code/src/toolbox/util/postproc.cpp:34:14: warning: variable 'g_framebufHeight' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 34 | uint32_t g_framebufHeight = 0; | ^ /code/src/toolbox/util/postproc.cpp:35:14: warning: variable 'g_framebufWidthActual' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 35 | uint32_t g_framebufWidthActual = 0; | ^ /code/src/toolbox/util/postproc.cpp:36:14: warning: variable 'g_framebufHeightActual' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 36 | uint32_t g_framebufHeightActual = 0; | ^ /code/src/toolbox/util/postproc.cpp:97:32: warning: narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'GLsizei' (aka 'int') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 97 | g_framebuf->resize(g_framebufWidthActual, g_framebufHeightActual); | ^ /code/src/toolbox/util/postproc.cpp:97:55: warning: narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'GLsizei' (aka 'int') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 97 | g_framebuf->resize(g_framebufWidthActual, g_framebufHeightActual); | ^ /code/src/toolbox/util/postproc.cpp:104:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 104 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 105 | { | ~ 106 | namespace util | ~~~~~~~~~~~~~~ 107 | { | ~ 108 | namespace postproc | ~~~~~~~~~~~~~~~~~~ | namespace yourgame_internal::util::postproc /code/src/toolbox/util/postproc.cpp:112:22: warning: implicit conversion 'yourgame::gl::Framebuffer *' -> 'bool' [readability-implicit-bool-conversion] 112 | if (!g_framebuf) | ~^ | == nullptr /code/src/toolbox/util/postproc.cpp:131:22: warning: implicit conversion 'yourgame::gl::Framebuffer *' -> 'bool' [readability-implicit-bool-conversion] 131 | if (!g_framebuf) | ~^ | == nullptr /code/src/toolbox/util/postproc.cpp:151:21: warning: variable 'aspectFramebuf' of type 'float' can be declared 'const' [misc-const-correctness] 151 | float aspectFramebuf = (float)g_framebufWidthActual / (float)g_framebufHeightActual; | ^ | const /code/src/toolbox/util/postproc.cpp:151:44: warning: C-style casts are discouraged; use static_cast [google-readability-casting] 151 | float aspectFramebuf = (float)g_framebufWidthActual / (float)g_framebufHeightActual; | ^~~~~~~ | static_cast( ) /code/src/toolbox/util/postproc.cpp:151:75: warning: C-style casts are discouraged; use static_cast [google-readability-casting] 151 | float aspectFramebuf = (float)g_framebufWidthActual / (float)g_framebufHeightActual; | ^~~~~~~ | static_cast( ) /code/src/toolbox/util/postproc.cpp:155:25: warning: variable 'viewWidth' of type 'float' can be declared 'const' [misc-const-correctness] 155 | float viewWidth = (yourgame::input::get(yourgame::input::WINDOW_HEIGHT) * aspectFramebuf); | ^ | const /code/src/toolbox/util/postproc.cpp:157:29: warning: C-style casts are discouraged; use static_cast [google-readability-casting] 157 | (GLint)((yourgame::input::get(yourgame::input::WINDOW_WIDTH) - viewWidth) * 0.5f), | ^~~~~~~ | static_cast /code/src/toolbox/util/postproc.cpp:159:29: warning: C-style casts are discouraged; use static_cast [google-readability-casting] 159 | (GLsizei)viewWidth, | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/util/postproc.cpp:160:29: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 160 | (GLsizei)yourgame::input::geti(yourgame::input::WINDOW_HEIGHT)); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/util/postproc.cpp:164:25: warning: variable 'viewHeight' of type 'float' can be declared 'const' [misc-const-correctness] 164 | float viewHeight = (yourgame::input::get(yourgame::input::WINDOW_WIDTH) / aspectFramebuf); | ^ | const /code/src/toolbox/util/postproc.cpp:167:29: warning: C-style casts are discouraged; use static_cast [google-readability-casting] 167 | (GLint)((yourgame::input::get(yourgame::input::WINDOW_HEIGHT) - viewHeight) * 0.5f), | ^~~~~~~ | static_cast /code/src/toolbox/util/postproc.cpp:168:29: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 168 | (GLsizei)yourgame::input::geti(yourgame::input::WINDOW_WIDTH), | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/util/postproc.cpp:169:29: warning: C-style casts are discouraged; use static_cast [google-readability-casting] 169 | (GLsizei)viewHeight); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/util/postproc.cpp:176:21: warning: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays] 176 | GLfloat clearColorOrg[4]; | ^ /code/src/toolbox/util/postproc.cpp:177:55: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,hicpp-no-array-decay] 177 | glGetFloatv(GL_COLOR_CLEAR_VALUE, clearColorOrg); | ^ /code/src/toolbox/util/postproc.cpp:181:29: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] 181 | glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); | ^ ~ /code/thirdparty/glad-gl3.3-core/include/glad/glad.h:138:29: note: expanded from macro 'GL_COLOR_BUFFER_BIT' 138 | #define GL_COLOR_BUFFER_BIT 0x00004000 | ^~~~~~~~~~ /code/src/toolbox/util/postproc.cpp:190:38: warning: no header providing "glm::ortho" is directly included [misc-include-cleaner] 21 | auto pMat = glm::ortho(-1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f); | ^ /code/src/toolbox/util/postproc.cpp:193:21: warning: use auto when initializing with a template cast to avoid duplicating the type name [hicpp-use-auto,modernize-use-auto] 193 | yourgame::gl::Shader *shader = | ^~~~~~~~~~~~~~~~~~~~ | auto /code/src/toolbox/util/postproc.cpp:195:25: warning: implicit conversion 'yourgame::gl::Shader *' -> 'bool' [readability-implicit-bool-conversion] 195 | if (g_postprocShader) | ^ | != nullptr /code/src/toolbox/util/postproc.cpp:209:102: warning: no header providing "yourgame::gl::Geometry" is directly included [misc-include-cleaner] 21 | yourgame::gl::drawGeo(yourgame_internal::util::assets::manager.get("geoQuad"), cfg); | ^ /code/src/toolbox/util/postproc.cpp:216:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 216 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 217 | { | ~ 218 | namespace util | ~~~~~~~~~~~~~~ 219 | { | ~ 220 | namespace postproc | ~~~~~~~~~~~~~~~~~~ | namespace yourgame::util::postproc /code/src/toolbox/util/postproc.cpp:222:25: warning: 2 adjacent parameters of 'resize' of similar type ('uint32_t') are easily swapped by mistake [bugprone-easily-swappable-parameters] 222 | void resize(uint32_t width, uint32_t height) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/util/postproc.cpp:222:34: note: the first parameter in the range is 'width' 222 | void resize(uint32_t width, uint32_t height) | ^~~~~ /code/src/toolbox/util/postproc.cpp:222:50: note: the last parameter in the range is 'height' 222 | void resize(uint32_t width, uint32_t height) | ^~~~~~ /code/src/toolbox/util/postproc.cpp:234:21: warning: narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'GLsizei' (aka 'int') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 234 | g_framebufWidthActual, | ^ /code/src/toolbox/util/postproc.cpp:235:21: warning: narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'GLsizei' (aka 'int') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 235 | g_framebufHeightActual, | ^ /code/src/toolbox/util/postproc.cpp:255:99: warning: implicit conversion 'yourgame::gl::Framebuffer *' -> 'bool' [readability-implicit-bool-conversion] 255 | yourgame_internal::input::setInput(yourgame::input::Source::POSTPROC_INITIALIZED, g_framebuf ? 1.0f : 0.0f); | ^ | ( != nullptr) /code/src/toolbox/util/postproc.cpp:262:21: warning: implicit conversion 'yourgame::gl::Framebuffer *' -> 'bool' [readability-implicit-bool-conversion] 262 | if (g_framebuf) | ^ | != nullptr /code/src/toolbox/util/postproc.cpp:264:21: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory] 264 | delete g_framebuf; | ^ ~~~~~~~~~~ /code/src/toolbox/util/postproc.cpp:31:5: note: variable declared here 31 | yourgame::gl::Framebuffer *g_framebuf = nullptr; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/audio.cpp /code/include/base/yourgame/file.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_FILE_H | ^~~~~~~~~~~~~~~ | BASE_YOURGAME_FILE_H 21 | #define YOURGAME_FILE_H | ~~~~~~~~~~~~~~~ | BASE_YOURGAME_FILE_H /code/include/base/yourgame/file.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace file | ~~~~~~~~~~~~~~ | namespace yourgame::file /code/include/base/yourgame/log.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_LOG_H | ^~~~~~~~~~~~~~ | BASE_YOURGAME_LOG_H 21 | #define YOURGAME_LOG_H | ~~~~~~~~~~~~~~ | BASE_YOURGAME_LOG_H /code/include/base/yourgame/log.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace log | ~~~~~~~~~~~~~ | namespace yourgame::log /code/include/base/yourgame/log.h:35:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 35 | if (logr != nullptr) | ^ | { 36 | logr->debug(s, value, args...); | /code/include/base/yourgame/log.h:46:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 46 | if (logr != nullptr) | ^ | { 47 | logr->debug(value); | /code/include/base/yourgame/log.h:56:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 56 | if (logr != nullptr) | ^ | { 57 | logr->info(s, value, args...); | /code/include/base/yourgame/log.h:65:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 65 | if (logr != nullptr) | ^ | { 66 | logr->info(value); | /code/include/base/yourgame/log.h:74:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 74 | if (logr != nullptr) | ^ | { 75 | logr->warn(s, value, args...); | /code/include/base/yourgame/log.h:83:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 83 | if (logr != nullptr) | ^ | { 84 | logr->warn(value); | /code/include/base/yourgame/log.h:92:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 92 | if (logr != nullptr) | ^ | { 93 | logr->error(s, value, args...); | /code/include/base/yourgame/log.h:101:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 101 | if (logr != nullptr) | ^ | { 102 | logr->error(value); | /code/src/audio.cpp:20:1: warning: #includes are not sorted properly [llvm-include-order] 20 | #include | ^ note: this fix will not be applied because it overlaps with another fix /code/src/audio.cpp:21:1: warning: included header map is not used directly [misc-include-cleaner] 21 | #include | ^~~~~~~~~~~~~~ 22 | #include /code/src/audio.cpp:23:1: warning: included header cstdint is not used directly [misc-include-cleaner] 23 | #include | ^~~~~~~~~~~~~~~~~~ 24 | #include /code/src/audio.cpp:25:1: warning: included header valarray is not used directly [misc-include-cleaner] 25 | #include | ^~~~~~~~~~~~~~~~~~~ 26 | #include "yourgame/file.h" /code/src/audio.cpp:26:1: warning: included header file.h is not used directly [misc-include-cleaner] 26 | #include "yourgame/file.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~ 27 | #include "yourgame/log.h" /code/src/audio.cpp:27:1: warning: included header log.h is not used directly [misc-include-cleaner] 27 | #include "yourgame/log.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~ 28 | #ifdef YOURGAME_EXTPROJ_miniaudio /code/src/audio.cpp:36:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 36 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 37 | { | ~ 38 | namespace audio | ~~~~~~~~~~~~~~~ | namespace yourgame::audio /code/src/audio.cpp:40:18: warning: 3 adjacent parameters of 'init' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters] 40 | int init(int numSources, int numChannels, int sampleRate) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/audio.cpp:40:22: note: the first parameter in the range is 'numSources' 40 | int init(int numSources, int numChannels, int sampleRate) | ^~~~~~~~~~ /code/src/audio.cpp:40:55: note: the last parameter in the range is 'sampleRate' 40 | int init(int numSources, int numChannels, int sampleRate) | ^~~~~~~~~~ /code/src/audio.cpp:40:22: warning: parameter 'numSources' is unused [misc-unused-parameters] 40 | int init(int numSources, int numChannels, int sampleRate) | ^~~~~~~~~~ | /*numSources*/ /code/src/audio.cpp:40:38: warning: parameter 'numChannels' is unused [misc-unused-parameters] 40 | int init(int numSources, int numChannels, int sampleRate) | ^~~~~~~~~~~ | /*numChannels*/ /code/src/audio.cpp:40:55: warning: parameter 'sampleRate' is unused [misc-unused-parameters] 40 | int init(int numSources, int numChannels, int sampleRate) | ^~~~~~~~~~ | /*sampleRate*/ /code/src/audio.cpp:54:42: warning: parameter 'filename' is unused [misc-unused-parameters] 54 | int storeFile(const std::string &filename) | ^~~~~~~~ | /*filename*/ /code/src/audio.cpp:59:37: warning: parameter 'filename' is unused [misc-unused-parameters] 59 | int play(const std::string &filename, bool loop = false) | ^~~~~~~~ | /*filename*/ /code/src/audio.cpp:59:52: warning: parameter 'loop' is unused [misc-unused-parameters] 59 | int play(const std::string &filename, bool loop = false) | ^~~~ | /*loop*/ /code/src/audio.cpp:64:22: warning: parameter 'sourceId' is unused [misc-unused-parameters] 64 | int stop(int sourceId) | ^~~~~~~~ | /*sourceId*/ /code/src/audio.cpp:69:23: warning: parameter 'sourceId' is unused [misc-unused-parameters] 69 | int pause(int sourceId, bool pause) | ^~~~~~~~ | /*sourceId*/ /code/src/audio.cpp:69:38: warning: parameter 'pause' is unused [misc-unused-parameters] 69 | int pause(int sourceId, bool pause) | ^~~~~ | /*pause*/ /code/src/audio.cpp:74:33: warning: parameter 'sourceId' is unused [misc-unused-parameters] 74 | int setChannelGains(int sourceId, const std::vector &gains) | ^~~~~~~~ | /*sourceId*/ /code/src/audio.cpp:74:69: warning: parameter 'gains' is unused [misc-unused-parameters] 74 | int setChannelGains(int sourceId, const std::vector &gains) | ^~~~~ | /*gains*/ /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/file.cpp /code/include/base/yourgame/file.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_FILE_H | ^~~~~~~~~~~~~~~ | BASE_YOURGAME_FILE_H 21 | #define YOURGAME_FILE_H | ~~~~~~~~~~~~~~~ | BASE_YOURGAME_FILE_H /code/include/base/yourgame/file.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace file | ~~~~~~~~~~~~~~ | namespace yourgame::file /code/include/base/yourgame/log.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_LOG_H | ^~~~~~~~~~~~~~ | BASE_YOURGAME_LOG_H 21 | #define YOURGAME_LOG_H | ~~~~~~~~~~~~~~ | BASE_YOURGAME_LOG_H /code/include/base/yourgame/log.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace log | ~~~~~~~~~~~~~ | namespace yourgame::log /code/include/base/yourgame/log.h:35:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 35 | if (logr != nullptr) | ^ | { 36 | logr->debug(s, value, args...); | /code/include/base/yourgame/log.h:46:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 46 | if (logr != nullptr) | ^ | { 47 | logr->debug(value); | /code/include/base/yourgame/log.h:56:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 56 | if (logr != nullptr) | ^ | { 57 | logr->info(s, value, args...); | /code/include/base/yourgame/log.h:65:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 65 | if (logr != nullptr) | ^ | { 66 | logr->info(value); | /code/include/base/yourgame/log.h:74:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 74 | if (logr != nullptr) | ^ | { 75 | logr->warn(s, value, args...); | /code/include/base/yourgame/log.h:83:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 83 | if (logr != nullptr) | ^ | { 84 | logr->warn(value); | /code/include/base/yourgame/log.h:92:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 92 | if (logr != nullptr) | ^ | { 93 | logr->error(s, value, args...); | /code/include/base/yourgame/log.h:101:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 101 | if (logr != nullptr) | ^ | { 102 | logr->error(value); | /code/src/file.cpp:20:1: warning: #includes are not sorted properly [llvm-include-order] 20 | #include // std::replace() | ^ note: this fix will not be applied because it overlaps with another fix /code/src/file.cpp:29:1: warning: included header log.h is not used directly [misc-include-cleaner] 29 | #include "yourgame/log.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~ 30 | /code/src/file.cpp:31:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 31 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 32 | { | ~ 33 | namespace file | ~~~~~~~~~~~~~~ | namespace yourgame_internal::file /code/src/file.cpp:37:13: warning: initializing non-owner 'std::FILE *' (aka '_IO_FILE *') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 37 | std::FILE *f = std::fopen(filepath.c_str(), "rb"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/file.cpp:37:57: warning: use 'fopen' mode 'e' to set O_CLOEXEC [android-cloexec-fopen] 37 | std::FILE *f = std::fopen(filepath.c_str(), "rb"); | ^~~~ | "rbe" /code/src/file.cpp:38:17: warning: implicit conversion 'std::FILE *' (aka '_IO_FILE *') -> 'bool' [readability-implicit-bool-conversion] 38 | if (f) | ^ | != nullptr /code/src/file.cpp:40:17: warning: the value returned by this function should not be disregarded; neglecting it may lead to errors [cert-err33-c] 40 | std::fseek(f, 0, SEEK_END); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/file.cpp:40:17: note: cast the expression to void to silence this warning /code/src/file.cpp:45:21: warning: function 'rewind' has no error detection; 'fseek' should be used instead [bugprone-unsafe-functions,cert-msc24-c,cert-msc33-c] 45 | std::rewind(f); | ^~~~~~~~~~~ /code/src/file.cpp:46:21: warning: the value returned by this function should not be disregarded; neglecting it may lead to errors [cert-err33-c] 46 | std::fread(&dst[0], 1, dst.size(), f); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/file.cpp:46:21: note: cast the expression to void to silence this warning /code/src/file.cpp:46:32: warning: 'data' should be used for accessing the data pointer instead of taking the address of the 0-th element [readability-container-data-pointer] 46 | std::fread(&dst[0], 1, dst.size(), f); | ^~~~~~~ | dst.data() /code/src/file.cpp:48:17: warning: the value returned by this function should not be disregarded; neglecting it may lead to errors [cert-err33-c] 48 | std::fclose(f); | ^~~~~~~~~~~~~~ /code/src/file.cpp:48:17: note: cast the expression to void to silence this warning /code/src/file.cpp:48:17: warning: calling legacy resource function without passing a 'gsl::owner<>' [cppcoreguidelines-owning-memory] 48 | std::fclose(f); | ^~~~~~~~~~~~~~ /code/src/file.cpp:57:19: warning: variable 'p' is not initialized [cppcoreguidelines-init-variables] 57 | void *p; | ^ | = nullptr /code/src/file.cpp:58:20: warning: variable 'uncomp_size' is not initialized [cppcoreguidelines-init-variables] 58 | size_t uncomp_size; | ^ | = 0 /code/src/file.cpp:60:18: warning: no header providing "std::memset" is directly included [misc-include-cleaner] 21 | std::memset(&zip_archive, 0, sizeof(zip_archive)); | ^ /code/src/file.cpp:62:13: warning: variable 'status' of type 'mz_bool' (aka 'int') can be declared 'const' [misc-const-correctness] 62 | mz_bool status = mz_zip_reader_init_file(&zip_archive, archivepath.c_str(), 0); | ^ | const /code/src/file.cpp:63:18: warning: implicit conversion 'mz_bool' (aka 'int') -> 'bool' [readability-implicit-bool-conversion] 63 | if (!status) | ~^ | == 0 /code/src/file.cpp:69:18: warning: implicit conversion 'void *' -> 'bool' [readability-implicit-bool-conversion] 69 | if (!p) | ~^ | == nullptr /code/src/file.cpp:77:50: warning: do not use pointer arithmetic [cppcoreguidelines-pro-bounds-pointer-arithmetic] 77 | static_cast(p) + uncomp_size); | ^ /code/src/file.cpp:86:13: warning: initializing non-owner 'std::FILE *' (aka '_IO_FILE *') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 86 | std::FILE *f = std::fopen(filepath.c_str(), "wb"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/file.cpp:86:57: warning: use 'fopen' mode 'e' to set O_CLOEXEC [android-cloexec-fopen] 86 | std::FILE *f = std::fopen(filepath.c_str(), "wb"); | ^~~~ | "wbe" /code/src/file.cpp:87:17: warning: implicit conversion 'std::FILE *' (aka '_IO_FILE *') -> 'bool' [readability-implicit-bool-conversion] 87 | if (f) | ^ | != nullptr /code/src/file.cpp:89:17: warning: the value returned by this function should not be disregarded; neglecting it may lead to errors [cert-err33-c] 89 | std::fwrite(data, 1, numBytes, f); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/file.cpp:89:17: note: cast the expression to void to silence this warning /code/src/file.cpp:91:17: warning: the value returned by this function should not be disregarded; neglecting it may lead to errors [cert-err33-c] 91 | std::fclose(f); | ^~~~~~~~~~~~~~ /code/src/file.cpp:91:17: note: cast the expression to void to silence this warning /code/src/file.cpp:91:17: warning: calling legacy resource function without passing a 'gsl::owner<>' [cppcoreguidelines-owning-memory] 91 | std::fclose(f); | ^~~~~~~~~~~~~~ /code/src/file.cpp:99:17: warning: implicit conversion 'DIR *' (aka '__dirstream *') -> 'bool' [readability-implicit-bool-conversion] 99 | if (dir) | ^ | != nullptr /code/src/file.cpp:114:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 114 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 115 | { | ~ 116 | namespace file | ~~~~~~~~~~~~~~ | namespace yourgame::file /code/src/file.cpp:122:17: warning: switching on non-enum value without default case may not cover all cases [bugprone-switch-missing-default-case] 122 | switch (filename[0]) | ^ /code/src/file.cpp:143:13: warning: variable 'reFilePath' of type 'std::regex' (aka 'basic_regex') can be declared 'const' [misc-const-correctness] 143 | static std::regex reFilePath(R"((.*\/|^).*$)"); | ^ | const /code/src/file.cpp:156:13: warning: variable 'reFilePath' of type 'std::regex' (aka 'basic_regex') can be declared 'const' [misc-const-correctness] 156 | static std::regex reFilePath(R"((.*\/|^)(.*)$)"); | ^ | const /code/src/file.cpp:172:13: warning: variable 're' of type 'std::regex' (aka 'basic_regex') can be declared 'const' [misc-const-correctness] 172 | static std::regex re(R"((^.*\/|^)([^.]+$|[^.]+|\..+$)(.*$))"); | ^ | const /code/src/file.cpp:185:13: warning: variable 'reFilePath' of type 'std::regex' (aka 'basic_regex') can be declared 'const' [misc-const-correctness] 185 | static std::regex reFilePath(R"((.*\.)(.*)$)"); | ^ | const /code/src/file.cpp:199:17: warning: switching on non-enum value without default case may not cover all cases [bugprone-switch-missing-default-case] 199 | switch (filename[0]) | ^ /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/toolbox/gl/conventions.cpp /code/include/base/yourgame/gl_include.h:38:9: warning: header guard does not follow preferred style [llvm-header-guard] 38 | #ifndef YOURGAME_GL_INCLUDE_H | ^~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H 39 | #define YOURGAME_GL_INCLUDE_H | ~~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H /code/include/toolbox/yourgame/gl/conventions.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLCONVENTIONS_H | ^~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_CONVENTIONS_H 21 | #define YOURGAME_GLCONVENTIONS_H | ~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_CONVENTIONS_H /code/include/toolbox/yourgame/gl/conventions.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/conventions.h:38:30: warning: variable 'unifNameMvpMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 38 | extern const GLchar *unifNameMvpMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:39:30: warning: variable 'unifNameVpMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 39 | extern const GLchar *unifNameVpMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:40:30: warning: variable 'unifNameModelMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 40 | extern const GLchar *unifNameModelMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:41:30: warning: variable 'unifNameNormalMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 41 | extern const GLchar *unifNameNormalMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:42:30: warning: variable 'unifNameCameraPosition' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 42 | extern const GLchar *unifNameCameraPosition; | ^ /code/include/toolbox/yourgame/gl/conventions.h:43:30: warning: variable 'unifNameCameraTrafo' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 43 | extern const GLchar *unifNameCameraTrafo; | ^ /code/include/toolbox/yourgame/gl/conventions.h:44:30: warning: variable 'unifNameSkyRotationInv' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 44 | extern const GLchar *unifNameSkyRotationInv; | ^ /code/include/toolbox/yourgame/gl/conventions.h:45:30: warning: variable 'unifNameTextureDiffuse' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 45 | extern const GLchar *unifNameTextureDiffuse; | ^ /code/include/toolbox/yourgame/gl/conventions.h:46:30: warning: variable 'unifNameTextureSkyCube' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 46 | extern const GLchar *unifNameTextureSkyCube; | ^ /code/include/toolbox/yourgame/gl/conventions.h:47:30: warning: variable 'unifNameTextureSky' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 47 | extern const GLchar *unifNameTextureSky; | ^ /code/include/toolbox/yourgame/gl/conventions.h:48:30: warning: variable 'unifNameTextureBufferDepth' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 48 | extern const GLchar *unifNameTextureBufferDepth; | ^ /code/include/toolbox/yourgame/gl/conventions.h:49:30: warning: variable 'unifNameTextureBufferColor0' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 49 | extern const GLchar *unifNameTextureBufferColor0; | ^ /code/include/toolbox/yourgame/gl/conventions.h:50:30: warning: variable 'unifNameLightAmbient' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 50 | extern const GLchar *unifNameLightAmbient; | ^ /code/include/toolbox/yourgame/gl/conventions.h:51:30: warning: variable 'unifNameLightDiffuse' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 51 | extern const GLchar *unifNameLightDiffuse; | ^ /code/include/toolbox/yourgame/gl/conventions.h:52:30: warning: variable 'unifNameLightSpecular' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 52 | extern const GLchar *unifNameLightSpecular; | ^ /code/include/toolbox/yourgame/gl/conventions.h:53:30: warning: variable 'unifNameLightPosition' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 53 | extern const GLchar *unifNameLightPosition; | ^ /code/include/toolbox/yourgame/gl/conventions.h:54:30: warning: variable 'unifNameSubtexture' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 54 | extern const GLchar *unifNameSubtexture; | ^ /code/src/toolbox/gl/conventions.cpp:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/src/toolbox/gl/conventions.cpp:36:23: warning: variable 'unifNameMvpMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 36 | const GLchar *unifNameMvpMatrix = "mvpMat"; | ^ /code/src/toolbox/gl/conventions.cpp:37:23: warning: variable 'unifNameVpMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 37 | const GLchar *unifNameVpMatrix = "vpMat"; | ^ /code/src/toolbox/gl/conventions.cpp:38:23: warning: variable 'unifNameModelMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 38 | const GLchar *unifNameModelMatrix = "modelMat"; | ^ /code/src/toolbox/gl/conventions.cpp:39:23: warning: variable 'unifNameNormalMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 39 | const GLchar *unifNameNormalMatrix = "normalMat"; | ^ /code/src/toolbox/gl/conventions.cpp:40:23: warning: variable 'unifNameCameraPosition' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 40 | const GLchar *unifNameCameraPosition = "camPos"; | ^ /code/src/toolbox/gl/conventions.cpp:41:23: warning: variable 'unifNameCameraTrafo' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 41 | const GLchar *unifNameCameraTrafo = "camTrafo"; | ^ /code/src/toolbox/gl/conventions.cpp:42:23: warning: variable 'unifNameSkyRotationInv' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 42 | const GLchar *unifNameSkyRotationInv = "skyRotInv"; | ^ /code/src/toolbox/gl/conventions.cpp:43:23: warning: variable 'unifNameTextureDiffuse' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 43 | const GLchar *unifNameTextureDiffuse = "textureDiffuse"; | ^ /code/src/toolbox/gl/conventions.cpp:44:23: warning: variable 'unifNameTextureSkyCube' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 44 | const GLchar *unifNameTextureSkyCube = "textureSkyCube"; | ^ /code/src/toolbox/gl/conventions.cpp:45:23: warning: variable 'unifNameTextureSky' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 45 | const GLchar *unifNameTextureSky = "textureSky"; | ^ /code/src/toolbox/gl/conventions.cpp:46:23: warning: variable 'unifNameTextureBufferDepth' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 46 | const GLchar *unifNameTextureBufferDepth = "textureBufferDepth"; | ^ /code/src/toolbox/gl/conventions.cpp:47:23: warning: variable 'unifNameTextureBufferColor0' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 47 | const GLchar *unifNameTextureBufferColor0 = "textureBufferColor0"; | ^ /code/src/toolbox/gl/conventions.cpp:48:23: warning: variable 'unifNameLightAmbient' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 48 | const GLchar *unifNameLightAmbient = "lightAmbient"; | ^ /code/src/toolbox/gl/conventions.cpp:49:23: warning: variable 'unifNameLightDiffuse' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 49 | const GLchar *unifNameLightDiffuse = "lightDiffuse"; | ^ /code/src/toolbox/gl/conventions.cpp:50:23: warning: variable 'unifNameLightSpecular' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 50 | const GLchar *unifNameLightSpecular = "lightSpecular"; | ^ /code/src/toolbox/gl/conventions.cpp:51:23: warning: variable 'unifNameLightPosition' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 51 | const GLchar *unifNameLightPosition = "lightPosition"; | ^ /code/src/toolbox/gl/conventions.cpp:52:23: warning: variable 'unifNameSubtexture' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 52 | const GLchar *unifNameSubtexture = "subtex"; | ^ /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/toolbox/gl/loading.cpp /code/include/base/yourgame/audio.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_AUDIO_H | ^~~~~~~~~~~~~~~~ | BASE_YOURGAME_AUDIO_H 21 | #define YOURGAME_AUDIO_H | ~~~~~~~~~~~~~~~~ | BASE_YOURGAME_AUDIO_H /code/include/base/yourgame/audio.h:26:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 26 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 27 | { | ~ 28 | namespace audio | ~~~~~~~~~~~~~~~ | namespace yourgame::audio /code/include/base/yourgame/control.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_CONTROL_H | ^~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_CONTROL_H 21 | #define YOURGAME_CONTROL_H | ~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_CONTROL_H /code/include/base/yourgame/control.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace control | ~~~~~~~~~~~~~~~~~ | namespace yourgame::control /code/include/base/yourgame/file.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_FILE_H | ^~~~~~~~~~~~~~~ | BASE_YOURGAME_FILE_H 21 | #define YOURGAME_FILE_H | ~~~~~~~~~~~~~~~ | BASE_YOURGAME_FILE_H /code/include/base/yourgame/file.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace file | ~~~~~~~~~~~~~~ | namespace yourgame::file /code/include/base/yourgame/gl_include.h:38:9: warning: header guard does not follow preferred style [llvm-header-guard] 38 | #ifndef YOURGAME_GL_INCLUDE_H | ^~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H 39 | #define YOURGAME_GL_INCLUDE_H | ~~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H /code/include/base/yourgame/input.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_INPUT_H | ^~~~~~~~~~~~~~~~ | BASE_YOURGAME_INPUT_H 21 | #define YOURGAME_INPUT_H | ~~~~~~~~~~~~~~~~ | BASE_YOURGAME_INPUT_H /code/include/base/yourgame/input.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace input | ~~~~~~~~~~~~~~~ | namespace yourgame::input /code/include/base/yourgame/input.h:28:14: warning: enum 'Source' uses a larger base type ('unsigned int', size: 4 bytes) than necessary for its value set, consider using 'std::uint16_t' (2 bytes) as the base type to reduce its size [performance-enum-size] 28 | enum Source | ^ /code/include/base/yourgame/log.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_LOG_H | ^~~~~~~~~~~~~~ | BASE_YOURGAME_LOG_H 21 | #define YOURGAME_LOG_H | ~~~~~~~~~~~~~~ | BASE_YOURGAME_LOG_H /code/include/base/yourgame/log.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace log | ~~~~~~~~~~~~~ | namespace yourgame::log /code/include/base/yourgame/log.h:35:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 35 | if (logr != nullptr) | ^ | { 36 | logr->debug(s, value, args...); | /code/include/base/yourgame/log.h:46:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 46 | if (logr != nullptr) | ^ | { 47 | logr->debug(value); | /code/include/base/yourgame/log.h:56:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 56 | if (logr != nullptr) | ^ | { 57 | logr->info(s, value, args...); | /code/include/base/yourgame/log.h:65:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 65 | if (logr != nullptr) | ^ | { 66 | logr->info(value); | /code/include/base/yourgame/log.h:74:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 74 | if (logr != nullptr) | ^ | { 75 | logr->warn(s, value, args...); | /code/include/base/yourgame/log.h:83:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 83 | if (logr != nullptr) | ^ | { 84 | logr->warn(value); | /code/include/base/yourgame/log.h:92:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 92 | if (logr != nullptr) | ^ | { 93 | logr->error(s, value, args...); | /code/include/base/yourgame/log.h:101:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 101 | if (logr != nullptr) | ^ | { 102 | logr->error(value); | /code/include/base/yourgame/math.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_MATH_H | ^~~~~~~~~~~~~~~ | BASE_YOURGAME_MATH_H 21 | #define YOURGAME_MATH_H | ~~~~~~~~~~~~~~~ | BASE_YOURGAME_MATH_H /code/include/base/yourgame/math.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/base/yourgame/math.h:27:20: warning: enum 'Projection' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 27 | enum class Projection | ^ /code/include/base/yourgame/math.h:33:20: warning: enum 'Axis' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 33 | enum class Axis | ^ /code/include/base/yourgame/time.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_TIME_H | ^~~~~~~~~~~~~~~ | BASE_YOURGAME_TIME_H 21 | #define YOURGAME_TIME_H | ~~~~~~~~~~~~~~~ | BASE_YOURGAME_TIME_H /code/include/base/yourgame/time.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace time | ~~~~~~~~~~~~~~ | namespace yourgame::time 26 | { 27 | /** \brief returns time clock period [seconds] (clock precision) */ 28 | double getClockPeriod(); 29 | 30 | /** \brief returns time delta [seconds] since last cycle */ 31 | double getDelta(); 32 | 33 | /** \brief returns (monotonic) time duration [seconds] since init */ 34 | double getTime(); 35 | 36 | /** \brief resets the timing so time retrieved by getTime() starts at 0 again */ 37 | void reset(); 38 | } // namespace time | ~~~~~~~~~~~~~~~~~~~ | } // namespace yourgame::time /code/include/base/yourgame/version.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_VERSION_H | ^~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_VERSION_H 21 | #define YOURGAME_VERSION_H | ~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_VERSION_H /code/include/base/yourgame/version.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace version | ~~~~~~~~~~~~~~~~~ | namespace yourgame::version /code/include/base/yourgame/yourgame.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_YOURGAME_H | ^~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_YOURGAME_H 21 | #define YOURGAME_YOURGAME_H | ~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_YOURGAME_H /code/include/toolbox/yourgame/gl/buffer.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLBUFFER_H | ^~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_BUFFER_H 21 | #define YOURGAME_GLBUFFER_H | ~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_BUFFER_H /code/include/toolbox/yourgame/gl/buffer.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/buffer.h:29:15: warning: class 'Buffer' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 29 | class Buffer | ^ /code/include/toolbox/yourgame/gl/buffer.h:44:13: warning: constructor does not initialize these fields: m_target, m_handle, m_usage [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 44 | Buffer() {} | ^ 45 | GLenum m_target; | | {} 46 | GLuint m_handle; | | {} 47 | GLenum m_usage; | | {} /code/include/toolbox/yourgame/gl/conventions.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLCONVENTIONS_H | ^~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_CONVENTIONS_H 21 | #define YOURGAME_GLCONVENTIONS_H | ~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_CONVENTIONS_H /code/include/toolbox/yourgame/gl/conventions.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/conventions.h:38:30: warning: variable 'unifNameMvpMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 38 | extern const GLchar *unifNameMvpMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:39:30: warning: variable 'unifNameVpMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 39 | extern const GLchar *unifNameVpMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:40:30: warning: variable 'unifNameModelMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 40 | extern const GLchar *unifNameModelMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:41:30: warning: variable 'unifNameNormalMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 41 | extern const GLchar *unifNameNormalMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:42:30: warning: variable 'unifNameCameraPosition' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 42 | extern const GLchar *unifNameCameraPosition; | ^ /code/include/toolbox/yourgame/gl/conventions.h:43:30: warning: variable 'unifNameCameraTrafo' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 43 | extern const GLchar *unifNameCameraTrafo; | ^ /code/include/toolbox/yourgame/gl/conventions.h:44:30: warning: variable 'unifNameSkyRotationInv' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 44 | extern const GLchar *unifNameSkyRotationInv; | ^ /code/include/toolbox/yourgame/gl/conventions.h:45:30: warning: variable 'unifNameTextureDiffuse' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 45 | extern const GLchar *unifNameTextureDiffuse; | ^ /code/include/toolbox/yourgame/gl/conventions.h:46:30: warning: variable 'unifNameTextureSkyCube' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 46 | extern const GLchar *unifNameTextureSkyCube; | ^ /code/include/toolbox/yourgame/gl/conventions.h:47:30: warning: variable 'unifNameTextureSky' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 47 | extern const GLchar *unifNameTextureSky; | ^ /code/include/toolbox/yourgame/gl/conventions.h:48:30: warning: variable 'unifNameTextureBufferDepth' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 48 | extern const GLchar *unifNameTextureBufferDepth; | ^ /code/include/toolbox/yourgame/gl/conventions.h:49:30: warning: variable 'unifNameTextureBufferColor0' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 49 | extern const GLchar *unifNameTextureBufferColor0; | ^ /code/include/toolbox/yourgame/gl/conventions.h:50:30: warning: variable 'unifNameLightAmbient' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 50 | extern const GLchar *unifNameLightAmbient; | ^ /code/include/toolbox/yourgame/gl/conventions.h:51:30: warning: variable 'unifNameLightDiffuse' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 51 | extern const GLchar *unifNameLightDiffuse; | ^ /code/include/toolbox/yourgame/gl/conventions.h:52:30: warning: variable 'unifNameLightSpecular' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 52 | extern const GLchar *unifNameLightSpecular; | ^ /code/include/toolbox/yourgame/gl/conventions.h:53:30: warning: variable 'unifNameLightPosition' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 53 | extern const GLchar *unifNameLightPosition; | ^ /code/include/toolbox/yourgame/gl/conventions.h:54:30: warning: variable 'unifNameSubtexture' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 54 | extern const GLchar *unifNameSubtexture; | ^ /code/include/toolbox/yourgame/gl/drawing.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLDRAWING_H | ^~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_DRAWING_H 21 | #define YOURGAME_GLDRAWING_H | ~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_DRAWING_H /code/include/toolbox/yourgame/gl/drawing.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~ | "yourgame/gl/geometry.h" 24 | #include | ~~~~~~~~ | "yourgame/gl/shader.h" 25 | #include "yourgame/math/camera.h" | ~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/gl/texture.h" 26 | #include "yourgame/math/trafo.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/math/camera.h" 27 | #include "yourgame/gl/geometry.h" | ~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/math/trafo.h" 28 | #include "yourgame/gl/shader.h" | ~~~~~~~~~~~~~~~~~~~~~~ | 29 | #include "yourgame/gl/texture.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/drawing.h:31:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 31 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 32 | { | ~ 33 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/drawing.h:35:16: warning: accessing fields in struct 'DrawConfig' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 128 bytes [altera-struct-pack-align] 35 | struct DrawConfig | ^ 36 | { 37 | yourgame::gl::Shader *shader = nullptr; 38 | yourgame::math::Camera *camera = nullptr; 39 | glm::mat4 modelMat = glm::mat4(1); 40 | std::vector textures = {}; 41 | std::array subtex = {0.0f, 1.0f, 0.0f, 1.0f}; 42 | GLsizei instancecount = 1; 43 | }; | | __attribute__((aligned(128))) /code/include/toolbox/yourgame/gl/drawing.h:35:16: note: use "__attribute__((aligned(128)))" to align struct 'DrawConfig' to 128 bytes /code/include/toolbox/yourgame/gl/drawing.h:40:59: warning: initializer for member 'textures' is redundant [readability-redundant-member-init] 40 | std::vector textures = {}; | ^~~~ /code/include/toolbox/yourgame/gl/framebuffer.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLFRAMEBUFFER_H | ^~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_FRAMEBUFFER_H 21 | #define YOURGAME_GLFRAMEBUFFER_H | ~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_FRAMEBUFFER_H /code/include/toolbox/yourgame/gl/framebuffer.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/texture.h" 24 | #include "yourgame/gl_include.h" 25 | #include "yourgame/gl/texture.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/framebuffer.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/framebuffer.h:31:15: warning: class 'Framebuffer' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 31 | class Framebuffer | ^ /code/include/toolbox/yourgame/gl/framebuffer.h:34:20: warning: accessing fields in struct 'TextureAttachDescr' is inefficient due to padding; only needs 44 bytes but is using 48 bytes [altera-struct-pack-align] 34 | struct TextureAttachDescr | ^ 35 | { 36 | GLint internalformat; 37 | GLenum format; 38 | GLenum type; 39 | GLenum unit; 40 | std::vector> parameteri; 41 | GLenum attachment; 42 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/gl/framebuffer.h:34:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'TextureAttachDescr' /code/include/toolbox/yourgame/gl/framebuffer.h:34:20: warning: accessing fields in struct 'TextureAttachDescr' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 64 bytes [altera-struct-pack-align] 34 | struct TextureAttachDescr | ^ 35 | { 36 | GLint internalformat; 37 | GLenum format; 38 | GLenum type; 39 | GLenum unit; 40 | std::vector> parameteri; 41 | GLenum attachment; 42 | }; | | __attribute__((aligned(64))) /code/include/toolbox/yourgame/gl/framebuffer.h:34:20: note: use "__attribute__((aligned(64)))" to align struct 'TextureAttachDescr' to 64 bytes /code/include/toolbox/yourgame/gl/framebuffer.h:59:13: warning: constructor does not initialize these fields: m_handle [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 59 | Framebuffer() {} | ^ 60 | GLuint m_handle; | | {} /code/include/toolbox/yourgame/gl/geometry.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLGEOMETRY_H | ^~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_GEOMETRY_H 21 | #define YOURGAME_GLGEOMETRY_H | ~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_GEOMETRY_H /code/include/toolbox/yourgame/gl/geometry.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/buffer.h" 24 | #include | ~~~~~ | "yourgame/gl/shape.h" 25 | #include | ~~~~~~~~ | "yourgame/gl_include.h" 26 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | 27 | #include "yourgame/gl/buffer.h" | ~~~~~~~~~~~~~~~~~~~~~~ | 28 | #include "yourgame/gl/shape.h" | ~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/geometry.h:30:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 30 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 31 | { | ~ 32 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/geometry.h:34:15: warning: class 'Geometry' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 34 | class Geometry | ^ /code/include/toolbox/yourgame/gl/lightsource.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLLIGHTSOURCE_H | ^~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_LIGHTSOURCE_H 21 | #define YOURGAME_GLLIGHTSOURCE_H | ~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_LIGHTSOURCE_H /code/include/toolbox/yourgame/gl/lightsource.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/loading.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLLOADING_H | ^~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_LOADING_H 21 | #define YOURGAME_GLLOADING_H | ~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_LOADING_H /code/include/toolbox/yourgame/gl/loading.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/conventions.h" 24 | #include | ~~~~~~~~ | "yourgame/gl/geometry.h" 25 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/gl/shader.h" 26 | #include "yourgame/gl/geometry.h" | ~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/gl/texture.h" 27 | #include "yourgame/gl/shader.h" | ~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/gl_include.h" 28 | #include "yourgame/gl/texture.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | 29 | #include "yourgame/gl/conventions.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/loading.h:31:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 31 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 32 | { | ~ 33 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/loading.h:35:16: warning: accessing fields in struct 'TextureConfig' is inefficient due to padding; only needs 38 bytes but is using 40 bytes [altera-struct-pack-align] 35 | struct TextureConfig | ^ 36 | { 37 | GLenum unit = gl::textureUnitDiffuse; 38 | GLint minMagFilter = GL_LINEAR; 39 | GLint wrapMode = GL_REPEAT; 40 | bool generateMipmap = false; 41 | bool premultiplyAlpha = true; 42 | std::vector> parameteri = {}; 43 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/gl/loading.h:35:16: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'TextureConfig' /code/include/toolbox/yourgame/gl/loading.h:35:16: warning: accessing fields in struct 'TextureConfig' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 64 bytes [altera-struct-pack-align] 35 | struct TextureConfig | ^ 36 | { 37 | GLenum unit = gl::textureUnitDiffuse; 38 | GLint minMagFilter = GL_LINEAR; 39 | GLint wrapMode = GL_REPEAT; 40 | bool generateMipmap = false; 41 | bool premultiplyAlpha = true; 42 | std::vector> parameteri = {}; 43 | }; | | __attribute__((aligned(64))) /code/include/toolbox/yourgame/gl/loading.h:35:16: note: use "__attribute__((aligned(64)))" to align struct 'TextureConfig' to 64 bytes /code/include/toolbox/yourgame/gl/loading.h:42:62: warning: initializer for member 'parameteri' is redundant [readability-redundant-member-init] 42 | std::vector> parameteri = {}; | ^~~~ /code/include/toolbox/yourgame/gl/particles.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLPARTICLES_H | ^~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_PARTICLES_H 21 | #define YOURGAME_GLPARTICLES_H | ~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_PARTICLES_H /code/include/toolbox/yourgame/gl/particles.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include "yourgame/math/particles.h" | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/gl/geometry.h" 24 | #include "yourgame/gl_include.h" 25 | #include "yourgame/gl/geometry.h" | ~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/math/particles.h" /code/include/toolbox/yourgame/gl/particles.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/particles.h:31:15: warning: class 'Particles' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 31 | class Particles : public yourgame::math::Particles | ^ /code/include/toolbox/yourgame/gl/particles.h:31:15: warning: destructor of 'Particles' is public and non-virtual [cppcoreguidelines-virtual-class-destructor] /code/include/toolbox/yourgame/gl/particles.h:31:15: note: make it public and virtual 31 | class Particles : public yourgame::math::Particles | ^ 32 | { 33 | public: 34 | static Particles *make(const Config cfg, yourgame::gl::Geometry *geo); 35 | ~Particles(); | virtual /code/include/toolbox/yourgame/gl/particles.h:34:36: warning: parameter 'cfg' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls] 34 | static Particles *make(const Config cfg, yourgame::gl::Geometry *geo); | ^~~~~ /code/include/toolbox/yourgame/gl/shader.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLSHADER_H | ^~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHADER_H 21 | #define YOURGAME_GLSHADER_H | ~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHADER_H /code/include/toolbox/yourgame/gl/shader.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/lightsource.h" 24 | #include | ~~~~~~~~ | "yourgame/gl_include.h" 25 | #include | ~~~~~ | "yourgame/math/camera.h" 26 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | 27 | #include "yourgame/gl/lightsource.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 28 | #include "yourgame/math/camera.h" | ~~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/shader.h:30:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 30 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 31 | { | ~ 32 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/shader.h:34:15: warning: class 'Shader' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 34 | class Shader | ^ /code/include/toolbox/yourgame/gl/shader.h:51:13: warning: constructor does not initialize these fields: m_programHandle [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 51 | Shader() {} | ^ 52 | GLuint m_programHandle; | | {} /code/include/toolbox/yourgame/gl/shape.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLSHAPE_H | ^~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHAPE_H 21 | #define YOURGAME_GLSHAPE_H | ~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHAPE_H /code/include/toolbox/yourgame/gl/shape.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/buffer.h" 24 | #include "yourgame/gl_include.h" 25 | #include "yourgame/gl/buffer.h" | ~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/shape.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/shape.h:31:15: warning: class 'Shape' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 31 | class Shape | ^ /code/include/toolbox/yourgame/gl/shape.h:34:20: warning: accessing fields in struct 'ArrBufferDescr' is inefficient due to padding; only needs 29 bytes but is using 40 bytes [altera-struct-pack-align] 34 | struct ArrBufferDescr | ^ 35 | { 36 | GLuint index; 37 | GLint size; 38 | GLenum type; 39 | GLboolean normalized; 40 | GLsizei stride; 41 | const GLvoid *pointer; 42 | GLuint attribDivisor; 43 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/gl/shape.h:34:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'ArrBufferDescr' /code/include/toolbox/yourgame/gl/shape.h:34:20: warning: accessing fields in struct 'ArrBufferDescr' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 32 bytes [altera-struct-pack-align] 34 | struct ArrBufferDescr | ^ 35 | { 36 | GLuint index; 37 | GLint size; 38 | GLenum type; 39 | GLboolean normalized; 40 | GLsizei stride; 41 | const GLvoid *pointer; 42 | GLuint attribDivisor; 43 | }; | | __attribute__((aligned(32))) /code/include/toolbox/yourgame/gl/shape.h:34:20: note: use "__attribute__((aligned(32)))" to align struct 'ArrBufferDescr' to 32 bytes /code/include/toolbox/yourgame/gl/shape.h:45:20: warning: accessing fields in struct 'ElemArrBufferDescr' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 16 bytes [altera-struct-pack-align] 45 | struct ElemArrBufferDescr | ^ 46 | { 47 | GLenum type; 48 | GLenum drawMode; 49 | GLsizei numElements; 50 | }; | | __attribute__((aligned(16))) /code/include/toolbox/yourgame/gl/shape.h:45:20: note: use "__attribute__((aligned(16)))" to align struct 'ElemArrBufferDescr' to 16 bytes /code/include/toolbox/yourgame/gl/shape.h:68:13: warning: constructor does not initialize these fields: m_elArDescr, m_vaoHandle [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 68 | Shape() {} | ^ 69 | ElemArrBufferDescr m_elArDescr; | | {} 70 | GLuint m_vaoHandle; | | {} /code/include/toolbox/yourgame/gl/spritegrid.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLSPRITEGRID_H | ^~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SPRITEGRID_H 21 | #define YOURGAME_GLSPRITEGRID_H | ~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SPRITEGRID_H /code/include/toolbox/yourgame/gl/spritegrid.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/geometry.h" 24 | #include | ~~~~~~~~ | "yourgame/gl/texture.h" 25 | #include "yourgame/gl/geometry.h" | ~~~~~~~~~~~~~~~~~~~~~~~~ | 26 | #include "yourgame/gl/texture.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/spritegrid.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/spritegrid.h:32:15: warning: class 'SpriteGrid' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 32 | class SpriteGrid | ^ /code/include/toolbox/yourgame/gl/spritegrid.h:67:13: warning: function 'geo' should be marked [[nodiscard]] [modernize-use-nodiscard] 67 | Geometry *geo() const { return m_geo; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLTEXTURE_H | ^~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_TEXTURE_H 21 | #define YOURGAME_GLTEXTURE_H | ~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_TEXTURE_H /code/include/toolbox/yourgame/gl/texture.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~ | "yourgame/gl_include.h" 24 | #include | ~~~~~~~~ | 25 | #include | ~~~~~~~~ | 26 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/texture.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/texture.h:32:16: warning: accessing fields in struct 'TextureCoords' is inefficient due to padding; only needs 41 bytes but is using 44 bytes [altera-struct-pack-align] 32 | struct TextureCoords | ^ /code/include/toolbox/yourgame/gl/texture.h:32:16: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'TextureCoords' /code/include/toolbox/yourgame/gl/texture.h:32:16: warning: accessing fields in struct 'TextureCoords' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 64 bytes [altera-struct-pack-align] 32 | struct TextureCoords | ^ /code/include/toolbox/yourgame/gl/texture.h:32:16: note: use "__attribute__((aligned(64)))" to align struct 'TextureCoords' to 64 bytes /code/include/toolbox/yourgame/gl/texture.h:35:13: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default,modernize-use-equals-default] 35 | TextureCoords() {} | ^ ~~ | = default; /code/include/toolbox/yourgame/gl/texture.h:37:27: warning: 2 adjacent parameters of 'TextureCoords' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters] 37 | TextureCoords(int x, int y, int width, int height, int texWidth, int texHeight, bool cwRot) | ^~~~~~~~~~~~ /code/include/toolbox/yourgame/gl/texture.h:37:31: note: the first parameter in the range is 'x' 37 | TextureCoords(int x, int y, int width, int height, int texWidth, int texHeight, bool cwRot) | ^ /code/include/toolbox/yourgame/gl/texture.h:37:38: note: the last parameter in the range is 'y' 37 | TextureCoords(int x, int y, int width, int height, int texWidth, int texHeight, bool cwRot) | ^ /code/include/toolbox/yourgame/gl/texture.h:55:19: warning: member variable 'uMin' has public visibility [misc-non-private-member-variables-in-classes] 55 | float uMin = 0.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:56:19: warning: member variable 'uMax' has public visibility [misc-non-private-member-variables-in-classes] 56 | float uMax = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:57:19: warning: member variable 'vMin' has public visibility [misc-non-private-member-variables-in-classes] 57 | float vMin = 0.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:58:19: warning: member variable 'vMax' has public visibility [misc-non-private-member-variables-in-classes] 58 | float vMax = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:59:17: warning: member variable 'xMinPixel' has public visibility [misc-non-private-member-variables-in-classes] 59 | int xMinPixel = 0; | ^ /code/include/toolbox/yourgame/gl/texture.h:60:17: warning: member variable 'xMaxPixel' has public visibility [misc-non-private-member-variables-in-classes] 60 | int xMaxPixel = 1; | ^ /code/include/toolbox/yourgame/gl/texture.h:61:17: warning: member variable 'yMinPixel' has public visibility [misc-non-private-member-variables-in-classes] 61 | int yMinPixel = 0; | ^ /code/include/toolbox/yourgame/gl/texture.h:62:17: warning: member variable 'yMaxPixel' has public visibility [misc-non-private-member-variables-in-classes] 62 | int yMaxPixel = 1; | ^ /code/include/toolbox/yourgame/gl/texture.h:63:19: warning: member variable 'aspectRatioPixel' has public visibility [misc-non-private-member-variables-in-classes] 63 | float aspectRatioPixel = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:64:19: warning: member variable 'aspectRatioPixelInverse' has public visibility [misc-non-private-member-variables-in-classes] 64 | float aspectRatioPixelInverse = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:65:18: warning: member variable 'cwRotated' has public visibility [misc-non-private-member-variables-in-classes] 65 | bool cwRotated = false; | ^ /code/include/toolbox/yourgame/gl/texture.h:68:15: warning: class 'Texture' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 68 | class Texture | ^ /code/include/toolbox/yourgame/gl/texture.h:95:13: warning: function 'handle' should be marked [[nodiscard]] [modernize-use-nodiscard] 95 | GLuint handle() const { return m_handle; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:96:13: warning: function 'getTarget' should be marked [[nodiscard]] [modernize-use-nodiscard] 96 | GLenum getTarget() const { return m_target; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:97:13: warning: function 'getWidth' should be marked [[nodiscard]] [modernize-use-nodiscard] 97 | GLsizei getWidth() const { return m_width; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:98:13: warning: function 'getHeight' should be marked [[nodiscard]] [modernize-use-nodiscard] 98 | GLsizei getHeight() const { return m_height; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:107:13: warning: function 'getCoords' should be marked [[nodiscard]] [modernize-use-nodiscard] 107 | TextureCoords getCoords(std::string name) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:122:13: warning: function 'getNumFrames' should be marked [[nodiscard]] [modernize-use-nodiscard] 122 | int getNumFrames(std::string sequenceName) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:127:13: warning: function 'getSequenceNames' should be marked [[nodiscard]] [modernize-use-nodiscard] 127 | std::vector getSequenceNames() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:136:13: warning: function 'getGridCoords' should be marked [[nodiscard]] [modernize-use-nodiscard] 136 | TextureCoords getGridCoords(int gridWidth, int gridHeight, int index) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:139:13: warning: constructor does not initialize these fields: m_handle, m_target, m_unit, m_width, m_height [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 139 | Texture() {} | ^ 140 | GLuint m_handle; | | {} 141 | GLenum m_target; | | {} 142 | GLenum m_unit; | | {} 143 | GLsizei m_width; | | {} 144 | GLsizei m_height; | | {} /code/include/toolbox/yourgame/gl/texture.h:146:20: warning: accessing fields in struct 'Sequence' is inefficient due to padding; only needs 73 bytes but is using 80 bytes [altera-struct-pack-align] 146 | struct Sequence | ^ 147 | { 148 | std::map frames; 149 | bool framesInvalidated; 150 | std::vector framesConsec; /**< \brief consecutive representation of the frame coordinates */ 151 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/gl/texture.h:146:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'Sequence' /code/include/toolbox/yourgame/gl/texture.h:146:20: warning: accessing fields in struct 'Sequence' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 128 bytes [altera-struct-pack-align] 146 | struct Sequence | ^ 147 | { 148 | std::map frames; 149 | bool framesInvalidated; 150 | std::vector framesConsec; /**< \brief consecutive representation of the frame coordinates */ 151 | }; | | __attribute__((aligned(128))) /code/include/toolbox/yourgame/gl/texture.h:146:20: note: use "__attribute__((aligned(128)))" to align struct 'Sequence' to 128 bytes /code/include/toolbox/yourgame/math/camera.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_CAMERA_H | ^~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_CAMERA_H 21 | #define YOURGAME_CAMERA_H | ~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_CAMERA_H /code/include/toolbox/yourgame/math/camera.h:24:1: warning: #includes are not sorted properly [llvm-include-order] 24 | #include | ^ ~~~~~~~~~~~~~ | "yourgame/math.h" 25 | #include | ~~~~~~~~~~~~~ | "yourgame/math/trafo.h" 26 | #include "yourgame/math.h" | ~~~~~~~~~~~~~~~~~ | 27 | #include "yourgame/math/trafo.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/math/camera.h:29:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 29 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 30 | { | ~ 31 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/toolbox/yourgame/math/particles.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_PARTICLES_H | ^~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_PARTICLES_H 21 | #define YOURGAME_PARTICLES_H | ~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_PARTICLES_H /code/include/toolbox/yourgame/math/particles.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | 24 | #include | ~~~~~~~~ | 25 | #include | ~~~~~~~ | 26 | #include | ~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/math/particles.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/toolbox/yourgame/math/particles.h:38:15: warning: destructor of 'Particles' is public and non-virtual [cppcoreguidelines-virtual-class-destructor] 38 | class Particles | ^ /code/include/toolbox/yourgame/math/particles.h:38:15: note: make it public and virtual 38 | class Particles | ^ 39 | { 40 | public: | /code/include/toolbox/yourgame/math/particles.h:47:20: warning: accessing fields in struct 'Config' is inefficient due to padding; only needs 103 bytes but is using 104 bytes [altera-struct-pack-align] 47 | struct Config | ^ /code/include/toolbox/yourgame/math/particles.h:47:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'Config' /code/include/toolbox/yourgame/math/particles.h:47:20: warning: accessing fields in struct 'Config' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 128 bytes [altera-struct-pack-align] 47 | struct Config | ^ /code/include/toolbox/yourgame/math/particles.h:47:20: note: use "__attribute__((aligned(128)))" to align struct 'Config' to 128 bytes /code/include/toolbox/yourgame/math/particles.h:66:13: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,hicpp-explicit-conversions] 66 | Particles(const Config cfg); | ^ | explicit /code/include/toolbox/yourgame/math/particles.h:66:23: warning: parameter 'cfg' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls] 66 | Particles(const Config cfg); | ^~~~~ /code/include/toolbox/yourgame/math/particles.h:74:20: warning: member variable 'm_cfg' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes,misc-non-private-member-variables-in-classes] 74 | Config m_cfg; | ^ /code/include/toolbox/yourgame/math/particles.h:75:36: warning: member variable 'm_positionData' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes,misc-non-private-member-variables-in-classes] 75 | std::vector m_positionData; | ^ /code/include/toolbox/yourgame/math/particles.h:76:32: warning: member variable 'm_progressData' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes,misc-non-private-member-variables-in-classes] 76 | std::vector m_progressData; | ^ /code/include/toolbox/yourgame/math/particles.h:79:20: warning: accessing fields in struct 'Part' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 64 bytes [altera-struct-pack-align] 79 | struct Part | ^ 80 | { 81 | glm::vec3 pos; 82 | glm::vec3 move; 83 | float lifetime; 84 | float totalLifeInv; 85 | float progress; 86 | }; | | __attribute__((aligned(64))) /code/include/toolbox/yourgame/math/particles.h:79:20: note: use "__attribute__((aligned(64)))" to align struct 'Part' to 64 bytes /code/include/toolbox/yourgame/math/trafo.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_TRAFO_H | ^~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_TRAFO_H 21 | #define YOURGAME_TRAFO_H | ~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_TRAFO_H /code/include/toolbox/yourgame/math/trafo.h:24:1: warning: #includes are not sorted properly [llvm-include-order] 24 | #include | ^ ~~~~~~~~~~~~~ | "yourgame/math.h" 25 | #include 26 | #include "yourgame/math.h" | ~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/math/trafo.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/toolbox/yourgame/math/trafo.h:56:13: warning: function 'getAxisGlobal' should be marked [[nodiscard]] [modernize-use-nodiscard] 56 | glm::vec3 getAxisGlobal(math::Axis ax) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/math/trafo.h:57:13: warning: function 'getEye' should be marked [[nodiscard]] [modernize-use-nodiscard] 57 | glm::vec3 getEye() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/math/trafo.h:58:13: warning: function 'getRotation' should be marked [[nodiscard]] [modernize-use-nodiscard] 58 | glm::quat getRotation() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/math/trafo.h:59:13: warning: function 'getScale' should be marked [[nodiscard]] [modernize-use-nodiscard] 59 | glm::vec3 getScale() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/toolbox.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_TOOLBOX_H | ^~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_TOOLBOX_H 21 | #define YOURGAME_TOOLBOX_H | ~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_TOOLBOX_H /code/include/toolbox/yourgame/util/assetmanager.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_ASSETMANAGER_H | ^~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_ASSETMANAGER_H 21 | #define YOURGAME_ASSETMANAGER_H | ~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_ASSETMANAGER_H /code/include/toolbox/yourgame/util/assetmanager.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~~~~~ | // std::uintptr_t 24 | #include // std::uintptr_t | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 25 | #include | ~~~~~~~~~~ | 26 | #include | ~~~~~ | 27 | #include | ~~~~~~~~ | /code/include/toolbox/yourgame/util/assetmanager.h:29:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 29 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 30 | { | ~ 31 | namespace util | ~~~~~~~~~~~~~~ | namespace yourgame::util /code/include/toolbox/yourgame/util/assetmanager.h:46:15: warning: class 'AssetManager' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 46 | class AssetManager | ^ /code/include/toolbox/yourgame/util/assetmanager.h:63:37: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 63 | bool insert(std::string name, T *obj) | ^ /code/include/toolbox/yourgame/util/assetmanager.h:76:23: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory] 76 | { delete reinterpret_cast(ptr); }; | ^ ~~~ /code/include/toolbox/yourgame/util/assetmanager.h:75:28: note: variable declared here 75 | [](std::uintptr_t ptr) | ^~~~~~~~~~~~~~~~~~ /code/include/toolbox/yourgame/util/assetmanager.h:76:30: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast] 76 | { delete reinterpret_cast(ptr); }; | ^ /code/include/toolbox/yourgame/util/assetmanager.h:85:58: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast] 85 | m_ptrMaps[typeid(T).hash_code()][name] = reinterpret_cast(obj); | ^ /code/include/toolbox/yourgame/util/assetmanager.h:98:37: warning: parameter 'name' is unused [misc-unused-parameters] 98 | void insert(std::string name, T obj) | ^~~~ | /*name*/ /code/include/toolbox/yourgame/util/assetmanager.h:98:37: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] /code/include/toolbox/yourgame/util/assetmanager.h:98:45: warning: parameter 'obj' is unused [misc-unused-parameters] 98 | void insert(std::string name, T obj) | ^~~ | /*obj*/ /code/include/toolbox/yourgame/util/assetmanager.h:111:32: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 111 | T *get(std::string name) | ^ /code/include/toolbox/yourgame/util/assetmanager.h:119:32: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast] 119 | return reinterpret_cast(itT->second); | ^ /code/include/toolbox/yourgame/util/assetmanager.h:149:38: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 149 | void destroy(std::string name) | ^ /code/include/toolbox/yourgame/util/assetmanager.h:174:21: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 174 | for (const auto &ptr : itMap->second) | ^ /code/include/toolbox/yourgame/util/assetmanager.h:189:21: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 189 | for (const auto &ptr : map.second) | ^ /code/include/toolbox/yourgame/util/image.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_IMAGE_H | ^~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_IMAGE_H 21 | #define YOURGAME_IMAGE_H | ~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_IMAGE_H /code/include/toolbox/yourgame/util/image.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~~ | 24 | #include | ~~~~~~~ | /code/include/toolbox/yourgame/util/image.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace util | ~~~~~~~~~~~~~~ | namespace yourgame::util /code/include/toolbox/yourgame/util/image.h:31:15: warning: class 'Image' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 31 | class Image | ^ /code/include/toolbox/yourgame/util/image.h:34:24: warning: enum 'Layout' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 34 | enum class Layout | ^ /code/include/toolbox/yourgame/util/image.h:70:13: warning: function 'getData' should be marked [[nodiscard]] [modernize-use-nodiscard] 70 | const uint8_t *getData() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/image.h:72:13: warning: function 'getWidth' should be marked [[nodiscard]] [modernize-use-nodiscard] 72 | int getWidth() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/image.h:74:13: warning: function 'getHeight' should be marked [[nodiscard]] [modernize-use-nodiscard] 74 | int getHeight() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/image.h:76:13: warning: function 'getLayout' should be marked [[nodiscard]] [modernize-use-nodiscard] 76 | Layout getLayout() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/image.h:78:13: warning: function 'getNumChannels' should be marked [[nodiscard]] [modernize-use-nodiscard] 78 | int getNumChannels() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/image.h:80:13: warning: function 'getNumDemandedBytes' should be marked [[nodiscard]] [modernize-use-nodiscard] 80 | size_t getNumDemandedBytes() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/image.h:83:13: warning: constructor does not initialize these fields: m_width, m_height, m_layout [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 83 | Image() {} | ^ 84 | std::vector m_data; 85 | int m_width; | | {} 86 | int m_height; | | {} /code/include/toolbox/yourgame/util/motion.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_MOTION_H | ^~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_MOTION_H 21 | #define YOURGAME_MOTION_H | ~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_MOTION_H /code/include/toolbox/yourgame/util/motion.h:26:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 26 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 27 | { | ~ 28 | namespace util | ~~~~~~~~~~~~~~ | namespace yourgame::util /code/include/toolbox/yourgame/util/motion.h:33:24: warning: enum 'FlowType' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 33 | enum class FlowType | ^ /code/include/toolbox/yourgame/util/motion.h:40:24: warning: enum 'SegmentEase' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 40 | enum class SegmentEase | ^ /code/include/toolbox/yourgame/util/motion.h:53:13: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,hicpp-explicit-conversions] 53 | Motion(FlowType flowType); | ^ | explicit /code/include/toolbox/yourgame/util/motion.h:69:20: warning: accessing fields in struct 'Segment' is inefficient due to padding; only needs 80 bytes but is using 88 bytes [altera-struct-pack-align] 69 | struct Segment | ^ 70 | { 71 | Segment(float dt, 72 | std::function calcFn, 73 | std::function easeFn, 74 | float val0, 75 | float val1, 76 | float val2) : dt(dt), calcFn(calcFn), easeFn(easeFn), val0(val0), val1(val1), val2(val2) {} 77 | 78 | float dt; 79 | std::function calcFn; 80 | std::function easeFn; 81 | float val0; 82 | float val1; 83 | float val2; 84 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/util/motion.h:69:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'Segment' /code/include/toolbox/yourgame/util/motion.h:69:20: warning: accessing fields in struct 'Segment' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 128 bytes [altera-struct-pack-align] 69 | struct Segment | ^ 70 | { 71 | Segment(float dt, 72 | std::function calcFn, 73 | std::function easeFn, 74 | float val0, 75 | float val1, 76 | float val2) : dt(dt), calcFn(calcFn), easeFn(easeFn), val0(val0), val1(val1), val2(val2) {} 77 | 78 | float dt; 79 | std::function calcFn; 80 | std::function easeFn; 81 | float val0; 82 | float val1; 83 | float val2; 84 | }; | | __attribute__((aligned(128))) /code/include/toolbox/yourgame/util/motion.h:69:20: note: use "__attribute__((aligned(128)))" to align struct 'Segment' to 128 bytes /code/include/toolbox/yourgame/util/motion.h:72:25: warning: pass by value and use std::move [modernize-pass-by-value] 24 | std::function calcFn, | ^ 25 | std::function easeFn, 26 | float val0, 27 | float val1, 28 | float val2) : dt(dt), calcFn(calcFn), easeFn(easeFn), val0(val0), val1(val1), val2(val2) {} | | std::move( ) /code/include/toolbox/yourgame/util/motion.h:73:25: warning: pass by value and use std::move [modernize-pass-by-value] 73 | std::function easeFn, | ^ 74 | float val0, 75 | float val1, 76 | float val2) : dt(dt), calcFn(calcFn), easeFn(easeFn), val0(val0), val1(val1), val2(val2) {} | | std::move( ) /code/include/toolbox/yourgame/util/motion.h:76:54: warning: parameter 'calcFn' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param] 24 | float val2) : dt(dt), calcFn(calcFn), easeFn(easeFn), val0(val0), val1(val1), val2(val2) {} | ^ | std::move( ) /code/include/toolbox/yourgame/util/motion.h:76:70: warning: parameter 'easeFn' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param] 76 | float val2) : dt(dt), calcFn(calcFn), easeFn(easeFn), val0(val0), val1(val1), val2(val2) {} | ^ | std::move( ) /code/include/toolbox/yourgame/util/motion.h:78:23: warning: member variable 'dt' has public visibility [misc-non-private-member-variables-in-classes] 78 | float dt; | ^ /code/include/toolbox/yourgame/util/motion.h:79:62: warning: member variable 'calcFn' has public visibility [misc-non-private-member-variables-in-classes] 79 | std::function calcFn; | ^ /code/include/toolbox/yourgame/util/motion.h:80:52: warning: member variable 'easeFn' has public visibility [misc-non-private-member-variables-in-classes] 80 | std::function easeFn; | ^ /code/include/toolbox/yourgame/util/motion.h:81:23: warning: member variable 'val0' has public visibility [misc-non-private-member-variables-in-classes] 81 | float val0; | ^ /code/include/toolbox/yourgame/util/motion.h:82:23: warning: member variable 'val1' has public visibility [misc-non-private-member-variables-in-classes] 82 | float val1; | ^ /code/include/toolbox/yourgame/util/motion.h:83:23: warning: member variable 'val2' has public visibility [misc-non-private-member-variables-in-classes] 83 | float val2; | ^ /code/include/toolbox/yourgame/util/physenv.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_PHYSENV_H | ^~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_PHYSENV_H 21 | #define YOURGAME_PHYSENV_H | ~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_PHYSENV_H /code/include/toolbox/yourgame/util/physenv.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include // unique_ptr | ^ ~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/math/trafo.h" 24 | #include 25 | #include | ~~~~~~~~ | // unique_ptr 26 | #include "yourgame/math/trafo.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/util/physenv.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace util | ~~~~~~~~~~~~~~ | namespace yourgame::util /code/include/toolbox/yourgame/util/physenv.h:32:16: warning: accessing fields in struct 'RigidBodyInfo' is inefficient due to padding; only needs 38 bytes but is using 40 bytes [altera-struct-pack-align] 32 | struct RigidBodyInfo | ^ 33 | { 34 | float mass = 1.0f; 35 | float linearDamping = 0.0f; 36 | float angularDamping = 0.0f; 37 | float friction = 0.5f; 38 | float rollingFriction = 0.0f; 39 | float spinningFriction = 0.0f; 40 | float restitution = 0.0f; 41 | float linearSleepingThreshold = 0.8f; 42 | float angularSleepingThreshold = 1.0f; 43 | bool kinematic = false; 44 | bool disableDeactivation = false; 45 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/util/physenv.h:32:16: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'RigidBodyInfo' /code/include/toolbox/yourgame/util/physenv.h:32:16: warning: accessing fields in struct 'RigidBodyInfo' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 64 bytes [altera-struct-pack-align] 32 | struct RigidBodyInfo | ^ 33 | { 34 | float mass = 1.0f; 35 | float linearDamping = 0.0f; 36 | float angularDamping = 0.0f; 37 | float friction = 0.5f; 38 | float rollingFriction = 0.0f; 39 | float spinningFriction = 0.0f; 40 | float restitution = 0.0f; 41 | float linearSleepingThreshold = 0.8f; 42 | float angularSleepingThreshold = 1.0f; 43 | bool kinematic = false; 44 | bool disableDeactivation = false; 45 | }; | | __attribute__((aligned(64))) /code/include/toolbox/yourgame/util/physenv.h:32:16: note: use "__attribute__((aligned(64)))" to align struct 'RigidBodyInfo' to 64 bytes /code/include/toolbox/yourgame/util/physenv.h:48:15: warning: class 'RigidBody' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 48 | class RigidBody | ^ /code/include/toolbox/yourgame/util/physenv.h:57:23: warning: pass by value and use std::move [modernize-pass-by-value] 26 | RigidBody(std::string name, void *body) : m_name(name), m_body(body) {} | ^ | std::move( ) /code/include/toolbox/yourgame/util/physenv.h:57:62: warning: parameter 'name' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param] 26 | RigidBody(std::string name, void *body) : m_name(name), m_body(body) {} | ^ | std::move( ) /code/include/toolbox/yourgame/util/physenv.h:142:25: warning: member variable 'm_name' has public visibility [misc-non-private-member-variables-in-classes] 142 | std::string m_name; | ^ /code/include/toolbox/yourgame/util/physenv.h:143:25: warning: member 'm_body' of type 'void *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 143 | void *const m_body; | ^ /code/include/toolbox/yourgame/util/physenv.h:143:25: warning: member variable 'm_body' has public visibility [misc-non-private-member-variables-in-classes] /code/include/toolbox/yourgame/util/physenv.h:160:24: warning: member variable 'm_body0' has public visibility [misc-non-private-member-variables-in-classes] 160 | RigidBody *m_body0; | ^ /code/include/toolbox/yourgame/util/physenv.h:161:24: warning: member variable 'm_body1' has public visibility [misc-non-private-member-variables-in-classes] 161 | RigidBody *m_body1; | ^ /code/include/toolbox/yourgame/util/physenv.h:162:19: warning: member variable 'm_impulse' has public visibility [misc-non-private-member-variables-in-classes] 162 | float m_impulse; | ^ /code/include/toolbox/yourgame/util/physenv.h:170:13: warning: function 'involves' should be marked [[nodiscard]] [modernize-use-nodiscard] 170 | bool involves(const std::string &name) const | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/physenv.h:182:13: warning: function 'involves2' should be marked [[nodiscard]] [modernize-use-nodiscard] 182 | bool involves2(const std::string &nameA, const std::string &nameB) const | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/physenv.h:193:13: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,hicpp-explicit-conversions] 193 | RayTestResult(RigidBody *rigidBody) : m_rigidBody(rigidBody) {} | ^ | explicit /code/include/toolbox/yourgame/util/physenv.h:194:24: warning: member variable 'm_rigidBody' has public visibility [misc-non-private-member-variables-in-classes] 194 | RigidBody *m_rigidBody; | ^ /code/include/toolbox/yourgame/util/physenv.h:198:15: warning: class 'PhysEnv' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 198 | class PhysEnv | ^ /code/include/toolbox/yourgame/util/postproc.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_POSTPROC_H | ^~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_POSTPROC_H 21 | #define YOURGAME_POSTPROC_H | ~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_POSTPROC_H /code/include/toolbox/yourgame/util/postproc.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace util | ~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace postproc | ~~~~~~~~~~~~~~~~~~ | namespace yourgame::util::postproc 30 | { 31 | void resize(uint32_t width, uint32_t height); 32 | bool init(uint32_t width, uint32_t height); 33 | void shutdown(); 34 | bool isInitialized(); 35 | void use(yourgame::gl::Shader *shader); 36 | } // namespace postproc | ~~~~~~~~~~~~~~~~~~~~~~~ | } // namespace yourgame::util::postproc 37 | } // namespace util | ~~~~~~~~~~~~~~~~~~~ 38 | } // namespace yourgame | ~~~~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/gl/loading.cpp:20:1: warning: #includes are not sorted properly [llvm-include-order] 20 | #include | ^ ~~~~~~~~ | "tiny_obj_loader.h" 21 | #include | ~~~~~~~~ | "nlohmann/json.hpp" 22 | #include | ~~~~~ | "yourgame/file.h" 23 | #include | ~~~~~~~ | "yourgame/gl/conventions.h" 24 | #include | ~~~~~~~~~~~ | "yourgame/gl/loading.h" 25 | #include "tiny_obj_loader.h" | ~~~~~~~~~~~~~~~~~~~ | "yourgame/yourgame.h" 26 | #include "nlohmann/json.hpp" | ~~~~~~~~~~~~~~~~~~~ | 27 | #include "yourgame/yourgame.h" | ~~~~~~~~~~~~~~~~~~~~~ | 28 | #include "yourgame/file.h" | ~~~~~~~~~~~~~~~~~ | 29 | #include "yourgame/gl/loading.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | 30 | #include "yourgame/gl/conventions.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | /code/src/toolbox/gl/loading.cpp:34:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 34 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 35 | { | ~ 36 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/src/toolbox/gl/loading.cpp:38:9: warning: no header providing "yourgame::gl::Texture" is directly included [misc-include-cleaner] 27 | #include "yourgame/yourgame.h" 28 | #include "yourgame/file.h" 29 | #include "yourgame/gl/loading.h" 30 | #include "yourgame/gl/conventions.h" 31 | 32 | using json = nlohmann::json; 33 | 34 | namespace yourgame 35 | { 36 | namespace gl 37 | { 38 | Texture *loadTexture(const std::string &imgFilename, | ^ /code/src/toolbox/gl/loading.cpp:38:18: warning: function 'loadTexture' has cognitive complexity of 70 (threshold 25) [readability-function-cognitive-complexity] 38 | Texture *loadTexture(const std::string &imgFilename, | ^ /code/src/toolbox/gl/loading.cpp:50:13: note: +1, including nesting penalty of 0, nesting level increased to 1 50 | if (img) | ^ /code/src/toolbox/gl/loading.cpp:52:17: note: +2, including nesting penalty of 1, nesting level increased to 2 52 | if (cfg.premultiplyAlpha) | ^ /code/src/toolbox/gl/loading.cpp:76:13: note: +1, nesting level increased to 1 76 | else | ^ /code/src/toolbox/gl/loading.cpp:82:13: note: +1, including nesting penalty of 0, nesting level increased to 1 82 | if (texture && atlasFilename != "") | ^ /code/src/toolbox/gl/loading.cpp:82:25: note: +1 82 | if (texture && atlasFilename != "") | ^ /code/src/toolbox/gl/loading.cpp:88:17: note: +2, including nesting penalty of 1, nesting level increased to 2 88 | if (yourgame::file::readFile(atlasFilename, atlasFile)) | ^ /code/src/toolbox/gl/loading.cpp:92:17: note: +1, nesting level increased to 2 92 | else | ^ /code/src/toolbox/gl/loading.cpp:99:21: note: +3, including nesting penalty of 2, nesting level increased to 3 99 | catch (std::exception &e) | ^ /code/src/toolbox/gl/loading.cpp:105:17: note: +2, including nesting penalty of 1, nesting level increased to 2 105 | if (jParsed) | ^ /code/src/toolbox/gl/loading.cpp:108:21: note: +3, including nesting penalty of 2, nesting level increased to 3 108 | if (jAtlas.contains("frames") && jAtlas["frames"].is_array()) | ^ /code/src/toolbox/gl/loading.cpp:108:51: note: +1 108 | if (jAtlas.contains("frames") && jAtlas["frames"].is_array()) | ^ /code/src/toolbox/gl/loading.cpp:112:29: note: +4, including nesting penalty of 3, nesting level increased to 4 112 | for (auto &jFrame : jAtlas["frames"]) | ^ /code/src/toolbox/gl/loading.cpp:122:33: note: +5, including nesting penalty of 4, nesting level increased to 5 122 | if (rotated) | ^ /code/src/toolbox/gl/loading.cpp:127:33: note: +1, nesting level increased to 5 127 | else | ^ /code/src/toolbox/gl/loading.cpp:141:25: note: +4, including nesting penalty of 3, nesting level increased to 4 141 | catch (std::exception &e) | ^ /code/src/toolbox/gl/loading.cpp:147:26: note: +1, nesting level increased to 3 147 | else if (jAtlas.contains("frames") && jAtlas["frames"].is_object()) | ^ /code/src/toolbox/gl/loading.cpp:147:56: note: +1 147 | else if (jAtlas.contains("frames") && jAtlas["frames"].is_object()) | ^ /code/src/toolbox/gl/loading.cpp:151:29: note: +4, including nesting penalty of 3, nesting level increased to 4 151 | for (auto &jFrame : jAtlas["frames"].items()) | ^ /code/src/toolbox/gl/loading.cpp:161:33: note: +5, including nesting penalty of 4, nesting level increased to 5 161 | if (rotated) | ^ /code/src/toolbox/gl/loading.cpp:166:33: note: +1, nesting level increased to 5 166 | else | ^ /code/src/toolbox/gl/loading.cpp:180:25: note: +4, including nesting penalty of 3, nesting level increased to 4 180 | catch (std::exception &e) | ^ /code/src/toolbox/gl/loading.cpp:186:26: note: +1, nesting level increased to 3 186 | else if (jAtlas.contains("textures") && jAtlas["textures"].is_array()) | ^ /code/src/toolbox/gl/loading.cpp:186:58: note: +1 186 | else if (jAtlas.contains("textures") && jAtlas["textures"].is_array()) | ^ /code/src/toolbox/gl/loading.cpp:192:29: note: +4, including nesting penalty of 3, nesting level increased to 4 192 | for (auto &jTex : jAtlas["textures"]) | ^ /code/src/toolbox/gl/loading.cpp:194:33: note: +5, including nesting penalty of 4, nesting level increased to 5 194 | if (yourgame::file::getFileNameWithoutExtension(imgFilename) == | ^ /code/src/toolbox/gl/loading.cpp:197:37: note: +6, including nesting penalty of 5, nesting level increased to 6 197 | for (auto &jImg : jTex.at("images")) | ^ /code/src/toolbox/gl/loading.cpp:210:25: note: +4, including nesting penalty of 3, nesting level increased to 4 210 | catch (std::exception &e) | ^ /code/src/toolbox/gl/loading.cpp:215:21: note: +1, nesting level increased to 3 215 | else | ^ /code/src/toolbox/gl/loading.cpp:44:25: warning: no header providing "uint8_t" is directly included [misc-include-cleaner] 20 | std::vector imgData; | ^ /code/src/toolbox/gl/loading.cpp:47:29: warning: no header providing "yourgame::util::Image" is directly included [misc-include-cleaner] 27 | yourgame::util::Image *img = | ^ /code/src/toolbox/gl/loading.cpp:50:17: warning: implicit conversion 'yourgame::util::Image *' -> 'bool' [readability-implicit-bool-conversion] 50 | if (img) | ^ | != nullptr /code/src/toolbox/gl/loading.cpp:57:34: warning: no header providing "std::pair" is directly included [misc-include-cleaner] 21 | std::vector> texParamI = {{GL_TEXTURE_MIN_FILTER, cfg.minMagFilter}, | ^ /code/src/toolbox/gl/loading.cpp:74:17: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory] 74 | delete img; | ^ ~~~ /code/src/toolbox/gl/loading.cpp:47:13: note: variable declared here 47 | yourgame::util::Image *img = | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 48 | yourgame::util::Image::fromMemoryEncoded(imgData.data(), imgData.size(), true); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/gl/loading.cpp:78:32: warning: no header providing "yourgame::log::warn" is directly included [misc-include-cleaner] 27 | yourgame::log::warn("loadTexture(): failed to load image file %v", imgFilename); | ^ /code/src/toolbox/gl/loading.cpp:82:17: warning: implicit conversion 'Texture *' -> 'bool' [readability-implicit-bool-conversion] 82 | if (texture && atlasFilename != "") | ^ | ( != nullptr) /code/src/toolbox/gl/loading.cpp:82:28: warning: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty] 82 | if (texture && atlasFilename != "") | ^~~~~~~~~~~~~~~~~~~ | !atlasFilename.empty() /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:1220:7: note: method 'basic_string'::empty() defined here 1220 | empty() const _GLIBCXX_NOEXCEPT | ^ /code/src/toolbox/gl/loading.cpp:88:21: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 88 | if (yourgame::file::readFile(atlasFilename, atlasFile)) | ^ | != 0 /code/src/toolbox/gl/loading.cpp:112:29: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 112 | for (auto &jFrame : jAtlas["frames"]) | ^ /code/src/toolbox/gl/loading.cpp:114:33: warning: variable 'rotated' of type 'bool' can be declared 'const' [misc-const-correctness] 114 | bool rotated = jFrame.at("rotated").get(); | ^ | const /code/src/toolbox/gl/loading.cpp:115:37: warning: variable 'pixelWidth' is not initialized [cppcoreguidelines-init-variables] 115 | int pixelWidth; | ^ | = 0 /code/src/toolbox/gl/loading.cpp:116:37: warning: variable 'pixelHeight' is not initialized [cppcoreguidelines-init-variables] 116 | int pixelHeight; | ^ | = 0 /code/src/toolbox/gl/loading.cpp:151:29: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 151 | for (auto &jFrame : jAtlas["frames"].items()) | ^ /code/src/toolbox/gl/loading.cpp:153:33: warning: variable 'rotated' of type 'bool' can be declared 'const' [misc-const-correctness] 153 | bool rotated = jFrame.value().at("rotated").get(); | ^ | const /code/src/toolbox/gl/loading.cpp:154:37: warning: variable 'pixelWidth' is not initialized [cppcoreguidelines-init-variables] 154 | int pixelWidth; | ^ | = 0 /code/src/toolbox/gl/loading.cpp:155:37: warning: variable 'pixelHeight' is not initialized [cppcoreguidelines-init-variables] 155 | int pixelHeight; | ^ | = 0 /code/src/toolbox/gl/loading.cpp:197:37: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 197 | for (auto &jImg : jTex.at("images")) | ^ /code/src/toolbox/gl/loading.cpp:237:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 237 | for (int i = 0; i < filenames.size(); i++) | ^ /code/src/toolbox/gl/loading.cpp:239:22: warning: the variable 'f' is copy-constructed from a const reference but is only used as const reference; consider making it a const reference [performance-unnecessary-copy-initialization] 239 | auto f = filenames[i]; | ^ | const & /code/src/toolbox/gl/loading.cpp:246:21: warning: implicit conversion 'yourgame::util::Image *' -> 'bool' [readability-implicit-bool-conversion] 246 | if (img) | ^ | != nullptr /code/src/toolbox/gl/loading.cpp:263:21: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory] 263 | delete img; | ^ ~~~ /code/src/toolbox/gl/loading.cpp:243:17: note: variable declared here 243 | yourgame::util::Image *img = | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 244 | yourgame::util::Image::fromMemoryEncoded(imgData.data(), imgData.size(), false); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/gl/loading.cpp:268:21: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory] 268 | delete texture; | ^ ~~~~~~~ /code/src/toolbox/gl/loading.cpp:235:13: note: variable declared here 235 | Texture *texture = Texture::make(GL_TEXTURE_CUBE_MAP, cfg.unit, texParamI); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/gl/loading.cpp:276:9: warning: no header providing "yourgame::gl::Shader" is directly included [misc-include-cleaner] 27 | Shader *loadShader(const std::vector> &shaderFilenames, | ^ /code/src/toolbox/gl/loading.cpp:276:28: warning: 2 adjacent parameters of 'loadShader' of similar type ('const std::vector> &') are easily swapped by mistake [bugprone-easily-swappable-parameters] 276 | Shader *loadShader(const std::vector> &shaderFilenames, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 277 | const std::vector> &attrLocs, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/gl/loading.cpp:276:79: note: the first parameter in the range is 'shaderFilenames' 276 | Shader *loadShader(const std::vector> &shaderFilenames, | ^~~~~~~~~~~~~~~ /code/src/toolbox/gl/loading.cpp:277:79: note: the last parameter in the range is 'attrLocs' 277 | const std::vector> &attrLocs, | ^~~~~~~~ /code/src/toolbox/gl/loading.cpp:282:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 282 | for (const auto &shdrFile : shaderFilenames) | ^ /code/src/toolbox/gl/loading.cpp:286:17: warning: variable 'shdrStr' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness] 286 | std::string shdrStr = std::string(shdrCode.begin(), shdrCode.end()); | ^ | const /code/src/toolbox/gl/loading.cpp:287:29: warning: use emplace_back instead of push_back [hicpp-use-emplace,modernize-use-emplace] 287 | shaderCodes.push_back(std::make_pair(shdrFile.first, shdrStr)); | ^~~~~~~~~~~~~~~~~~~~~~~~ ~ | emplace_back /code/src/toolbox/gl/loading.cpp:287:44: warning: no header providing "std::make_pair" is directly included [misc-include-cleaner] 287 | shaderCodes.push_back(std::make_pair(shdrFile.first, shdrStr)); | ^ /code/src/toolbox/gl/loading.cpp:293:39: warning: 2 adjacent parameters of 'loadShaderFromStrings' of similar type ('const std::vector> &') are easily swapped by mistake [bugprone-easily-swappable-parameters] 293 | Shader *loadShaderFromStrings(const std::vector> &shaderCodes, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 294 | const std::vector> &attrLocs, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/gl/loading.cpp:293:90: note: the first parameter in the range is 'shaderCodes' 293 | Shader *loadShaderFromStrings(const std::vector> &shaderCodes, | ^~~~~~~~~~~ /code/src/toolbox/gl/loading.cpp:294:90: note: the last parameter in the range is 'attrLocs' 294 | const std::vector> &attrLocs, | ^~~~~~~~ /code/src/toolbox/gl/loading.cpp:300:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 300 | for (auto &shaderCode : shaderCodesWithVersion) | ^ /code/src/toolbox/gl/loading.cpp:307:18: warning: implicit conversion 'Shader *' -> 'bool' [readability-implicit-bool-conversion] 307 | if (!newShader) | ~^ | == nullptr /code/src/toolbox/gl/loading.cpp:309:32: warning: no header providing "yourgame::log::error" is directly included [misc-include-cleaner] 309 | yourgame::log::error("shader failed to make: %v", shaderErrLog); | ^ /code/src/toolbox/gl/loading.cpp:315:9: warning: no header providing "yourgame::gl::Geometry" is directly included [misc-include-cleaner] 27 | Geometry *loadGeometry(const std::string &objFilename, | ^ /code/src/toolbox/gl/loading.cpp:318:28: warning: no header providing "yourgame::log::debug" is directly included [misc-include-cleaner] 318 | yourgame::log::debug("loading geometry %v...", objFilename); | ^ /code/src/toolbox/gl/loading.cpp:321:17: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 321 | if (yourgame::file::readFile(objFilename, objData)) | ^ | != 0 /code/src/toolbox/gl/loading.cpp:326:13: warning: variable 'objStr' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness] 326 | std::string objStr(objData.begin(), objData.end()); | ^ | const /code/src/toolbox/gl/loading.cpp:328:25: warning: redundant string initialization [readability-redundant-string-init] 328 | std::string mtlStr = ""; | ^~~~~~~~~~~ | mtlStr /code/src/toolbox/gl/loading.cpp:332:21: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 332 | if (yourgame::file::readFile(mtlFilename, mtlData)) | ^ | != 0 /code/src/toolbox/gl/loading.cpp:343:19: warning: function 'loadGeometryFromStrings' has cognitive complexity of 46 (threshold 25) [readability-function-cognitive-complexity] 343 | Geometry *loadGeometryFromStrings(const std::string &objCode, | ^ /code/src/toolbox/gl/loading.cpp:350:13: note: +1, including nesting penalty of 0, nesting level increased to 1 350 | if (!objRdr.ParseFromString(objCode, mtlCode, objRdrCfg)) | ^ /code/src/toolbox/gl/loading.cpp:381:13: note: +1, including nesting penalty of 0, nesting level increased to 1 381 | for (auto const &shape : shapes) | ^ /code/src/toolbox/gl/loading.cpp:386:17: note: +2, including nesting penalty of 1, nesting level increased to 2 386 | for (auto const &idx : shape.mesh.indices) | ^ /code/src/toolbox/gl/loading.cpp:393:21: note: +3, including nesting penalty of 2, nesting level increased to 3 393 | if (mapRet.second) // new unique vertex | ^ /code/src/toolbox/gl/loading.cpp:404:29: note: +4, including nesting penalty of 3, nesting level increased to 4 404 | if (materialId > -1 && materialId < materials.size()) | ^ /code/src/toolbox/gl/loading.cpp:404:49: note: +1 404 | if (materialId > -1 && materialId < materials.size()) | ^ /code/src/toolbox/gl/loading.cpp:412:29: note: +1, nesting level increased to 4 412 | else | ^ /code/src/toolbox/gl/loading.cpp:420:29: note: +4, including nesting penalty of 3, nesting level increased to 4 420 | if (attribs.normals.size() > 0) | ^ /code/src/toolbox/gl/loading.cpp:428:29: note: +4, including nesting penalty of 3, nesting level increased to 4 428 | if (attribs.texcoords.size() > 0) | ^ /code/src/toolbox/gl/loading.cpp:434:25: note: +4, including nesting penalty of 3, nesting level increased to 4 434 | catch (...) | ^ /code/src/toolbox/gl/loading.cpp:441:21: note: +1, nesting level increased to 3 441 | else // reuse unique vertex index | ^ /code/src/toolbox/gl/loading.cpp:455:17: note: +2, including nesting penalty of 1, nesting level increased to 2 455 | for (auto const &idx : shape.lines.indices) | ^ /code/src/toolbox/gl/loading.cpp:460:21: note: +3, including nesting penalty of 2, nesting level increased to 3 460 | if (mapRet.second) // new unique vertex | ^ /code/src/toolbox/gl/loading.cpp:473:29: note: +4, including nesting penalty of 3, nesting level increased to 4 473 | if (attribs.normals.size() > 0) | ^ /code/src/toolbox/gl/loading.cpp:481:29: note: +4, including nesting penalty of 3, nesting level increased to 4 481 | if (attribs.texcoords.size() > 0) | ^ /code/src/toolbox/gl/loading.cpp:487:25: note: +4, including nesting penalty of 3, nesting level increased to 4 487 | catch (...) | ^ /code/src/toolbox/gl/loading.cpp:494:21: note: +1, nesting level increased to 3 494 | else // reuse unique vertex index | ^ /code/src/toolbox/gl/loading.cpp:522:13: note: +1, including nesting penalty of 0, nesting level increased to 1 522 | if (vertNormSize > 0) | ^ /code/src/toolbox/gl/loading.cpp:528:13: note: +1, including nesting penalty of 0, nesting level increased to 1 528 | if (vertTexcoordsSize > 0) | ^ /code/src/toolbox/gl/loading.cpp:352:32: warning: no header providing "yourgame::log::error" is directly included [misc-include-cleaner] 352 | yourgame::log::error("tinyobj::ObjReader::ParseFromString failed"); | ^ /code/src/toolbox/gl/loading.cpp:386:17: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 386 | for (auto const &idx : shape.mesh.indices) | ^ /code/src/toolbox/gl/loading.cpp:390:21: warning: variable 'materialId' of type 'int' can be declared 'const' [misc-const-correctness] 390 | int materialId = (shape.mesh.material_ids.at(shapeMeshReadIdx / 3U)); | ^ | const /code/src/toolbox/gl/loading.cpp:398:50: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 398 | objPosData.push_back((GLfloat)attribs.vertices.at(idx.vertex_index * 3)); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:398:79: warning: performing an implicit widening conversion to type 'size_type' (aka 'unsigned long') of a multiplication performed in type 'int' [bugprone-implicit-widening-of-multiplication-result] 398 | objPosData.push_back((GLfloat)attribs.vertices.at(idx.vertex_index * 3)); | ^ /code/src/toolbox/gl/loading.cpp:398:79: note: make conversion explicit to silence this warning 20 | objPosData.push_back((GLfloat)attribs.vertices.at(idx.vertex_index * 3)); | ^~~~~~~~~~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:398:79: note: perform multiplication in a wider type 398 | objPosData.push_back((GLfloat)attribs.vertices.at(idx.vertex_index * 3)); | ^~~~~~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:399:50: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 399 | objPosData.push_back((GLfloat)attribs.vertices.at(idx.vertex_index * 3 + 1)); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:400:50: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 400 | objPosData.push_back((GLfloat)attribs.vertices.at(idx.vertex_index * 3 + 2)); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:406:57: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 406 | objColordData.push_back((GLfloat)materials.at(materialId).diffuse[0]); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:407:57: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 407 | objColordData.push_back((GLfloat)materials.at(materialId).diffuse[1]); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:408:57: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 408 | objColordData.push_back((GLfloat)materials.at(materialId).diffuse[2]); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:414:57: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 414 | objColordData.push_back((GLfloat)attribs.colors.at(idx.vertex_index * 3)); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:414:84: warning: performing an implicit widening conversion to type 'size_type' (aka 'unsigned long') of a multiplication performed in type 'int' [bugprone-implicit-widening-of-multiplication-result] 414 | objColordData.push_back((GLfloat)attribs.colors.at(idx.vertex_index * 3)); | ^ /code/src/toolbox/gl/loading.cpp:414:84: note: make conversion explicit to silence this warning 414 | objColordData.push_back((GLfloat)attribs.colors.at(idx.vertex_index * 3)); | ^~~~~~~~~~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:414:84: note: perform multiplication in a wider type 414 | objColordData.push_back((GLfloat)attribs.colors.at(idx.vertex_index * 3)); | ^~~~~~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:415:57: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 415 | objColordData.push_back((GLfloat)attribs.colors.at(idx.vertex_index * 3 + 1)); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:416:57: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 416 | objColordData.push_back((GLfloat)attribs.colors.at(idx.vertex_index * 3 + 2)); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:420:33: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] 420 | if (attribs.normals.size() > 0) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | !attribs.normals.empty() /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_vector.h:1088:7: note: method 'vector'::empty() defined here 1088 | empty() const _GLIBCXX_NOEXCEPT | ^ /code/src/toolbox/gl/loading.cpp:422:57: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 422 | objNormalData.push_back((GLfloat)attribs.normals.at(idx.normal_index * 3)); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:422:85: warning: performing an implicit widening conversion to type 'size_type' (aka 'unsigned long') of a multiplication performed in type 'int' [bugprone-implicit-widening-of-multiplication-result] 422 | objNormalData.push_back((GLfloat)attribs.normals.at(idx.normal_index * 3)); | ^ /code/src/toolbox/gl/loading.cpp:422:85: note: make conversion explicit to silence this warning 422 | objNormalData.push_back((GLfloat)attribs.normals.at(idx.normal_index * 3)); | ^~~~~~~~~~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:422:85: note: perform multiplication in a wider type 422 | objNormalData.push_back((GLfloat)attribs.normals.at(idx.normal_index * 3)); | ^~~~~~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:423:57: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 423 | objNormalData.push_back((GLfloat)attribs.normals.at(idx.normal_index * 3 + 1)); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:424:57: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 424 | objNormalData.push_back((GLfloat)attribs.normals.at(idx.normal_index * 3 + 2)); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:428:33: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] 428 | if (attribs.texcoords.size() > 0) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | !attribs.texcoords.empty() /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_vector.h:1088:7: note: method 'vector'::empty() defined here 1088 | empty() const _GLIBCXX_NOEXCEPT | ^ /code/src/toolbox/gl/loading.cpp:430:59: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 430 | objTexCoordData.push_back((GLfloat)attribs.texcoords.at(idx.texcoord_index * 2)); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:430:89: warning: performing an implicit widening conversion to type 'size_type' (aka 'unsigned long') of a multiplication performed in type 'int' [bugprone-implicit-widening-of-multiplication-result] 430 | objTexCoordData.push_back((GLfloat)attribs.texcoords.at(idx.texcoord_index * 2)); | ^ /code/src/toolbox/gl/loading.cpp:430:89: note: make conversion explicit to silence this warning 430 | objTexCoordData.push_back((GLfloat)attribs.texcoords.at(idx.texcoord_index * 2)); | ^~~~~~~~~~~~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:430:89: note: perform multiplication in a wider type 430 | objTexCoordData.push_back((GLfloat)attribs.texcoords.at(idx.texcoord_index * 2)); | ^~~~~~~~~~~~~~~~~~ | static_cast() /code/src/toolbox/gl/loading.cpp:431:59: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 431 | objTexCoordData.push_back((GLfloat)attribs.texcoords.at(idx.texcoord_index * 2 + 1)); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:443:46: warning: C-style casts are discouraged; use static_cast [google-readability-casting] 443 | objIdxData.push_back((GLuint)(mapRet.first->second)); | ^~~~~~~~ | static_cast /code/src/toolbox/gl/loading.cpp:455:17: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 455 | for (auto const &idx : shape.lines.indices) | ^ /code/src/toolbox/gl/loading.cpp:457:21: warning: variable 'materialId' of type 'int' can be declared 'const' [misc-const-correctness] 457 | int materialId = -1; | ^ | const /code/src/toolbox/gl/loading.cpp:465:50: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 465 | objPosData.push_back((GLfloat)attribs.vertices.at(idx.vertex_index * 3)); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:465:79: warning: performing an implicit widening conversion to type 'size_type' (aka 'unsigned long') of a multiplication performed in type 'int' [bugprone-implicit-widening-of-multiplication-result] 465 | objPosData.push_back((GLfloat)attribs.vertices.at(idx.vertex_index * 3)); | ^ /code/src/toolbox/gl/loading.cpp:465:79: note: make conversion explicit to silence this warning 465 | objPosData.push_back((GLfloat)attribs.vertices.at(idx.vertex_index * 3)); | ^~~~~~~~~~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:465:79: note: perform multiplication in a wider type 465 | objPosData.push_back((GLfloat)attribs.vertices.at(idx.vertex_index * 3)); | ^~~~~~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:466:50: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 466 | objPosData.push_back((GLfloat)attribs.vertices.at(idx.vertex_index * 3 + 1)); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:467:50: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 467 | objPosData.push_back((GLfloat)attribs.vertices.at(idx.vertex_index * 3 + 2)); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:468:53: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 468 | objColordData.push_back((GLfloat)attribs.colors.at(idx.vertex_index * 3)); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:468:80: warning: performing an implicit widening conversion to type 'size_type' (aka 'unsigned long') of a multiplication performed in type 'int' [bugprone-implicit-widening-of-multiplication-result] 468 | objColordData.push_back((GLfloat)attribs.colors.at(idx.vertex_index * 3)); | ^ /code/src/toolbox/gl/loading.cpp:468:80: note: make conversion explicit to silence this warning 468 | objColordData.push_back((GLfloat)attribs.colors.at(idx.vertex_index * 3)); | ^~~~~~~~~~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:468:80: note: perform multiplication in a wider type 468 | objColordData.push_back((GLfloat)attribs.colors.at(idx.vertex_index * 3)); | ^~~~~~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:469:53: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 469 | objColordData.push_back((GLfloat)attribs.colors.at(idx.vertex_index * 3 + 1)); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:470:53: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 470 | objColordData.push_back((GLfloat)attribs.colors.at(idx.vertex_index * 3 + 2)); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:473:33: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] 473 | if (attribs.normals.size() > 0) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | !attribs.normals.empty() /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_vector.h:1088:7: note: method 'vector'::empty() defined here 1088 | empty() const _GLIBCXX_NOEXCEPT | ^ /code/src/toolbox/gl/loading.cpp:475:57: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 475 | objNormalData.push_back((GLfloat)attribs.normals.at(idx.normal_index * 3)); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:475:85: warning: performing an implicit widening conversion to type 'size_type' (aka 'unsigned long') of a multiplication performed in type 'int' [bugprone-implicit-widening-of-multiplication-result] 475 | objNormalData.push_back((GLfloat)attribs.normals.at(idx.normal_index * 3)); | ^ /code/src/toolbox/gl/loading.cpp:475:85: note: make conversion explicit to silence this warning 475 | objNormalData.push_back((GLfloat)attribs.normals.at(idx.normal_index * 3)); | ^~~~~~~~~~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:475:85: note: perform multiplication in a wider type 475 | objNormalData.push_back((GLfloat)attribs.normals.at(idx.normal_index * 3)); | ^~~~~~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:476:57: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 476 | objNormalData.push_back((GLfloat)attribs.normals.at(idx.normal_index * 3 + 1)); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:477:57: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 477 | objNormalData.push_back((GLfloat)attribs.normals.at(idx.normal_index * 3 + 2)); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:481:33: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] 481 | if (attribs.texcoords.size() > 0) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | !attribs.texcoords.empty() /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_vector.h:1088:7: note: method 'vector'::empty() defined here 1088 | empty() const _GLIBCXX_NOEXCEPT | ^ /code/src/toolbox/gl/loading.cpp:483:59: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 483 | objTexCoordData.push_back((GLfloat)attribs.texcoords.at(idx.texcoord_index * 2)); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:483:89: warning: performing an implicit widening conversion to type 'size_type' (aka 'unsigned long') of a multiplication performed in type 'int' [bugprone-implicit-widening-of-multiplication-result] 483 | objTexCoordData.push_back((GLfloat)attribs.texcoords.at(idx.texcoord_index * 2)); | ^ /code/src/toolbox/gl/loading.cpp:483:89: note: make conversion explicit to silence this warning 483 | objTexCoordData.push_back((GLfloat)attribs.texcoords.at(idx.texcoord_index * 2)); | ^~~~~~~~~~~~~~~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:483:89: note: perform multiplication in a wider type 483 | objTexCoordData.push_back((GLfloat)attribs.texcoords.at(idx.texcoord_index * 2)); | ^~~~~~~~~~~~~~~~~~ | static_cast() /code/src/toolbox/gl/loading.cpp:484:59: warning: C-style casts are discouraged; use static_cast (if needed, the cast may be redundant) [google-readability-casting] 484 | objTexCoordData.push_back((GLfloat)attribs.texcoords.at(idx.texcoord_index * 2 + 1)); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:496:50: warning: C-style casts are discouraged; use static_cast [google-readability-casting] 496 | objLineIdxData.push_back((GLuint)(mapRet.first->second)); | ^~~~~~~~ | static_cast /code/src/toolbox/gl/loading.cpp:512:25: warning: no header providing "yourgame::gl::Shape" is directly included [misc-include-cleaner] 27 | std::vector arDescrs = | ^ /code/src/toolbox/gl/loading.cpp:513:62: warning: C-style casts are discouraged; use static_cast/const_cast/reinterpret_cast [google-readability-casting] 513 | {{attrLocPosition, 3, GL_FLOAT, GL_FALSE, 0, (void *)0, 0}, | ^ /code/src/toolbox/gl/loading.cpp:513:70: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 513 | {{attrLocPosition, 3, GL_FLOAT, GL_FALSE, 0, (void *)0, 0}, | ^ | nullptr /code/src/toolbox/gl/loading.cpp:514:59: warning: C-style casts are discouraged; use static_cast/const_cast/reinterpret_cast [google-readability-casting] 514 | {attrLocColor, 3, GL_FLOAT, GL_FALSE, 0, (void *)0, 0}}; | ^ /code/src/toolbox/gl/loading.cpp:514:67: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 514 | {attrLocColor, 3, GL_FLOAT, GL_FALSE, 0, (void *)0, 0}}; | ^ | nullptr /code/src/toolbox/gl/loading.cpp:518:55: warning: narrowing conversion from 'unsigned long' to signed type 'GLsizeiptr' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 518 | newGeo->addBuffer("pos", GL_ARRAY_BUFFER, vertPosSize, objPosData.data(), GL_STATIC_DRAW); | ^ /code/src/toolbox/gl/loading.cpp:519:57: warning: narrowing conversion from 'unsigned long' to signed type 'GLsizeiptr' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 519 | newGeo->addBuffer("color", GL_ARRAY_BUFFER, vertColorSize, objColordData.data(), GL_STATIC_DRAW); | ^ /code/src/toolbox/gl/loading.cpp:520:63: warning: narrowing conversion from 'unsigned long' to signed type 'GLsizeiptr' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 520 | newGeo->addBuffer("idx", GL_ELEMENT_ARRAY_BUFFER, vertIdxSize, objIdxData.data(), GL_STATIC_DRAW); | ^ /code/src/toolbox/gl/loading.cpp:521:68: warning: narrowing conversion from 'unsigned long' to signed type 'GLsizeiptr' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 521 | newGeo->addBuffer("idxLines", GL_ELEMENT_ARRAY_BUFFER, vertLineIdxSize, objLineIdxData.data(), GL_STATIC_DRAW); | ^ /code/src/toolbox/gl/loading.cpp:524:60: warning: narrowing conversion from 'unsigned long' to signed type 'GLsizeiptr' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 524 | newGeo->addBuffer("norm", GL_ARRAY_BUFFER, vertNormSize, objNormalData.data(), GL_STATIC_DRAW); | ^ /code/src/toolbox/gl/loading.cpp:525:78: warning: C-style casts are discouraged; use static_cast/const_cast/reinterpret_cast [google-readability-casting] 525 | arDescrs.push_back({attrLocNormal, 3, GL_FLOAT, GL_FALSE, 0, (void *)0, 0}); | ^ /code/src/toolbox/gl/loading.cpp:525:86: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 525 | arDescrs.push_back({attrLocNormal, 3, GL_FLOAT, GL_FALSE, 0, (void *)0, 0}); | ^ | nullptr /code/src/toolbox/gl/loading.cpp:526:31: warning: use emplace_back instead of push_back [hicpp-use-emplace,modernize-use-emplace] 526 | arBufferNames.push_back("norm"); | ^~~~~~~~~~ | emplace_back( /code/src/toolbox/gl/loading.cpp:530:65: warning: narrowing conversion from 'unsigned long' to signed type 'GLsizeiptr' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 530 | newGeo->addBuffer("texcoords", GL_ARRAY_BUFFER, vertTexcoordsSize, objTexCoordData.data(), GL_STATIC_DRAW); | ^ /code/src/toolbox/gl/loading.cpp:531:81: warning: C-style casts are discouraged; use static_cast/const_cast/reinterpret_cast [google-readability-casting] 531 | arDescrs.push_back({attrLocTexcoords, 2, GL_FLOAT, GL_FALSE, 0, (void *)0, 0}); | ^ /code/src/toolbox/gl/loading.cpp:531:89: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 531 | arDescrs.push_back({attrLocTexcoords, 2, GL_FLOAT, GL_FALSE, 0, (void *)0, 0}); | ^ | nullptr /code/src/toolbox/gl/loading.cpp:532:31: warning: use emplace_back instead of push_back [hicpp-use-emplace,modernize-use-emplace] 532 | arBufferNames.push_back("texcoords"); | ^~~~~~~~~~ | emplace_back( /code/src/toolbox/gl/loading.cpp:536:95: warning: C-style casts are discouraged; use static_cast [google-readability-casting] 536 | newGeo->addShape("main", arDescrs, arBufferNames, {GL_UNSIGNED_INT, GL_TRIANGLES, (GLsizei)objIdxData.size()}, "idx"); | ^~~~~~~~~ | static_cast( ) /code/src/toolbox/gl/loading.cpp:539:92: warning: C-style casts are discouraged; use static_cast [google-readability-casting] 539 | newGeo->addShape("lines", arDescrs, arBufferNames, {GL_UNSIGNED_INT, GL_LINES, (GLsizei)objLineIdxData.size()}, "idxLines"); | ^~~~~~~~~ | static_cast( ) /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/toolbox/math/particles.cpp /code/include/toolbox/yourgame/math/particles.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_PARTICLES_H | ^~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_PARTICLES_H 21 | #define YOURGAME_PARTICLES_H | ~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_PARTICLES_H /code/include/toolbox/yourgame/math/particles.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | 24 | #include | ~~~~~~~~ | 25 | #include | ~~~~~~~ | 26 | #include | ~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/math/particles.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/toolbox/yourgame/math/particles.h:38:15: warning: destructor of 'Particles' is public and non-virtual [cppcoreguidelines-virtual-class-destructor] 38 | class Particles | ^ /code/include/toolbox/yourgame/math/particles.h:38:15: note: make it public and virtual 38 | class Particles | ^ 39 | { 40 | public: | /code/include/toolbox/yourgame/math/particles.h:47:20: warning: accessing fields in struct 'Config' is inefficient due to padding; only needs 103 bytes but is using 104 bytes [altera-struct-pack-align] 47 | struct Config | ^ /code/include/toolbox/yourgame/math/particles.h:47:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'Config' /code/include/toolbox/yourgame/math/particles.h:47:20: warning: accessing fields in struct 'Config' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 128 bytes [altera-struct-pack-align] 47 | struct Config | ^ /code/include/toolbox/yourgame/math/particles.h:47:20: note: use "__attribute__((aligned(128)))" to align struct 'Config' to 128 bytes /code/include/toolbox/yourgame/math/particles.h:66:13: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,hicpp-explicit-conversions] 66 | Particles(const Config cfg); | ^ | explicit /code/include/toolbox/yourgame/math/particles.h:66:23: warning: parameter 'cfg' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls] 66 | Particles(const Config cfg); | ^~~~~ /code/include/toolbox/yourgame/math/particles.h:74:20: warning: member variable 'm_cfg' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes,misc-non-private-member-variables-in-classes] 74 | Config m_cfg; | ^ /code/include/toolbox/yourgame/math/particles.h:75:36: warning: member variable 'm_positionData' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes,misc-non-private-member-variables-in-classes] 75 | std::vector m_positionData; | ^ /code/include/toolbox/yourgame/math/particles.h:76:32: warning: member variable 'm_progressData' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes,misc-non-private-member-variables-in-classes] 76 | std::vector m_progressData; | ^ /code/include/toolbox/yourgame/math/particles.h:79:20: warning: accessing fields in struct 'Part' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 64 bytes [altera-struct-pack-align] 79 | struct Part | ^ 80 | { 81 | glm::vec3 pos; 82 | glm::vec3 move; 83 | float lifetime; 84 | float totalLifeInv; 85 | float progress; 86 | }; | | __attribute__((aligned(64))) /code/include/toolbox/yourgame/math/particles.h:79:20: note: use "__attribute__((aligned(64)))" to align struct 'Part' to 64 bytes /code/src/toolbox/math/particles.cpp:22:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 22 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 23 | { | ~ 24 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/src/toolbox/math/particles.cpp:26:20: warning: random number generator seeded with a default argument will generate a predictable sequence of values [cert-msc32-c,cert-msc51-cpp] 26 | Particles::Particles(const Config cfg) : m_cfg(cfg) | ^ /code/src/toolbox/math/particles.cpp:29:29: warning: no header providing "std::uniform_real_distribution" is directly included [misc-include-cleaner] 21 | 22 | namespace yourgame 23 | { 24 | namespace math 25 | { 26 | Particles::Particles(const Config cfg) : m_cfg(cfg) 27 | { 28 | m_rndgen.seed(m_cfg.seed); 29 | m_unirnd = std::uniform_real_distribution(-1.0f, 1.0f); | ^ /code/src/toolbox/math/particles.cpp:39:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 39 | for (auto &p : m_parts) | ^ /code/src/toolbox/math/particles.cpp:48:40: warning: use emplace_back instead of push_back [hicpp-use-emplace,modernize-use-emplace] 48 | m_positionData.push_back(glm::vec4(p.pos, 0.0f)); | ^~~~~~~~~~~~~~~~~~~~ ~ | emplace_back( /code/src/toolbox/math/particles.cpp:55:36: warning: use emplace_back instead of push_back [hicpp-use-emplace,modernize-use-emplace] 55 | m_positionData.push_back(glm::vec4(p.pos, 0.0f)); | ^~~~~~~~~~~~~~~~~~~~ ~ | emplace_back( /code/src/toolbox/math/particles.cpp:65:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 65 | for (size_t i = 0; i < m_cfg.count; i++) | ^ /code/src/toolbox/math/particles.cpp:65:18: warning: no header providing "size_t" is directly included [misc-include-cleaner] 21 | for (size_t i = 0; i < m_cfg.count; i++) | ^ /code/src/toolbox/math/particles.cpp:72:17: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 72 | for (auto &p : m_parts) | ^ /code/src/toolbox/math/particles.cpp:74:21: warning: variable 'dt' of type 'float' can be declared 'const' [misc-const-correctness] 74 | float dt = (rnd1() * 0.5f + 0.5f) * p.lifetime; | ^ | const /code/src/toolbox/math/particles.cpp:83:13: warning: uninitialized record type: 'p' [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 83 | Part p; | ^ | {} /code/src/toolbox/math/particles.cpp:86:27: warning: no header providing "glm::normalize" is directly included [misc-include-cleaner] 21 | p.move = glm::normalize(m_cfg.baseDirection + (glm::vec3(rnd1(), rnd1(), rnd1()) * m_cfg.noisDirection)) * | ^ /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/quality/_build/version.cpp /code/include/base/yourgame/version.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_VERSION_H | ^~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_VERSION_H 21 | #define YOURGAME_VERSION_H | ~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_VERSION_H /code/include/base/yourgame/version.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace version | ~~~~~~~~~~~~~~~~~ | namespace yourgame::version /code/include/base/yourgame/version.h:45:34: warning: redundant string initialization [readability-redundant-string-init] 45 | extern const std::string CMAKE_GENERATOR_PLATFORM; | ^~~~~~~~~~~~~~~~~~~~~~~~ | CMAKE_GENERATOR_PLATFORM /code/quality/_build/version.cpp:22:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 22 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 23 | { | ~ 24 | namespace version | ~~~~~~~~~~~~~~~~~ | namespace yourgame::version /code/quality/_build/version.cpp:30:9: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 30 | const std::string verstr = "0.0.0"; | ^ /code/quality/_build/version.cpp:30:20: warning: no header providing "std::string" is directly included [misc-include-cleaner] 21 | 22 | namespace yourgame 23 | { 24 | namespace version 25 | { 26 | // clang-format off 27 | const int major = 0; 28 | const int minor = 0; 29 | const int patch = 0; 30 | const std::string verstr = "0.0.0"; | ^ /code/quality/_build/version.cpp:30:27: warning: initialization of 'verstr' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 30 | const std::string verstr = "0.0.0"; | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:641:7: note: possibly throwing constructor declared here 641 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^ /code/quality/_build/version.cpp:31:9: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 31 | const std::string git_commit = "241672dc87fd935b30f9da4a916d912b485b3eab"; | ^ /code/quality/_build/version.cpp:31:27: warning: initialization of 'git_commit' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 31 | const std::string git_commit = "241672dc87fd935b30f9da4a916d912b485b3eab"; | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:641:7: note: possibly throwing constructor declared here 641 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^ /code/quality/_build/version.cpp:32:9: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 32 | const std::string git_date = "2024-09-11 22:27:29 +0200"; | ^ /code/quality/_build/version.cpp:32:27: warning: initialization of 'git_date' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 32 | const std::string git_date = "2024-09-11 22:27:29 +0200"; | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:641:7: note: possibly throwing constructor declared here 641 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^ /code/quality/_build/version.cpp:33:9: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 33 | const std::string PROJECT_NAME = "yourgame"; | ^ /code/quality/_build/version.cpp:33:27: warning: initialization of 'PROJECT_NAME' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 33 | const std::string PROJECT_NAME = "yourgame"; | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:641:7: note: possibly throwing constructor declared here 641 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^ /code/quality/_build/version.cpp:34:9: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 34 | const std::string CMAKE_SYSTEM = "Linux-6.5.0-1025-azure"; | ^ /code/quality/_build/version.cpp:34:27: warning: initialization of 'CMAKE_SYSTEM' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 34 | const std::string CMAKE_SYSTEM = "Linux-6.5.0-1025-azure"; | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:641:7: note: possibly throwing constructor declared here 641 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^ /code/quality/_build/version.cpp:35:9: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 35 | const std::string CMAKE_SYSTEM_PROCESSOR = "x86_64"; | ^ /code/quality/_build/version.cpp:35:27: warning: initialization of 'CMAKE_SYSTEM_PROCESSOR' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 35 | const std::string CMAKE_SYSTEM_PROCESSOR = "x86_64"; | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:641:7: note: possibly throwing constructor declared here 641 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^ /code/quality/_build/version.cpp:36:9: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 36 | const std::string CMAKE_HOST_SYSTEM = "Linux-6.5.0-1025-azure"; | ^ /code/quality/_build/version.cpp:36:27: warning: initialization of 'CMAKE_HOST_SYSTEM' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 36 | const std::string CMAKE_HOST_SYSTEM = "Linux-6.5.0-1025-azure"; | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:641:7: note: possibly throwing constructor declared here 641 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^ /code/quality/_build/version.cpp:37:9: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 37 | const std::string CMAKE_HOST_SYSTEM_PROCESSOR = "x86_64"; | ^ /code/quality/_build/version.cpp:37:27: warning: initialization of 'CMAKE_HOST_SYSTEM_PROCESSOR' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 37 | const std::string CMAKE_HOST_SYSTEM_PROCESSOR = "x86_64"; | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:641:7: note: possibly throwing constructor declared here 641 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^ /code/quality/_build/version.cpp:38:9: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 38 | const std::string CMAKE_C_COMPILER_ID = "GNU"; | ^ /code/quality/_build/version.cpp:38:27: warning: initialization of 'CMAKE_C_COMPILER_ID' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 38 | const std::string CMAKE_C_COMPILER_ID = "GNU"; | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:641:7: note: possibly throwing constructor declared here 641 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^ /code/quality/_build/version.cpp:39:9: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 39 | const std::string CMAKE_C_COMPILER_VERSION = "13.2.0"; | ^ /code/quality/_build/version.cpp:39:27: warning: initialization of 'CMAKE_C_COMPILER_VERSION' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 39 | const std::string CMAKE_C_COMPILER_VERSION = "13.2.0"; | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:641:7: note: possibly throwing constructor declared here 641 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^ /code/quality/_build/version.cpp:40:9: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 40 | const std::string CMAKE_CXX_COMPILER_ID = "GNU"; | ^ /code/quality/_build/version.cpp:40:27: warning: initialization of 'CMAKE_CXX_COMPILER_ID' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 40 | const std::string CMAKE_CXX_COMPILER_ID = "GNU"; | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:641:7: note: possibly throwing constructor declared here 641 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^ /code/quality/_build/version.cpp:41:9: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 41 | const std::string CMAKE_CXX_COMPILER_VERSION = "13.2.0"; | ^ /code/quality/_build/version.cpp:41:27: warning: initialization of 'CMAKE_CXX_COMPILER_VERSION' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 41 | const std::string CMAKE_CXX_COMPILER_VERSION = "13.2.0"; | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:641:7: note: possibly throwing constructor declared here 641 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^ /code/quality/_build/version.cpp:42:9: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 42 | const std::string CMAKE_GENERATOR = "Unix Makefiles"; | ^ /code/quality/_build/version.cpp:42:27: warning: initialization of 'CMAKE_GENERATOR' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 42 | const std::string CMAKE_GENERATOR = "Unix Makefiles"; | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:641:7: note: possibly throwing constructor declared here 641 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^ /code/quality/_build/version.cpp:43:9: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 43 | const std::string CMAKE_GENERATOR_PLATFORM = ""; | ^ /code/quality/_build/version.cpp:43:27: warning: initialization of 'CMAKE_GENERATOR_PLATFORM' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 43 | const std::string CMAKE_GENERATOR_PLATFORM = ""; | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:641:7: note: possibly throwing constructor declared here 641 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^ /code/quality/_build/version.cpp:43:27: warning: redundant string initialization [readability-redundant-string-init] 43 | const std::string CMAKE_GENERATOR_PLATFORM = ""; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | CMAKE_GENERATOR_PLATFORM /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/toolbox/gl/particles.cpp /code/include/base/yourgame/gl_include.h:38:9: warning: header guard does not follow preferred style [llvm-header-guard] 38 | #ifndef YOURGAME_GL_INCLUDE_H | ^~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H 39 | #define YOURGAME_GL_INCLUDE_H | ~~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H /code/include/toolbox/yourgame/gl/buffer.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLBUFFER_H | ^~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_BUFFER_H 21 | #define YOURGAME_GLBUFFER_H | ~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_BUFFER_H /code/include/toolbox/yourgame/gl/buffer.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/buffer.h:29:15: warning: class 'Buffer' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 29 | class Buffer | ^ /code/include/toolbox/yourgame/gl/buffer.h:44:13: warning: constructor does not initialize these fields: m_target, m_handle, m_usage [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 44 | Buffer() {} | ^ 45 | GLenum m_target; | | {} 46 | GLuint m_handle; | | {} 47 | GLenum m_usage; | | {} /code/include/toolbox/yourgame/gl/conventions.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLCONVENTIONS_H | ^~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_CONVENTIONS_H 21 | #define YOURGAME_GLCONVENTIONS_H | ~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_CONVENTIONS_H /code/include/toolbox/yourgame/gl/conventions.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/conventions.h:38:30: warning: variable 'unifNameMvpMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 38 | extern const GLchar *unifNameMvpMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:39:30: warning: variable 'unifNameVpMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 39 | extern const GLchar *unifNameVpMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:40:30: warning: variable 'unifNameModelMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 40 | extern const GLchar *unifNameModelMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:41:30: warning: variable 'unifNameNormalMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 41 | extern const GLchar *unifNameNormalMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:42:30: warning: variable 'unifNameCameraPosition' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 42 | extern const GLchar *unifNameCameraPosition; | ^ /code/include/toolbox/yourgame/gl/conventions.h:43:30: warning: variable 'unifNameCameraTrafo' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 43 | extern const GLchar *unifNameCameraTrafo; | ^ /code/include/toolbox/yourgame/gl/conventions.h:44:30: warning: variable 'unifNameSkyRotationInv' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 44 | extern const GLchar *unifNameSkyRotationInv; | ^ /code/include/toolbox/yourgame/gl/conventions.h:45:30: warning: variable 'unifNameTextureDiffuse' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 45 | extern const GLchar *unifNameTextureDiffuse; | ^ /code/include/toolbox/yourgame/gl/conventions.h:46:30: warning: variable 'unifNameTextureSkyCube' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 46 | extern const GLchar *unifNameTextureSkyCube; | ^ /code/include/toolbox/yourgame/gl/conventions.h:47:30: warning: variable 'unifNameTextureSky' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 47 | extern const GLchar *unifNameTextureSky; | ^ /code/include/toolbox/yourgame/gl/conventions.h:48:30: warning: variable 'unifNameTextureBufferDepth' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 48 | extern const GLchar *unifNameTextureBufferDepth; | ^ /code/include/toolbox/yourgame/gl/conventions.h:49:30: warning: variable 'unifNameTextureBufferColor0' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 49 | extern const GLchar *unifNameTextureBufferColor0; | ^ /code/include/toolbox/yourgame/gl/conventions.h:50:30: warning: variable 'unifNameLightAmbient' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 50 | extern const GLchar *unifNameLightAmbient; | ^ /code/include/toolbox/yourgame/gl/conventions.h:51:30: warning: variable 'unifNameLightDiffuse' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 51 | extern const GLchar *unifNameLightDiffuse; | ^ /code/include/toolbox/yourgame/gl/conventions.h:52:30: warning: variable 'unifNameLightSpecular' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 52 | extern const GLchar *unifNameLightSpecular; | ^ /code/include/toolbox/yourgame/gl/conventions.h:53:30: warning: variable 'unifNameLightPosition' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 53 | extern const GLchar *unifNameLightPosition; | ^ /code/include/toolbox/yourgame/gl/conventions.h:54:30: warning: variable 'unifNameSubtexture' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 54 | extern const GLchar *unifNameSubtexture; | ^ /code/include/toolbox/yourgame/gl/geometry.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLGEOMETRY_H | ^~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_GEOMETRY_H 21 | #define YOURGAME_GLGEOMETRY_H | ~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_GEOMETRY_H /code/include/toolbox/yourgame/gl/geometry.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/buffer.h" 24 | #include | ~~~~~ | "yourgame/gl/shape.h" 25 | #include | ~~~~~~~~ | "yourgame/gl_include.h" 26 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | 27 | #include "yourgame/gl/buffer.h" | ~~~~~~~~~~~~~~~~~~~~~~ | 28 | #include "yourgame/gl/shape.h" | ~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/geometry.h:30:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 30 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 31 | { | ~ 32 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/geometry.h:34:15: warning: class 'Geometry' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 34 | class Geometry | ^ /code/include/toolbox/yourgame/gl/particles.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLPARTICLES_H | ^~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_PARTICLES_H 21 | #define YOURGAME_GLPARTICLES_H | ~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_PARTICLES_H /code/include/toolbox/yourgame/gl/particles.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include "yourgame/math/particles.h" | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/gl/geometry.h" 24 | #include "yourgame/gl_include.h" 25 | #include "yourgame/gl/geometry.h" | ~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/math/particles.h" /code/include/toolbox/yourgame/gl/particles.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/particles.h:31:15: warning: class 'Particles' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 31 | class Particles : public yourgame::math::Particles | ^ /code/include/toolbox/yourgame/gl/particles.h:31:15: warning: destructor of 'Particles' is public and non-virtual [cppcoreguidelines-virtual-class-destructor] /code/include/toolbox/yourgame/gl/particles.h:31:15: note: make it public and virtual 31 | class Particles : public yourgame::math::Particles | ^ /code/include/toolbox/yourgame/gl/particles.h:34:36: warning: parameter 'cfg' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls] 34 | static Particles *make(const Config cfg, yourgame::gl::Geometry *geo); | ^~~~~ /code/include/toolbox/yourgame/gl/shape.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLSHAPE_H | ^~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHAPE_H 21 | #define YOURGAME_GLSHAPE_H | ~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHAPE_H /code/include/toolbox/yourgame/gl/shape.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/buffer.h" 24 | #include "yourgame/gl_include.h" 25 | #include "yourgame/gl/buffer.h" | ~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/shape.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/shape.h:31:15: warning: class 'Shape' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 31 | class Shape | ^ /code/include/toolbox/yourgame/gl/shape.h:34:20: warning: accessing fields in struct 'ArrBufferDescr' is inefficient due to padding; only needs 29 bytes but is using 40 bytes [altera-struct-pack-align] 34 | struct ArrBufferDescr | ^ 35 | { 36 | GLuint index; 37 | GLint size; 38 | GLenum type; 39 | GLboolean normalized; 40 | GLsizei stride; 41 | const GLvoid *pointer; 42 | GLuint attribDivisor; 43 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/gl/shape.h:34:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'ArrBufferDescr' /code/include/toolbox/yourgame/gl/shape.h:34:20: warning: accessing fields in struct 'ArrBufferDescr' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 32 bytes [altera-struct-pack-align] 34 | struct ArrBufferDescr | ^ 35 | { 36 | GLuint index; 37 | GLint size; 38 | GLenum type; 39 | GLboolean normalized; 40 | GLsizei stride; 41 | const GLvoid *pointer; 42 | GLuint attribDivisor; 43 | }; | | __attribute__((aligned(32))) /code/include/toolbox/yourgame/gl/shape.h:34:20: note: use "__attribute__((aligned(32)))" to align struct 'ArrBufferDescr' to 32 bytes /code/include/toolbox/yourgame/gl/shape.h:45:20: warning: accessing fields in struct 'ElemArrBufferDescr' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 16 bytes [altera-struct-pack-align] 45 | struct ElemArrBufferDescr | ^ 46 | { 47 | GLenum type; 48 | GLenum drawMode; 49 | GLsizei numElements; 50 | }; | | __attribute__((aligned(16))) /code/include/toolbox/yourgame/gl/shape.h:45:20: note: use "__attribute__((aligned(16)))" to align struct 'ElemArrBufferDescr' to 16 bytes /code/include/toolbox/yourgame/gl/shape.h:68:13: warning: constructor does not initialize these fields: m_elArDescr, m_vaoHandle [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 68 | Shape() {} | ^ 69 | ElemArrBufferDescr m_elArDescr; | | {} 70 | GLuint m_vaoHandle; | | {} /code/include/toolbox/yourgame/math/particles.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_PARTICLES_H | ^~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_PARTICLES_H 21 | #define YOURGAME_PARTICLES_H | ~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_PARTICLES_H /code/include/toolbox/yourgame/math/particles.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | 24 | #include | ~~~~~~~~ | 25 | #include | ~~~~~~~ | 26 | #include | ~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/math/particles.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/toolbox/yourgame/math/particles.h:38:15: warning: destructor of 'Particles' is public and non-virtual [cppcoreguidelines-virtual-class-destructor] 38 | class Particles | ^ /code/include/toolbox/yourgame/math/particles.h:38:15: note: make it public and virtual 38 | class Particles | ^ 39 | { 40 | public: | /code/include/toolbox/yourgame/math/particles.h:47:20: warning: accessing fields in struct 'Config' is inefficient due to padding; only needs 103 bytes but is using 104 bytes [altera-struct-pack-align] 47 | struct Config | ^ /code/include/toolbox/yourgame/math/particles.h:47:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'Config' /code/include/toolbox/yourgame/math/particles.h:47:20: warning: accessing fields in struct 'Config' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 128 bytes [altera-struct-pack-align] 47 | struct Config | ^ /code/include/toolbox/yourgame/math/particles.h:47:20: note: use "__attribute__((aligned(128)))" to align struct 'Config' to 128 bytes /code/include/toolbox/yourgame/math/particles.h:66:13: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,hicpp-explicit-conversions] 66 | Particles(const Config cfg); | ^ | explicit /code/include/toolbox/yourgame/math/particles.h:66:23: warning: parameter 'cfg' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls] 66 | Particles(const Config cfg); | ^~~~~ /code/include/toolbox/yourgame/math/particles.h:74:20: warning: member variable 'm_cfg' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes,misc-non-private-member-variables-in-classes] 74 | Config m_cfg; | ^ /code/include/toolbox/yourgame/math/particles.h:75:36: warning: member variable 'm_positionData' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes,misc-non-private-member-variables-in-classes] 75 | std::vector m_positionData; | ^ /code/include/toolbox/yourgame/math/particles.h:76:32: warning: member variable 'm_progressData' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes,misc-non-private-member-variables-in-classes] 76 | std::vector m_progressData; | ^ /code/include/toolbox/yourgame/math/particles.h:79:20: warning: accessing fields in struct 'Part' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 64 bytes [altera-struct-pack-align] 79 | struct Part | ^ 80 | { 81 | glm::vec3 pos; 82 | glm::vec3 move; 83 | float lifetime; 84 | float totalLifeInv; 85 | float progress; 86 | }; | | __attribute__((aligned(64))) /code/include/toolbox/yourgame/math/particles.h:79:20: note: use "__attribute__((aligned(64)))" to align struct 'Part' to 64 bytes /code/src/toolbox/gl/particles.cpp:20:1: warning: #includes are not sorted properly [llvm-include-order] 20 | #include | ^ note: this fix will not be applied because it overlaps with another fix /code/src/toolbox/gl/particles.cpp:20:1: warning: included header glm.hpp is not used directly [misc-include-cleaner] 20 | #include | ^~~~~~~~~~~~~~~~~~~~~~ 21 | #include "yourgame/gl/particles.h" /code/src/toolbox/gl/particles.cpp:24:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 24 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 25 | { | ~ 26 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/src/toolbox/gl/particles.cpp:28:68: warning: no header providing "yourgame::gl::Geometry" is directly included [misc-include-cleaner] 23 | 24 | namespace yourgame 25 | { 26 | namespace gl 27 | { 28 | Particles *Particles::make(const Config cfg, yourgame::gl::Geometry *geo) | ^ /code/src/toolbox/gl/particles.cpp:30:18: warning: implicit conversion 'yourgame::gl::Geometry *' -> 'bool' [readability-implicit-bool-conversion] 30 | if (!geo) | ~^ | == nullptr /code/src/toolbox/gl/particles.cpp:35:13: warning: initializing non-owner 'Particles *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 35 | Particles *newParts = new Particles(cfg, geo); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/gl/particles.cpp:35:13: warning: use auto when initializing with new to avoid duplicating the type name [hicpp-use-auto,modernize-use-auto] 35 | Particles *newParts = new Particles(cfg, geo); | ^~~~~~~~~ | auto /code/src/toolbox/gl/particles.cpp:37:13: warning: use auto when initializing with a cast to avoid duplicating the type name [hicpp-use-auto,modernize-use-auto] 37 | GLsizei vec4Size = static_cast(sizeof(glm::vec4)); | ^~~~~~~ | auto /code/src/toolbox/gl/particles.cpp:37:65: warning: no header providing "glm::vec4" is directly included [misc-include-cleaner] 22 | #include "yourgame/gl/conventions.h" 23 | 24 | namespace yourgame 25 | { 26 | namespace gl 27 | { 28 | Particles *Particles::make(const Config cfg, yourgame::gl::Geometry *geo) 29 | { 30 | if (!geo) 31 | { 32 | return nullptr; 33 | } 34 | 35 | Particles *newParts = new Particles(cfg, geo); 36 | 37 | GLsizei vec4Size = static_cast(sizeof(glm::vec4)); | ^ /code/src/toolbox/gl/particles.cpp:41:119: warning: C-style casts are discouraged; use static_cast/const_cast/reinterpret_cast [google-readability-casting] 41 | newParts->m_geo->addBufferToShape("main", {{gl::attrLocInstModelMatCol3, 4, GL_FLOAT, GL_FALSE, vec4Size, (void *)0, 1}}, "instModelPos"); | ^ /code/src/toolbox/gl/particles.cpp:41:127: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 41 | newParts->m_geo->addBufferToShape("main", {{gl::attrLocInstModelMatCol3, 4, GL_FLOAT, GL_FALSE, vec4Size, (void *)0, 1}}, "instModelPos"); | ^ | nullptr /code/src/toolbox/gl/particles.cpp:42:122: warning: C-style casts are discouraged; use static_cast/const_cast/reinterpret_cast [google-readability-casting] 42 | newParts->m_geo->addBufferToShape("main", {{gl::attrLocInstProgress, 1, GL_FLOAT, GL_FALSE, sizeof(GLfloat), (void *)0, 1}}, "instProgress"); | ^ /code/src/toolbox/gl/particles.cpp:42:130: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 42 | newParts->m_geo->addBufferToShape("main", {{gl::attrLocInstProgress, 1, GL_FLOAT, GL_FALSE, sizeof(GLfloat), (void *)0, 1}}, "instProgress"); | ^ | nullptr /code/src/toolbox/gl/particles.cpp:54:29: warning: no header providing "yourgame::math::Particles" is directly included [misc-include-cleaner] 23 | yourgame::math::Particles::tick(dt); | ^ /code/src/toolbox/gl/particles.cpp:55:47: warning: narrowing conversion from 'unsigned long' to signed type 'GLsizeiptr' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 55 | m_geo->bufferData("instModelPos", m_positionData.size() * sizeof(m_positionData[0]), m_positionData.data()); | ^ /code/src/toolbox/gl/particles.cpp:56:47: warning: narrowing conversion from 'unsigned long' to signed type 'GLsizeiptr' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 56 | m_geo->bufferData("instProgress", m_progressData.size() * sizeof(m_progressData[0]), m_progressData.data()); | ^ /code/src/toolbox/gl/particles.cpp:65:20: warning: narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'GLsizei' (aka 'int') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 65 | return m_positionData.size(); | ^ /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/log.cpp /code/include/base_internal/yourgame_internal/log.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_INTERNAL_LOG_H | ^~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_LOG_H 21 | #define YOURGAME_INTERNAL_LOG_H | ~~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_LOG_H /code/include/base_internal/yourgame_internal/log.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace log | ~~~~~~~~~~~~~ | namespace yourgame_internal::log 26 | { 27 | void init(int argc, char *argv[]); 28 | } 29 | } // namespace yourgame_internal | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/include/base_internal/yourgame_internal/log.h:27:29: warning: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays] 27 | void init(int argc, char *argv[]); | ^ /code/include/base_internal/yourgame_internal/log.h:28:5: warning: namespace 'log' not terminated with a closing comment [llvm-namespace-comment] 28 | } | ^ | // namespace log /code/include/base_internal/yourgame_internal/log.h:25:15: note: namespace 'log' starts here 25 | namespace log | ^ /code/src/log.cpp:26:1: warning: initialization of 'elCrashHandler' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 26 | INITIALIZE_EASYLOGGINGPP | ^ /code/thirdparty/easyloggingpp/easylogging++.h:4547:36: note: expanded from macro 'INITIALIZE_EASYLOGGINGPP' 4547 | # define INITIALIZE_EASYLOGGINGPP ELPP_INIT_EASYLOGGINGPP(new el::base::Storage(el::LogBuilderPtr(new el::base::DefaultLogBuilder()))) | ^ /code/thirdparty/easyloggingpp/easylogging++.h:4540:31: note: expanded from macro 'ELPP_INIT_EASYLOGGINGPP' 4540 | el::base::debug::CrashHandler elCrashHandler(ELPP_USE_DEF_CRASH_HANDLER); \ | ^ /code/thirdparty/easyloggingpp/easylogging++.h:3622:12: note: possibly throwing constructor declared here 3622 | explicit CrashHandler(bool) {} | ^ /code/src/log.cpp:26:1: warning: initialization of 'elStorage' with static storage duration may throw an exception that cannot be caught [cert-err58-cpp] 26 | INITIALIZE_EASYLOGGINGPP | ^ /code/thirdparty/easyloggingpp/easylogging++.h:4547:36: note: expanded from macro 'INITIALIZE_EASYLOGGINGPP' 4547 | # define INITIALIZE_EASYLOGGINGPP ELPP_INIT_EASYLOGGINGPP(new el::base::Storage(el::LogBuilderPtr(new el::base::DefaultLogBuilder()))) | ^ /code/thirdparty/easyloggingpp/easylogging++.h:4538:32: note: expanded from macro 'ELPP_INIT_EASYLOGGINGPP' 4538 | el::base::type::StoragePointer elStorage(val); \ | ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr.h:214:2: note: possibly throwing constructor declared here 214 | shared_ptr(_Yp* __p) : __shared_ptr<_Tp>(__p) { } | ^ /code/src/log.cpp:26:1: warning: variable 'elCrashHandler' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 26 | INITIALIZE_EASYLOGGINGPP | ^ /code/thirdparty/easyloggingpp/easylogging++.h:4547:36: note: expanded from macro 'INITIALIZE_EASYLOGGINGPP' 4547 | # define INITIALIZE_EASYLOGGINGPP ELPP_INIT_EASYLOGGINGPP(new el::base::Storage(el::LogBuilderPtr(new el::base::DefaultLogBuilder()))) | ^ /code/thirdparty/easyloggingpp/easylogging++.h:4540:31: note: expanded from macro 'ELPP_INIT_EASYLOGGINGPP' 4540 | el::base::debug::CrashHandler elCrashHandler(ELPP_USE_DEF_CRASH_HANDLER); \ | ^ /code/src/log.cpp:26:1: warning: variable 'elStorage' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 26 | INITIALIZE_EASYLOGGINGPP | ^ /code/thirdparty/easyloggingpp/easylogging++.h:4547:36: note: expanded from macro 'INITIALIZE_EASYLOGGINGPP' 4547 | # define INITIALIZE_EASYLOGGINGPP ELPP_INIT_EASYLOGGINGPP(new el::base::Storage(el::LogBuilderPtr(new el::base::DefaultLogBuilder()))) | ^ /code/thirdparty/easyloggingpp/easylogging++.h:4538:32: note: expanded from macro 'ELPP_INIT_EASYLOGGINGPP' 4538 | el::base::type::StoragePointer elStorage(val); \ | ^ /code/src/log.cpp:26:1: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 26 | INITIALIZE_EASYLOGGINGPP | ^ /code/thirdparty/easyloggingpp/easylogging++.h:4547:36: note: expanded from macro 'INITIALIZE_EASYLOGGINGPP' 4547 | # define INITIALIZE_EASYLOGGINGPP ELPP_INIT_EASYLOGGINGPP(new el::base::Storage(el::LogBuilderPtr(new el::base::DefaultLogBuilder()))) | ^ /code/thirdparty/easyloggingpp/easylogging++.h:4537:18: note: expanded from macro 'ELPP_INIT_EASYLOGGINGPP' 4537 | namespace base { \ | ^ /code/src/log.cpp:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace log | ~~~~~~~~~~~~~ | namespace yourgame_internal::log /code/src/log.cpp:63:29: warning: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays] 63 | void init(int argc, char *argv[]) | ^ /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/toolbox/gl/init.cpp /code/include/base/yourgame/gl_include.h:38:9: warning: header guard does not follow preferred style [llvm-header-guard] 38 | #ifndef YOURGAME_GL_INCLUDE_H | ^~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H 39 | #define YOURGAME_GL_INCLUDE_H | ~~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H /code/src/toolbox/gl/init.cpp:22:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 22 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 23 | { | ~ 24 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame_internal::gl 25 | { 26 | void initState() 27 | { 28 | glClearColor(0.4f, 0.6f, 0.8f, 1.0f); 29 | 30 | glEnable(GL_DEPTH_TEST); 31 | 32 | glFrontFace(GL_CCW); 33 | glCullFace(GL_BACK); 34 | glEnable(GL_CULL_FACE); 35 | } 36 | } // namespace gl | ~~~~~~~~~~~~~~~~~ | } // namespace yourgame_internal::gl 37 | } // namespace yourgame_internal | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/toolbox/util/assets.cpp /code/include/base/yourgame/gl_include.h:38:9: warning: header guard does not follow preferred style [llvm-header-guard] 38 | #ifndef YOURGAME_GL_INCLUDE_H | ^~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H 39 | #define YOURGAME_GL_INCLUDE_H | ~~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H /code/include/base/yourgame/math.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_MATH_H | ^~~~~~~~~~~~~~~ | BASE_YOURGAME_MATH_H 21 | #define YOURGAME_MATH_H | ~~~~~~~~~~~~~~~ | BASE_YOURGAME_MATH_H /code/include/base/yourgame/math.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/base/yourgame/math.h:27:20: warning: enum 'Projection' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 27 | enum class Projection | ^ /code/include/base/yourgame/math.h:33:20: warning: enum 'Axis' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 33 | enum class Axis | ^ /code/include/toolbox/yourgame/gl/buffer.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLBUFFER_H | ^~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_BUFFER_H 21 | #define YOURGAME_GLBUFFER_H | ~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_BUFFER_H /code/include/toolbox/yourgame/gl/buffer.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/buffer.h:29:15: warning: class 'Buffer' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 29 | class Buffer | ^ /code/include/toolbox/yourgame/gl/buffer.h:44:13: warning: constructor does not initialize these fields: m_target, m_handle, m_usage [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 44 | Buffer() {} | ^ 45 | GLenum m_target; | | {} 46 | GLuint m_handle; | | {} 47 | GLenum m_usage; | | {} /code/include/toolbox/yourgame/gl/conventions.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLCONVENTIONS_H | ^~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_CONVENTIONS_H 21 | #define YOURGAME_GLCONVENTIONS_H | ~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_CONVENTIONS_H /code/include/toolbox/yourgame/gl/conventions.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/conventions.h:38:30: warning: variable 'unifNameMvpMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 38 | extern const GLchar *unifNameMvpMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:39:30: warning: variable 'unifNameVpMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 39 | extern const GLchar *unifNameVpMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:40:30: warning: variable 'unifNameModelMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 40 | extern const GLchar *unifNameModelMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:41:30: warning: variable 'unifNameNormalMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 41 | extern const GLchar *unifNameNormalMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:42:30: warning: variable 'unifNameCameraPosition' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 42 | extern const GLchar *unifNameCameraPosition; | ^ /code/include/toolbox/yourgame/gl/conventions.h:43:30: warning: variable 'unifNameCameraTrafo' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 43 | extern const GLchar *unifNameCameraTrafo; | ^ /code/include/toolbox/yourgame/gl/conventions.h:44:30: warning: variable 'unifNameSkyRotationInv' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 44 | extern const GLchar *unifNameSkyRotationInv; | ^ /code/include/toolbox/yourgame/gl/conventions.h:45:30: warning: variable 'unifNameTextureDiffuse' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 45 | extern const GLchar *unifNameTextureDiffuse; | ^ /code/include/toolbox/yourgame/gl/conventions.h:46:30: warning: variable 'unifNameTextureSkyCube' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 46 | extern const GLchar *unifNameTextureSkyCube; | ^ /code/include/toolbox/yourgame/gl/conventions.h:47:30: warning: variable 'unifNameTextureSky' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 47 | extern const GLchar *unifNameTextureSky; | ^ /code/include/toolbox/yourgame/gl/conventions.h:48:30: warning: variable 'unifNameTextureBufferDepth' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 48 | extern const GLchar *unifNameTextureBufferDepth; | ^ /code/include/toolbox/yourgame/gl/conventions.h:49:30: warning: variable 'unifNameTextureBufferColor0' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 49 | extern const GLchar *unifNameTextureBufferColor0; | ^ /code/include/toolbox/yourgame/gl/conventions.h:50:30: warning: variable 'unifNameLightAmbient' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 50 | extern const GLchar *unifNameLightAmbient; | ^ /code/include/toolbox/yourgame/gl/conventions.h:51:30: warning: variable 'unifNameLightDiffuse' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 51 | extern const GLchar *unifNameLightDiffuse; | ^ /code/include/toolbox/yourgame/gl/conventions.h:52:30: warning: variable 'unifNameLightSpecular' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 52 | extern const GLchar *unifNameLightSpecular; | ^ /code/include/toolbox/yourgame/gl/conventions.h:53:30: warning: variable 'unifNameLightPosition' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 53 | extern const GLchar *unifNameLightPosition; | ^ /code/include/toolbox/yourgame/gl/conventions.h:54:30: warning: variable 'unifNameSubtexture' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 54 | extern const GLchar *unifNameSubtexture; | ^ /code/include/toolbox/yourgame/gl/geometry.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLGEOMETRY_H | ^~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_GEOMETRY_H 21 | #define YOURGAME_GLGEOMETRY_H | ~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_GEOMETRY_H /code/include/toolbox/yourgame/gl/geometry.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/buffer.h" 24 | #include | ~~~~~ | "yourgame/gl/shape.h" 25 | #include | ~~~~~~~~ | "yourgame/gl_include.h" 26 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | 27 | #include "yourgame/gl/buffer.h" | ~~~~~~~~~~~~~~~~~~~~~~ | 28 | #include "yourgame/gl/shape.h" | ~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/geometry.h:30:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 30 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 31 | { | ~ 32 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/geometry.h:34:15: warning: class 'Geometry' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 34 | class Geometry | ^ /code/include/toolbox/yourgame/gl/lightsource.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLLIGHTSOURCE_H | ^~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_LIGHTSOURCE_H 21 | #define YOURGAME_GLLIGHTSOURCE_H | ~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_LIGHTSOURCE_H /code/include/toolbox/yourgame/gl/lightsource.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/loading.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLLOADING_H | ^~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_LOADING_H 21 | #define YOURGAME_GLLOADING_H | ~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_LOADING_H /code/include/toolbox/yourgame/gl/loading.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/conventions.h" 24 | #include | ~~~~~~~~ | "yourgame/gl/geometry.h" 25 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/gl/shader.h" 26 | #include "yourgame/gl/geometry.h" | ~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/gl/texture.h" 27 | #include "yourgame/gl/shader.h" | ~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/gl_include.h" 28 | #include "yourgame/gl/texture.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | 29 | #include "yourgame/gl/conventions.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/loading.h:31:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 31 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 32 | { | ~ 33 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/loading.h:35:16: warning: accessing fields in struct 'TextureConfig' is inefficient due to padding; only needs 38 bytes but is using 40 bytes [altera-struct-pack-align] 35 | struct TextureConfig | ^ 36 | { 37 | GLenum unit = gl::textureUnitDiffuse; 38 | GLint minMagFilter = GL_LINEAR; 39 | GLint wrapMode = GL_REPEAT; 40 | bool generateMipmap = false; 41 | bool premultiplyAlpha = true; 42 | std::vector> parameteri = {}; 43 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/gl/loading.h:35:16: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'TextureConfig' /code/include/toolbox/yourgame/gl/loading.h:35:16: warning: accessing fields in struct 'TextureConfig' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 64 bytes [altera-struct-pack-align] 35 | struct TextureConfig | ^ 36 | { 37 | GLenum unit = gl::textureUnitDiffuse; 38 | GLint minMagFilter = GL_LINEAR; 39 | GLint wrapMode = GL_REPEAT; 40 | bool generateMipmap = false; 41 | bool premultiplyAlpha = true; 42 | std::vector> parameteri = {}; 43 | }; | | __attribute__((aligned(64))) /code/include/toolbox/yourgame/gl/loading.h:35:16: note: use "__attribute__((aligned(64)))" to align struct 'TextureConfig' to 64 bytes /code/include/toolbox/yourgame/gl/loading.h:42:62: warning: initializer for member 'parameteri' is redundant [readability-redundant-member-init] 42 | std::vector> parameteri = {}; | ^~~~ /code/include/toolbox/yourgame/gl/shader.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLSHADER_H | ^~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHADER_H 21 | #define YOURGAME_GLSHADER_H | ~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHADER_H /code/include/toolbox/yourgame/gl/shader.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/lightsource.h" 24 | #include | ~~~~~~~~ | "yourgame/gl_include.h" 25 | #include | ~~~~~ | "yourgame/math/camera.h" 26 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | 27 | #include "yourgame/gl/lightsource.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 28 | #include "yourgame/math/camera.h" | ~~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/shader.h:30:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 30 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 31 | { | ~ 32 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/shader.h:34:15: warning: class 'Shader' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 34 | class Shader | ^ /code/include/toolbox/yourgame/gl/shader.h:51:13: warning: constructor does not initialize these fields: m_programHandle [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 51 | Shader() {} | ^ 52 | GLuint m_programHandle; | | {} /code/include/toolbox/yourgame/gl/shape.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLSHAPE_H | ^~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHAPE_H 21 | #define YOURGAME_GLSHAPE_H | ~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHAPE_H /code/include/toolbox/yourgame/gl/shape.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/buffer.h" 24 | #include "yourgame/gl_include.h" 25 | #include "yourgame/gl/buffer.h" | ~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/shape.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/shape.h:31:15: warning: class 'Shape' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 31 | class Shape | ^ /code/include/toolbox/yourgame/gl/shape.h:34:20: warning: accessing fields in struct 'ArrBufferDescr' is inefficient due to padding; only needs 29 bytes but is using 40 bytes [altera-struct-pack-align] 34 | struct ArrBufferDescr | ^ 35 | { 36 | GLuint index; 37 | GLint size; 38 | GLenum type; 39 | GLboolean normalized; 40 | GLsizei stride; 41 | const GLvoid *pointer; 42 | GLuint attribDivisor; 43 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/gl/shape.h:34:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'ArrBufferDescr' /code/include/toolbox/yourgame/gl/shape.h:34:20: warning: accessing fields in struct 'ArrBufferDescr' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 32 bytes [altera-struct-pack-align] 34 | struct ArrBufferDescr | ^ 35 | { 36 | GLuint index; 37 | GLint size; 38 | GLenum type; 39 | GLboolean normalized; 40 | GLsizei stride; 41 | const GLvoid *pointer; 42 | GLuint attribDivisor; 43 | }; | | __attribute__((aligned(32))) /code/include/toolbox/yourgame/gl/shape.h:34:20: note: use "__attribute__((aligned(32)))" to align struct 'ArrBufferDescr' to 32 bytes /code/include/toolbox/yourgame/gl/shape.h:45:20: warning: accessing fields in struct 'ElemArrBufferDescr' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 16 bytes [altera-struct-pack-align] 45 | struct ElemArrBufferDescr | ^ 46 | { 47 | GLenum type; 48 | GLenum drawMode; 49 | GLsizei numElements; 50 | }; | | __attribute__((aligned(16))) /code/include/toolbox/yourgame/gl/shape.h:45:20: note: use "__attribute__((aligned(16)))" to align struct 'ElemArrBufferDescr' to 16 bytes /code/include/toolbox/yourgame/gl/shape.h:68:13: warning: constructor does not initialize these fields: m_elArDescr, m_vaoHandle [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 68 | Shape() {} | ^ 69 | ElemArrBufferDescr m_elArDescr; | | {} 70 | GLuint m_vaoHandle; | | {} /code/include/toolbox/yourgame/gl/texture.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLTEXTURE_H | ^~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_TEXTURE_H 21 | #define YOURGAME_GLTEXTURE_H | ~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_TEXTURE_H /code/include/toolbox/yourgame/gl/texture.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~ | "yourgame/gl_include.h" 24 | #include | ~~~~~~~~ | 25 | #include | ~~~~~~~~ | 26 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/texture.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/texture.h:32:16: warning: accessing fields in struct 'TextureCoords' is inefficient due to padding; only needs 41 bytes but is using 44 bytes [altera-struct-pack-align] 32 | struct TextureCoords | ^ /code/include/toolbox/yourgame/gl/texture.h:32:16: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'TextureCoords' /code/include/toolbox/yourgame/gl/texture.h:32:16: warning: accessing fields in struct 'TextureCoords' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 64 bytes [altera-struct-pack-align] 32 | struct TextureCoords | ^ /code/include/toolbox/yourgame/gl/texture.h:32:16: note: use "__attribute__((aligned(64)))" to align struct 'TextureCoords' to 64 bytes /code/include/toolbox/yourgame/gl/texture.h:35:13: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default,modernize-use-equals-default] 35 | TextureCoords() {} | ^ ~~ | = default; /code/include/toolbox/yourgame/gl/texture.h:37:27: warning: 2 adjacent parameters of 'TextureCoords' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters] 37 | TextureCoords(int x, int y, int width, int height, int texWidth, int texHeight, bool cwRot) | ^~~~~~~~~~~~ /code/include/toolbox/yourgame/gl/texture.h:37:31: note: the first parameter in the range is 'x' 37 | TextureCoords(int x, int y, int width, int height, int texWidth, int texHeight, bool cwRot) | ^ /code/include/toolbox/yourgame/gl/texture.h:37:38: note: the last parameter in the range is 'y' 37 | TextureCoords(int x, int y, int width, int height, int texWidth, int texHeight, bool cwRot) | ^ /code/include/toolbox/yourgame/gl/texture.h:55:19: warning: member variable 'uMin' has public visibility [misc-non-private-member-variables-in-classes] 55 | float uMin = 0.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:56:19: warning: member variable 'uMax' has public visibility [misc-non-private-member-variables-in-classes] 56 | float uMax = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:57:19: warning: member variable 'vMin' has public visibility [misc-non-private-member-variables-in-classes] 57 | float vMin = 0.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:58:19: warning: member variable 'vMax' has public visibility [misc-non-private-member-variables-in-classes] 58 | float vMax = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:59:17: warning: member variable 'xMinPixel' has public visibility [misc-non-private-member-variables-in-classes] 59 | int xMinPixel = 0; | ^ /code/include/toolbox/yourgame/gl/texture.h:60:17: warning: member variable 'xMaxPixel' has public visibility [misc-non-private-member-variables-in-classes] 60 | int xMaxPixel = 1; | ^ /code/include/toolbox/yourgame/gl/texture.h:61:17: warning: member variable 'yMinPixel' has public visibility [misc-non-private-member-variables-in-classes] 61 | int yMinPixel = 0; | ^ /code/include/toolbox/yourgame/gl/texture.h:62:17: warning: member variable 'yMaxPixel' has public visibility [misc-non-private-member-variables-in-classes] 62 | int yMaxPixel = 1; | ^ /code/include/toolbox/yourgame/gl/texture.h:63:19: warning: member variable 'aspectRatioPixel' has public visibility [misc-non-private-member-variables-in-classes] 63 | float aspectRatioPixel = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:64:19: warning: member variable 'aspectRatioPixelInverse' has public visibility [misc-non-private-member-variables-in-classes] 64 | float aspectRatioPixelInverse = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:65:18: warning: member variable 'cwRotated' has public visibility [misc-non-private-member-variables-in-classes] 65 | bool cwRotated = false; | ^ /code/include/toolbox/yourgame/gl/texture.h:68:15: warning: class 'Texture' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 68 | class Texture | ^ /code/include/toolbox/yourgame/gl/texture.h:95:13: warning: function 'handle' should be marked [[nodiscard]] [modernize-use-nodiscard] 95 | GLuint handle() const { return m_handle; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:96:13: warning: function 'getTarget' should be marked [[nodiscard]] [modernize-use-nodiscard] 96 | GLenum getTarget() const { return m_target; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:97:13: warning: function 'getWidth' should be marked [[nodiscard]] [modernize-use-nodiscard] 97 | GLsizei getWidth() const { return m_width; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:98:13: warning: function 'getHeight' should be marked [[nodiscard]] [modernize-use-nodiscard] 98 | GLsizei getHeight() const { return m_height; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:107:13: warning: function 'getCoords' should be marked [[nodiscard]] [modernize-use-nodiscard] 107 | TextureCoords getCoords(std::string name) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:122:13: warning: function 'getNumFrames' should be marked [[nodiscard]] [modernize-use-nodiscard] 122 | int getNumFrames(std::string sequenceName) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:127:13: warning: function 'getSequenceNames' should be marked [[nodiscard]] [modernize-use-nodiscard] 127 | std::vector getSequenceNames() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:136:13: warning: function 'getGridCoords' should be marked [[nodiscard]] [modernize-use-nodiscard] 136 | TextureCoords getGridCoords(int gridWidth, int gridHeight, int index) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:139:13: warning: constructor does not initialize these fields: m_handle, m_target, m_unit, m_width, m_height [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 139 | Texture() {} | ^ 140 | GLuint m_handle; | | {} 141 | GLenum m_target; | | {} 142 | GLenum m_unit; | | {} 143 | GLsizei m_width; | | {} 144 | GLsizei m_height; | | {} /code/include/toolbox/yourgame/gl/texture.h:146:20: warning: accessing fields in struct 'Sequence' is inefficient due to padding; only needs 73 bytes but is using 80 bytes [altera-struct-pack-align] 146 | struct Sequence | ^ 147 | { 148 | std::map frames; 149 | bool framesInvalidated; 150 | std::vector framesConsec; /**< \brief consecutive representation of the frame coordinates */ 151 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/gl/texture.h:146:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'Sequence' /code/include/toolbox/yourgame/gl/texture.h:146:20: warning: accessing fields in struct 'Sequence' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 128 bytes [altera-struct-pack-align] 146 | struct Sequence | ^ 147 | { 148 | std::map frames; 149 | bool framesInvalidated; 150 | std::vector framesConsec; /**< \brief consecutive representation of the frame coordinates */ 151 | }; | | __attribute__((aligned(128))) /code/include/toolbox/yourgame/gl/texture.h:146:20: note: use "__attribute__((aligned(128)))" to align struct 'Sequence' to 128 bytes /code/include/toolbox/yourgame/math/camera.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_CAMERA_H | ^~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_CAMERA_H 21 | #define YOURGAME_CAMERA_H | ~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_CAMERA_H /code/include/toolbox/yourgame/math/camera.h:24:1: warning: #includes are not sorted properly [llvm-include-order] 24 | #include | ^ ~~~~~~~~~~~~~ | "yourgame/math.h" 25 | #include | ~~~~~~~~~~~~~ | "yourgame/math/trafo.h" 26 | #include "yourgame/math.h" | ~~~~~~~~~~~~~~~~~ | 27 | #include "yourgame/math/trafo.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/math/camera.h:29:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 29 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 30 | { | ~ 31 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/toolbox/yourgame/math/trafo.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_TRAFO_H | ^~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_TRAFO_H 21 | #define YOURGAME_TRAFO_H | ~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_TRAFO_H /code/include/toolbox/yourgame/math/trafo.h:24:1: warning: #includes are not sorted properly [llvm-include-order] 24 | #include | ^ ~~~~~~~~~~~~~ | "yourgame/math.h" 25 | #include 26 | #include "yourgame/math.h" | ~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/math/trafo.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/toolbox/yourgame/math/trafo.h:56:13: warning: function 'getAxisGlobal' should be marked [[nodiscard]] [modernize-use-nodiscard] 56 | glm::vec3 getAxisGlobal(math::Axis ax) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/math/trafo.h:57:13: warning: function 'getEye' should be marked [[nodiscard]] [modernize-use-nodiscard] 57 | glm::vec3 getEye() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/math/trafo.h:58:13: warning: function 'getRotation' should be marked [[nodiscard]] [modernize-use-nodiscard] 58 | glm::quat getRotation() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/math/trafo.h:59:13: warning: function 'getScale' should be marked [[nodiscard]] [modernize-use-nodiscard] 59 | glm::vec3 getScale() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/assetmanager.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_ASSETMANAGER_H | ^~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_ASSETMANAGER_H 21 | #define YOURGAME_ASSETMANAGER_H | ~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_ASSETMANAGER_H /code/include/toolbox/yourgame/util/assetmanager.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~~~~~ | // std::uintptr_t 24 | #include // std::uintptr_t | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 25 | #include | ~~~~~~~~~~ | 26 | #include | ~~~~~ | 27 | #include | ~~~~~~~~ | /code/include/toolbox/yourgame/util/assetmanager.h:29:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 29 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 30 | { | ~ 31 | namespace util | ~~~~~~~~~~~~~~ | namespace yourgame::util /code/include/toolbox/yourgame/util/assetmanager.h:46:15: warning: class 'AssetManager' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 46 | class AssetManager | ^ /code/include/toolbox/yourgame/util/assetmanager.h:63:37: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 63 | bool insert(std::string name, T *obj) | ^ /code/include/toolbox/yourgame/util/assetmanager.h:76:23: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory] 76 | { delete reinterpret_cast(ptr); }; | ^ ~~~ /code/include/toolbox/yourgame/util/assetmanager.h:75:28: note: variable declared here 75 | [](std::uintptr_t ptr) | ^~~~~~~~~~~~~~~~~~ /code/include/toolbox/yourgame/util/assetmanager.h:76:30: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast] 76 | { delete reinterpret_cast(ptr); }; | ^ /code/include/toolbox/yourgame/util/assetmanager.h:76:30: warning: integer to pointer cast pessimizes optimization opportunities [performance-no-int-to-ptr] /code/include/toolbox/yourgame/util/assetmanager.h:85:58: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast] 85 | m_ptrMaps[typeid(T).hash_code()][name] = reinterpret_cast(obj); | ^ /code/include/toolbox/yourgame/util/assetmanager.h:98:37: warning: parameter 'name' is unused [misc-unused-parameters] 98 | void insert(std::string name, T obj) | ^~~~ | /*name*/ /code/include/toolbox/yourgame/util/assetmanager.h:98:37: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] /code/include/toolbox/yourgame/util/assetmanager.h:98:45: warning: parameter 'obj' is unused [misc-unused-parameters] 98 | void insert(std::string name, T obj) | ^~~ | /*obj*/ /code/include/toolbox/yourgame/util/assetmanager.h:111:32: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 111 | T *get(std::string name) | ^ /code/include/toolbox/yourgame/util/assetmanager.h:119:32: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast] 119 | return reinterpret_cast(itT->second); | ^ /code/include/toolbox/yourgame/util/assetmanager.h:149:38: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 149 | void destroy(std::string name) | ^ /code/include/toolbox/yourgame/util/assetmanager.h:174:21: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 174 | for (const auto &ptr : itMap->second) | ^ /code/include/toolbox/yourgame/util/assetmanager.h:189:21: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 189 | for (const auto &ptr : map.second) | ^ /code/src/toolbox/util/assets.cpp:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace util | ~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace assets | ~~~~~~~~~~~~~~~~ | namespace yourgame_internal::util::assets /code/src/toolbox/util/assets.cpp:29:13: warning: static objects are disallowed; if possible, use a constexpr constructor instead [fuchsia-statically-constructed-objects] 29 | yourgame::util::AssetManager manager; | ^ /code/src/toolbox/util/assets.cpp:29:42: warning: variable 'manager' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 29 | yourgame::util::AssetManager manager; | ^ /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/toolbox/math/camera.cpp /code/include/base/yourgame/math.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_MATH_H | ^~~~~~~~~~~~~~~ | BASE_YOURGAME_MATH_H 21 | #define YOURGAME_MATH_H | ~~~~~~~~~~~~~~~ | BASE_YOURGAME_MATH_H /code/include/base/yourgame/math.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/base/yourgame/math.h:27:20: warning: enum 'Projection' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 27 | enum class Projection | ^ /code/include/base/yourgame/math.h:33:20: warning: enum 'Axis' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 33 | enum class Axis | ^ /code/include/toolbox/yourgame/math/camera.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_CAMERA_H | ^~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_CAMERA_H 21 | #define YOURGAME_CAMERA_H | ~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_CAMERA_H /code/include/toolbox/yourgame/math/camera.h:24:1: warning: #includes are not sorted properly [llvm-include-order] 24 | #include | ^ ~~~~~~~~~~~~~ | "yourgame/math.h" 25 | #include | ~~~~~~~~~~~~~ | "yourgame/math/trafo.h" 26 | #include "yourgame/math.h" | ~~~~~~~~~~~~~~~~~ | 27 | #include "yourgame/math/trafo.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/math/camera.h:29:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 29 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 30 | { | ~ 31 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/toolbox/yourgame/math/trafo.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_TRAFO_H | ^~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_TRAFO_H 21 | #define YOURGAME_TRAFO_H | ~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_TRAFO_H /code/include/toolbox/yourgame/math/trafo.h:24:1: warning: #includes are not sorted properly [llvm-include-order] 24 | #include | ^ ~~~~~~~~~~~~~ | "yourgame/math.h" 25 | #include 26 | #include "yourgame/math.h" | ~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/math/trafo.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/toolbox/yourgame/math/trafo.h:56:13: warning: function 'getAxisGlobal' should be marked [[nodiscard]] [modernize-use-nodiscard] 56 | glm::vec3 getAxisGlobal(math::Axis ax) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/math/trafo.h:57:13: warning: function 'getEye' should be marked [[nodiscard]] [modernize-use-nodiscard] 57 | glm::vec3 getEye() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/math/trafo.h:58:13: warning: function 'getRotation' should be marked [[nodiscard]] [modernize-use-nodiscard] 58 | glm::quat getRotation() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/math/trafo.h:59:13: warning: function 'getScale' should be marked [[nodiscard]] [modernize-use-nodiscard] 59 | glm::vec3 getScale() const; | ^ | [[nodiscard]] /code/src/toolbox/math/camera.cpp:20:1: warning: #includes are not sorted properly [llvm-include-order] 20 | #include | ^ note: this fix will not be applied because it overlaps with another fix /code/src/toolbox/math/camera.cpp:20:1: warning: included header glm.hpp is not used directly [misc-include-cleaner] 20 | #include | ^~~~~~~~~~~~~~~~~~~~~~ 21 | #include "yourgame/math/camera.h" /code/src/toolbox/math/camera.cpp:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/src/toolbox/math/camera.cpp:27:14: warning: no header providing "glm::mat4" is directly included [misc-include-cleaner] 22 | 23 | namespace yourgame 24 | { 25 | namespace math 26 | { 27 | glm::mat4 Camera::vMat() | ^ /code/src/toolbox/math/camera.cpp:44:9: warning: no header providing "yourgame::math::Trafo" is directly included [misc-include-cleaner] 22 | Trafo *Camera::trafo() | ^ /code/src/toolbox/math/camera.cpp:50:42: warning: no header providing "yourgame::math::Projection" is directly included [misc-include-cleaner] 22 | void Camera::setProjection(math::Projection proj) | ^ /code/src/toolbox/math/camera.cpp:59:37: warning: 4 adjacent parameters of 'setPerspective' of similar type ('float') are easily swapped by mistake [bugprone-easily-swappable-parameters] 59 | void Camera::setPerspective(float fovy, float aspect, float zNear, float zFar) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/math/camera.cpp:59:43: note: the first parameter in the range is 'fovy' 59 | void Camera::setPerspective(float fovy, float aspect, float zNear, float zFar) | ^~~~ /code/src/toolbox/math/camera.cpp:59:82: note: the last parameter in the range is 'zFar' 59 | void Camera::setPerspective(float fovy, float aspect, float zNear, float zFar) | ^~~~ /code/src/toolbox/math/camera.cpp:69:38: warning: 4 adjacent parameters of 'setOrthographic' of similar type ('float') are easily swapped by mistake [bugprone-easily-swappable-parameters] 69 | void Camera::setOrthographic(float height, float aspect, float zNear, float zFar) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/math/camera.cpp:69:44: note: the first parameter in the range is 'height' 69 | void Camera::setOrthographic(float height, float aspect, float zNear, float zFar) | ^~~~~~ /code/src/toolbox/math/camera.cpp:69:85: note: the last parameter in the range is 'zFar' 69 | void Camera::setOrthographic(float height, float aspect, float zNear, float zFar) | ^~~~ /code/src/toolbox/math/camera.cpp:115:40: warning: 2 adjacent parameters of 'rotateFirstPerson' of similar type ('float') are easily swapped by mistake [bugprone-easily-swappable-parameters] 115 | void Camera::rotateFirstPerson(float yaw, float pitch) | ^~~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/math/camera.cpp:115:46: note: the first parameter in the range is 'yaw' 115 | void Camera::rotateFirstPerson(float yaw, float pitch) | ^~~ /code/src/toolbox/math/camera.cpp:115:57: note: the last parameter in the range is 'pitch' 115 | void Camera::rotateFirstPerson(float yaw, float pitch) | ^~~~~ /code/src/toolbox/math/camera.cpp:118:39: warning: no header providing "glm::clamp" is directly included [misc-include-cleaner] 22 | m_firstPersonPitch = glm::clamp(m_firstPersonPitch + pitch, -1.57079632679f, 1.57079632679f); | ^ /code/src/toolbox/math/camera.cpp:120:58: warning: no header providing "yourgame::math::Axis" is directly included [misc-include-cleaner] 120 | m_trafo.rotateGlobal(m_firstPersonYaw, math::Axis::Y); | ^ /code/src/toolbox/math/camera.cpp:124:64: warning: 2 adjacent parameters of 'castRay' of similar type ('glm::vec3 &') are easily swapped by mistake [bugprone-easily-swappable-parameters] 124 | void Camera::castRay(float viewportX, float viewportY, glm::vec3 &dstOrg, glm::vec3 &dstDir) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/math/camera.cpp:124:75: note: the first parameter in the range is 'dstOrg' 124 | void Camera::castRay(float viewportX, float viewportY, glm::vec3 &dstOrg, glm::vec3 &dstDir) | ^~~~~~ /code/src/toolbox/math/camera.cpp:124:94: note: the last parameter in the range is 'dstDir' 124 | void Camera::castRay(float viewportX, float viewportY, glm::vec3 &dstOrg, glm::vec3 &dstDir) | ^~~~~~ /code/src/toolbox/math/camera.cpp:124:69: warning: no header providing "glm::vec3" is directly included [misc-include-cleaner] 22 | void Camera::castRay(float viewportX, float viewportY, glm::vec3 &dstOrg, glm::vec3 &dstDir) | ^ /code/src/toolbox/math/camera.cpp:126:13: warning: variable 'viewX' of type 'float' can be declared 'const' [misc-const-correctness] 126 | float viewX = ((viewportX * 2.0f) - 1.0f); | ^ | const /code/src/toolbox/math/camera.cpp:127:13: warning: variable 'viewY' of type 'float' can be declared 'const' [misc-const-correctness] 127 | float viewY = (1.0f - (viewportY * 2.0f)); | ^ | const /code/src/toolbox/math/camera.cpp:131:17: warning: variable 'tanFovyHalf' of type 'float' can be declared 'const' [misc-const-correctness] 131 | float tanFovyHalf = std::tan(m_fovy * 0.00872664625f); // pi/180/2 = 0.00872664625 | ^ | const /code/src/toolbox/math/camera.cpp:131:42: warning: no header providing "std::tan" is directly included [misc-include-cleaner] 20 | float tanFovyHalf = std::tan(m_fovy * 0.00872664625f); // pi/180/2 = 0.00872664625 | ^ /code/src/toolbox/math/camera.cpp:132:17: warning: variable 'dirX' of type 'float' can be declared 'const' [misc-const-correctness] 132 | float dirX = tanFovyHalf * viewX * m_aspect; | ^ | const /code/src/toolbox/math/camera.cpp:133:17: warning: variable 'dirY' of type 'float' can be declared 'const' [misc-const-correctness] 133 | float dirY = tanFovyHalf * viewY; | ^ | const /code/src/toolbox/math/camera.cpp:134:17: warning: variable 'dirZ' of type 'float' can be declared 'const' [misc-const-correctness] 134 | float dirZ = -1.0f; | ^ | const /code/src/toolbox/math/camera.cpp:135:31: warning: no header providing "glm::normalize" is directly included [misc-include-cleaner] 22 | dstDir = glm::normalize(glm::vec3(m_trafo.mat() * glm::vec4(dirX, dirY, dirZ, 0.0f))); | ^ /code/src/toolbox/math/camera.cpp:140:17: warning: variable 'orgX' of type 'float' can be declared 'const' [misc-const-correctness] 140 | float orgX = viewX * m_height * 0.5f * m_aspect; | ^ | const /code/src/toolbox/math/camera.cpp:141:17: warning: variable 'orgY' of type 'float' can be declared 'const' [misc-const-correctness] 141 | float orgY = viewY * m_height * 0.5f; | ^ | const /code/src/toolbox/math/camera.cpp:142:17: warning: variable 'orgZ' of type 'float' can be declared 'const' [misc-const-correctness] 142 | float orgZ = 0.0f; | ^ | const /code/src/toolbox/math/camera.cpp:152:31: warning: no header providing "glm::inverse" is directly included [misc-include-cleaner] 22 | m_vMat = glm::inverse(m_trafo.mat()); | ^ /code/src/toolbox/math/camera.cpp:170:29: warning: no header providing "glm::perspective" is directly included [misc-include-cleaner] 22 | return glm::perspective(m_fovy * 0.01745329251f, m_aspect, zNear, zFar); | ^ /code/src/toolbox/math/camera.cpp:172:13: warning: do not use 'else' after 'return' [llvm-else-after-return,readability-else-after-return] 172 | else | ^~~~ 173 | { | ~ 174 | float heightHalf = m_height * 0.5f; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 175 | float widthHalf = heightHalf * m_aspect; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 176 | return glm::ortho(-widthHalf, widthHalf, -heightHalf, heightHalf, zNear, zFar); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 177 | } | ~ /code/src/toolbox/math/camera.cpp:174:17: warning: variable 'heightHalf' of type 'float' can be declared 'const' [misc-const-correctness] 174 | float heightHalf = m_height * 0.5f; | ^ note: this fix will not be applied because it overlaps with another fix /code/src/toolbox/math/camera.cpp:175:17: warning: variable 'widthHalf' of type 'float' can be declared 'const' [misc-const-correctness] 175 | float widthHalf = heightHalf * m_aspect; | ^ note: this fix will not be applied because it overlaps with another fix /code/src/toolbox/math/camera.cpp:176:29: warning: no header providing "glm::ortho" is directly included [misc-include-cleaner] 176 | return glm::ortho(-widthHalf, widthHalf, -heightHalf, heightHalf, zNear, zFar); | ^ /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/toolbox/gl/drawing.cpp /code/include/base/yourgame/gl_include.h:38:9: warning: header guard does not follow preferred style [llvm-header-guard] 38 | #ifndef YOURGAME_GL_INCLUDE_H | ^~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H 39 | #define YOURGAME_GL_INCLUDE_H | ~~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H /code/include/base/yourgame/math.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_MATH_H | ^~~~~~~~~~~~~~~ | BASE_YOURGAME_MATH_H 21 | #define YOURGAME_MATH_H | ~~~~~~~~~~~~~~~ | BASE_YOURGAME_MATH_H /code/include/base/yourgame/math.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/base/yourgame/math.h:27:20: warning: enum 'Projection' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 27 | enum class Projection | ^ /code/include/base/yourgame/math.h:33:20: warning: enum 'Axis' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 33 | enum class Axis | ^ /code/include/toolbox/yourgame/gl/buffer.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLBUFFER_H | ^~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_BUFFER_H 21 | #define YOURGAME_GLBUFFER_H | ~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_BUFFER_H /code/include/toolbox/yourgame/gl/buffer.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/buffer.h:29:15: warning: class 'Buffer' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 29 | class Buffer | ^ /code/include/toolbox/yourgame/gl/buffer.h:44:13: warning: constructor does not initialize these fields: m_target, m_handle, m_usage [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 44 | Buffer() {} | ^ 45 | GLenum m_target; | | {} 46 | GLuint m_handle; | | {} 47 | GLenum m_usage; | | {} /code/include/toolbox/yourgame/gl/conventions.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLCONVENTIONS_H | ^~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_CONVENTIONS_H 21 | #define YOURGAME_GLCONVENTIONS_H | ~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_CONVENTIONS_H /code/include/toolbox/yourgame/gl/conventions.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/conventions.h:38:30: warning: variable 'unifNameMvpMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 38 | extern const GLchar *unifNameMvpMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:39:30: warning: variable 'unifNameVpMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 39 | extern const GLchar *unifNameVpMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:40:30: warning: variable 'unifNameModelMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 40 | extern const GLchar *unifNameModelMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:41:30: warning: variable 'unifNameNormalMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 41 | extern const GLchar *unifNameNormalMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:42:30: warning: variable 'unifNameCameraPosition' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 42 | extern const GLchar *unifNameCameraPosition; | ^ /code/include/toolbox/yourgame/gl/conventions.h:43:30: warning: variable 'unifNameCameraTrafo' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 43 | extern const GLchar *unifNameCameraTrafo; | ^ /code/include/toolbox/yourgame/gl/conventions.h:44:30: warning: variable 'unifNameSkyRotationInv' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 44 | extern const GLchar *unifNameSkyRotationInv; | ^ /code/include/toolbox/yourgame/gl/conventions.h:45:30: warning: variable 'unifNameTextureDiffuse' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 45 | extern const GLchar *unifNameTextureDiffuse; | ^ /code/include/toolbox/yourgame/gl/conventions.h:46:30: warning: variable 'unifNameTextureSkyCube' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 46 | extern const GLchar *unifNameTextureSkyCube; | ^ /code/include/toolbox/yourgame/gl/conventions.h:47:30: warning: variable 'unifNameTextureSky' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 47 | extern const GLchar *unifNameTextureSky; | ^ /code/include/toolbox/yourgame/gl/conventions.h:48:30: warning: variable 'unifNameTextureBufferDepth' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 48 | extern const GLchar *unifNameTextureBufferDepth; | ^ /code/include/toolbox/yourgame/gl/conventions.h:49:30: warning: variable 'unifNameTextureBufferColor0' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 49 | extern const GLchar *unifNameTextureBufferColor0; | ^ /code/include/toolbox/yourgame/gl/conventions.h:50:30: warning: variable 'unifNameLightAmbient' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 50 | extern const GLchar *unifNameLightAmbient; | ^ /code/include/toolbox/yourgame/gl/conventions.h:51:30: warning: variable 'unifNameLightDiffuse' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 51 | extern const GLchar *unifNameLightDiffuse; | ^ /code/include/toolbox/yourgame/gl/conventions.h:52:30: warning: variable 'unifNameLightSpecular' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 52 | extern const GLchar *unifNameLightSpecular; | ^ /code/include/toolbox/yourgame/gl/conventions.h:53:30: warning: variable 'unifNameLightPosition' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 53 | extern const GLchar *unifNameLightPosition; | ^ /code/include/toolbox/yourgame/gl/conventions.h:54:30: warning: variable 'unifNameSubtexture' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 54 | extern const GLchar *unifNameSubtexture; | ^ /code/include/toolbox/yourgame/gl/drawing.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLDRAWING_H | ^~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_DRAWING_H 21 | #define YOURGAME_GLDRAWING_H | ~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_DRAWING_H /code/include/toolbox/yourgame/gl/drawing.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~ | "yourgame/gl/geometry.h" 24 | #include | ~~~~~~~~ | "yourgame/gl/shader.h" 25 | #include "yourgame/math/camera.h" | ~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/gl/texture.h" 26 | #include "yourgame/math/trafo.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/math/camera.h" 27 | #include "yourgame/gl/geometry.h" | ~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/math/trafo.h" 28 | #include "yourgame/gl/shader.h" | ~~~~~~~~~~~~~~~~~~~~~~ | 29 | #include "yourgame/gl/texture.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/drawing.h:31:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 31 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 32 | { | ~ 33 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/drawing.h:35:16: warning: accessing fields in struct 'DrawConfig' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 128 bytes [altera-struct-pack-align] 35 | struct DrawConfig | ^ 36 | { 37 | yourgame::gl::Shader *shader = nullptr; 38 | yourgame::math::Camera *camera = nullptr; 39 | glm::mat4 modelMat = glm::mat4(1); 40 | std::vector textures = {}; 41 | std::array subtex = {0.0f, 1.0f, 0.0f, 1.0f}; 42 | GLsizei instancecount = 1; 43 | }; | | __attribute__((aligned(128))) /code/include/toolbox/yourgame/gl/drawing.h:35:16: note: use "__attribute__((aligned(128)))" to align struct 'DrawConfig' to 128 bytes /code/include/toolbox/yourgame/gl/drawing.h:40:59: warning: initializer for member 'textures' is redundant [readability-redundant-member-init] 40 | std::vector textures = {}; | ^~~~ /code/include/toolbox/yourgame/gl/geometry.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLGEOMETRY_H | ^~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_GEOMETRY_H 21 | #define YOURGAME_GLGEOMETRY_H | ~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_GEOMETRY_H /code/include/toolbox/yourgame/gl/geometry.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/buffer.h" 24 | #include | ~~~~~ | "yourgame/gl/shape.h" 25 | #include | ~~~~~~~~ | "yourgame/gl_include.h" 26 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | 27 | #include "yourgame/gl/buffer.h" | ~~~~~~~~~~~~~~~~~~~~~~ | 28 | #include "yourgame/gl/shape.h" | ~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/geometry.h:30:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 30 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 31 | { | ~ 32 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/geometry.h:34:15: warning: class 'Geometry' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 34 | class Geometry | ^ /code/include/toolbox/yourgame/gl/lightsource.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLLIGHTSOURCE_H | ^~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_LIGHTSOURCE_H 21 | #define YOURGAME_GLLIGHTSOURCE_H | ~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_LIGHTSOURCE_H /code/include/toolbox/yourgame/gl/lightsource.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/shader.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLSHADER_H | ^~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHADER_H 21 | #define YOURGAME_GLSHADER_H | ~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHADER_H /code/include/toolbox/yourgame/gl/shader.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/lightsource.h" 24 | #include | ~~~~~~~~ | "yourgame/gl_include.h" 25 | #include | ~~~~~ | "yourgame/math/camera.h" 26 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | 27 | #include "yourgame/gl/lightsource.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 28 | #include "yourgame/math/camera.h" | ~~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/shader.h:30:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 30 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 31 | { | ~ 32 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/shader.h:34:15: warning: class 'Shader' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 34 | class Shader | ^ /code/include/toolbox/yourgame/gl/shader.h:51:13: warning: constructor does not initialize these fields: m_programHandle [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 51 | Shader() {} | ^ 52 | GLuint m_programHandle; | | {} /code/include/toolbox/yourgame/gl/shape.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLSHAPE_H | ^~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHAPE_H 21 | #define YOURGAME_GLSHAPE_H | ~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHAPE_H /code/include/toolbox/yourgame/gl/shape.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/buffer.h" 24 | #include "yourgame/gl_include.h" 25 | #include "yourgame/gl/buffer.h" | ~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/shape.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/shape.h:31:15: warning: class 'Shape' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 31 | class Shape | ^ /code/include/toolbox/yourgame/gl/shape.h:34:20: warning: accessing fields in struct 'ArrBufferDescr' is inefficient due to padding; only needs 29 bytes but is using 40 bytes [altera-struct-pack-align] 34 | struct ArrBufferDescr | ^ 35 | { 36 | GLuint index; 37 | GLint size; 38 | GLenum type; 39 | GLboolean normalized; 40 | GLsizei stride; 41 | const GLvoid *pointer; 42 | GLuint attribDivisor; 43 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/gl/shape.h:34:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'ArrBufferDescr' /code/include/toolbox/yourgame/gl/shape.h:34:20: warning: accessing fields in struct 'ArrBufferDescr' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 32 bytes [altera-struct-pack-align] 34 | struct ArrBufferDescr | ^ 35 | { 36 | GLuint index; 37 | GLint size; 38 | GLenum type; 39 | GLboolean normalized; 40 | GLsizei stride; 41 | const GLvoid *pointer; 42 | GLuint attribDivisor; 43 | }; | | __attribute__((aligned(32))) /code/include/toolbox/yourgame/gl/shape.h:34:20: note: use "__attribute__((aligned(32)))" to align struct 'ArrBufferDescr' to 32 bytes /code/include/toolbox/yourgame/gl/shape.h:45:20: warning: accessing fields in struct 'ElemArrBufferDescr' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 16 bytes [altera-struct-pack-align] 45 | struct ElemArrBufferDescr | ^ 46 | { 47 | GLenum type; 48 | GLenum drawMode; 49 | GLsizei numElements; 50 | }; | | __attribute__((aligned(16))) /code/include/toolbox/yourgame/gl/shape.h:45:20: note: use "__attribute__((aligned(16)))" to align struct 'ElemArrBufferDescr' to 16 bytes /code/include/toolbox/yourgame/gl/shape.h:68:13: warning: constructor does not initialize these fields: m_elArDescr, m_vaoHandle [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 68 | Shape() {} | ^ 69 | ElemArrBufferDescr m_elArDescr; | | {} 70 | GLuint m_vaoHandle; | | {} /code/include/toolbox/yourgame/gl/texture.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLTEXTURE_H | ^~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_TEXTURE_H 21 | #define YOURGAME_GLTEXTURE_H | ~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_TEXTURE_H /code/include/toolbox/yourgame/gl/texture.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~ | "yourgame/gl_include.h" 24 | #include | ~~~~~~~~ | 25 | #include | ~~~~~~~~ | 26 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/texture.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/texture.h:32:16: warning: accessing fields in struct 'TextureCoords' is inefficient due to padding; only needs 41 bytes but is using 44 bytes [altera-struct-pack-align] 32 | struct TextureCoords | ^ /code/include/toolbox/yourgame/gl/texture.h:32:16: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'TextureCoords' /code/include/toolbox/yourgame/gl/texture.h:32:16: warning: accessing fields in struct 'TextureCoords' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 64 bytes [altera-struct-pack-align] 32 | struct TextureCoords | ^ /code/include/toolbox/yourgame/gl/texture.h:32:16: note: use "__attribute__((aligned(64)))" to align struct 'TextureCoords' to 64 bytes /code/include/toolbox/yourgame/gl/texture.h:35:13: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default,modernize-use-equals-default] 35 | TextureCoords() {} | ^ ~~ | = default; /code/include/toolbox/yourgame/gl/texture.h:37:27: warning: 2 adjacent parameters of 'TextureCoords' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters] 37 | TextureCoords(int x, int y, int width, int height, int texWidth, int texHeight, bool cwRot) | ^~~~~~~~~~~~ /code/include/toolbox/yourgame/gl/texture.h:37:31: note: the first parameter in the range is 'x' 37 | TextureCoords(int x, int y, int width, int height, int texWidth, int texHeight, bool cwRot) | ^ /code/include/toolbox/yourgame/gl/texture.h:37:38: note: the last parameter in the range is 'y' 37 | TextureCoords(int x, int y, int width, int height, int texWidth, int texHeight, bool cwRot) | ^ /code/include/toolbox/yourgame/gl/texture.h:55:19: warning: member variable 'uMin' has public visibility [misc-non-private-member-variables-in-classes] 55 | float uMin = 0.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:56:19: warning: member variable 'uMax' has public visibility [misc-non-private-member-variables-in-classes] 56 | float uMax = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:57:19: warning: member variable 'vMin' has public visibility [misc-non-private-member-variables-in-classes] 57 | float vMin = 0.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:58:19: warning: member variable 'vMax' has public visibility [misc-non-private-member-variables-in-classes] 58 | float vMax = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:59:17: warning: member variable 'xMinPixel' has public visibility [misc-non-private-member-variables-in-classes] 59 | int xMinPixel = 0; | ^ /code/include/toolbox/yourgame/gl/texture.h:60:17: warning: member variable 'xMaxPixel' has public visibility [misc-non-private-member-variables-in-classes] 60 | int xMaxPixel = 1; | ^ /code/include/toolbox/yourgame/gl/texture.h:61:17: warning: member variable 'yMinPixel' has public visibility [misc-non-private-member-variables-in-classes] 61 | int yMinPixel = 0; | ^ /code/include/toolbox/yourgame/gl/texture.h:62:17: warning: member variable 'yMaxPixel' has public visibility [misc-non-private-member-variables-in-classes] 62 | int yMaxPixel = 1; | ^ /code/include/toolbox/yourgame/gl/texture.h:63:19: warning: member variable 'aspectRatioPixel' has public visibility [misc-non-private-member-variables-in-classes] 63 | float aspectRatioPixel = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:64:19: warning: member variable 'aspectRatioPixelInverse' has public visibility [misc-non-private-member-variables-in-classes] 64 | float aspectRatioPixelInverse = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:65:18: warning: member variable 'cwRotated' has public visibility [misc-non-private-member-variables-in-classes] 65 | bool cwRotated = false; | ^ /code/include/toolbox/yourgame/gl/texture.h:68:15: warning: class 'Texture' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 68 | class Texture | ^ /code/include/toolbox/yourgame/gl/texture.h:95:13: warning: function 'handle' should be marked [[nodiscard]] [modernize-use-nodiscard] 95 | GLuint handle() const { return m_handle; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:96:13: warning: function 'getTarget' should be marked [[nodiscard]] [modernize-use-nodiscard] 96 | GLenum getTarget() const { return m_target; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:97:13: warning: function 'getWidth' should be marked [[nodiscard]] [modernize-use-nodiscard] 97 | GLsizei getWidth() const { return m_width; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:98:13: warning: function 'getHeight' should be marked [[nodiscard]] [modernize-use-nodiscard] 98 | GLsizei getHeight() const { return m_height; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:107:13: warning: function 'getCoords' should be marked [[nodiscard]] [modernize-use-nodiscard] 107 | TextureCoords getCoords(std::string name) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:122:13: warning: function 'getNumFrames' should be marked [[nodiscard]] [modernize-use-nodiscard] 122 | int getNumFrames(std::string sequenceName) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:127:13: warning: function 'getSequenceNames' should be marked [[nodiscard]] [modernize-use-nodiscard] 127 | std::vector getSequenceNames() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:136:13: warning: function 'getGridCoords' should be marked [[nodiscard]] [modernize-use-nodiscard] 136 | TextureCoords getGridCoords(int gridWidth, int gridHeight, int index) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:139:13: warning: constructor does not initialize these fields: m_handle, m_target, m_unit, m_width, m_height [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 139 | Texture() {} | ^ 140 | GLuint m_handle; | | {} 141 | GLenum m_target; | | {} 142 | GLenum m_unit; | | {} 143 | GLsizei m_width; | | {} 144 | GLsizei m_height; | | {} /code/include/toolbox/yourgame/gl/texture.h:146:20: warning: accessing fields in struct 'Sequence' is inefficient due to padding; only needs 73 bytes but is using 80 bytes [altera-struct-pack-align] 146 | struct Sequence | ^ 147 | { 148 | std::map frames; 149 | bool framesInvalidated; 150 | std::vector framesConsec; /**< \brief consecutive representation of the frame coordinates */ 151 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/gl/texture.h:146:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'Sequence' /code/include/toolbox/yourgame/gl/texture.h:146:20: warning: accessing fields in struct 'Sequence' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 128 bytes [altera-struct-pack-align] 146 | struct Sequence | ^ 147 | { 148 | std::map frames; 149 | bool framesInvalidated; 150 | std::vector framesConsec; /**< \brief consecutive representation of the frame coordinates */ 151 | }; | | __attribute__((aligned(128))) /code/include/toolbox/yourgame/gl/texture.h:146:20: note: use "__attribute__((aligned(128)))" to align struct 'Sequence' to 128 bytes /code/include/toolbox/yourgame/math/camera.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_CAMERA_H | ^~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_CAMERA_H 21 | #define YOURGAME_CAMERA_H | ~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_CAMERA_H /code/include/toolbox/yourgame/math/camera.h:24:1: warning: #includes are not sorted properly [llvm-include-order] 24 | #include | ^ ~~~~~~~~~~~~~ | "yourgame/math.h" 25 | #include | ~~~~~~~~~~~~~ | "yourgame/math/trafo.h" 26 | #include "yourgame/math.h" | ~~~~~~~~~~~~~~~~~ | 27 | #include "yourgame/math/trafo.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/math/camera.h:29:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 29 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 30 | { | ~ 31 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/toolbox/yourgame/math/trafo.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_TRAFO_H | ^~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_TRAFO_H 21 | #define YOURGAME_TRAFO_H | ~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_TRAFO_H /code/include/toolbox/yourgame/math/trafo.h:24:1: warning: #includes are not sorted properly [llvm-include-order] 24 | #include | ^ ~~~~~~~~~~~~~ | "yourgame/math.h" 25 | #include 26 | #include "yourgame/math.h" | ~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/math/trafo.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/toolbox/yourgame/math/trafo.h:56:13: warning: function 'getAxisGlobal' should be marked [[nodiscard]] [modernize-use-nodiscard] 56 | glm::vec3 getAxisGlobal(math::Axis ax) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/math/trafo.h:57:13: warning: function 'getEye' should be marked [[nodiscard]] [modernize-use-nodiscard] 57 | glm::vec3 getEye() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/math/trafo.h:58:13: warning: function 'getRotation' should be marked [[nodiscard]] [modernize-use-nodiscard] 58 | glm::quat getRotation() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/math/trafo.h:59:13: warning: function 'getScale' should be marked [[nodiscard]] [modernize-use-nodiscard] 59 | glm::vec3 getScale() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/assetmanager.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_ASSETMANAGER_H | ^~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_ASSETMANAGER_H 21 | #define YOURGAME_ASSETMANAGER_H | ~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_ASSETMANAGER_H /code/include/toolbox/yourgame/util/assetmanager.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~~~~~ | // std::uintptr_t 24 | #include // std::uintptr_t | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 25 | #include | ~~~~~~~~~~ | 26 | #include | ~~~~~ | 27 | #include | ~~~~~~~~ | /code/include/toolbox/yourgame/util/assetmanager.h:29:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 29 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 30 | { | ~ 31 | namespace util | ~~~~~~~~~~~~~~ | namespace yourgame::util /code/include/toolbox/yourgame/util/assetmanager.h:46:15: warning: class 'AssetManager' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 46 | class AssetManager | ^ /code/include/toolbox/yourgame/util/assetmanager.h:63:37: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 63 | bool insert(std::string name, T *obj) | ^ /code/include/toolbox/yourgame/util/assetmanager.h:76:23: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory] 76 | { delete reinterpret_cast(ptr); }; | ^ ~~~ /code/include/toolbox/yourgame/util/assetmanager.h:75:28: note: variable declared here 75 | [](std::uintptr_t ptr) | ^~~~~~~~~~~~~~~~~~ /code/include/toolbox/yourgame/util/assetmanager.h:76:30: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast] 76 | { delete reinterpret_cast(ptr); }; | ^ /code/include/toolbox/yourgame/util/assetmanager.h:85:58: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast] 85 | m_ptrMaps[typeid(T).hash_code()][name] = reinterpret_cast(obj); | ^ /code/include/toolbox/yourgame/util/assetmanager.h:98:37: warning: parameter 'name' is unused [misc-unused-parameters] 98 | void insert(std::string name, T obj) | ^~~~ | /*name*/ /code/include/toolbox/yourgame/util/assetmanager.h:98:37: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] /code/include/toolbox/yourgame/util/assetmanager.h:98:45: warning: parameter 'obj' is unused [misc-unused-parameters] 98 | void insert(std::string name, T obj) | ^~~ | /*obj*/ /code/include/toolbox/yourgame/util/assetmanager.h:111:32: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 111 | T *get(std::string name) | ^ /code/include/toolbox/yourgame/util/assetmanager.h:119:32: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast] 119 | return reinterpret_cast(itT->second); | ^ /code/include/toolbox/yourgame/util/assetmanager.h:119:32: warning: integer to pointer cast pessimizes optimization opportunities [performance-no-int-to-ptr] /code/include/toolbox/yourgame/util/assetmanager.h:149:38: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 149 | void destroy(std::string name) | ^ /code/include/toolbox/yourgame/util/assetmanager.h:174:21: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 174 | for (const auto &ptr : itMap->second) | ^ /code/include/toolbox/yourgame/util/assetmanager.h:189:21: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 189 | for (const auto &ptr : map.second) | ^ /code/include/toolbox_internal/yourgame_internal/util/assets.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_INTERNAL_ASSETS_H | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_INTERNAL_YOURGAME_INTERNAL_UTIL_ASSETS_H 21 | #define YOURGAME_INTERNAL_ASSETS_H | ~~~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_INTERNAL_YOURGAME_INTERNAL_UTIL_ASSETS_H /code/include/toolbox_internal/yourgame_internal/util/assets.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace util | ~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace assets | ~~~~~~~~~~~~~~~~ | namespace yourgame_internal::util::assets 30 | { 31 | extern yourgame::util::AssetManager manager; 32 | bool loadStockAssets(); 33 | void clearStockAssets(); 34 | } // namespace assets | ~~~~~~~~~~~~~~~~~~~~~ | } // namespace yourgame_internal::util::assets 35 | } // namespace util | ~~~~~~~~~~~~~~~~~~~ 36 | } // namespace yourgame_internal | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/include/toolbox_internal/yourgame_internal/util/assets.h:31:49: warning: variable 'manager' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 31 | extern yourgame::util::AssetManager manager; | ^ /code/src/toolbox/gl/drawing.cpp:24:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 24 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 25 | { | ~ 26 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/src/toolbox/gl/drawing.cpp:28:42: warning: no header providing "yourgame::gl::Geometry" is directly included [misc-include-cleaner] 20 | #include "yourgame_internal/util/assets.h" 21 | #include "yourgame/gl/conventions.h" 22 | #include "yourgame/gl/drawing.h" 23 | 24 | namespace yourgame 25 | { 26 | namespace gl 27 | { 28 | void drawGeo(const yourgame::gl::Geometry *geo, const yourgame::gl::DrawConfig &cfg) | ^ /code/src/toolbox/gl/drawing.cpp:30:18: warning: implicit conversion 'const yourgame::gl::Geometry *' -> 'bool' [readability-implicit-bool-conversion] 30 | if (!geo) | ~^ | == nullptr /code/src/toolbox/gl/drawing.cpp:36:17: warning: implicit conversion 'yourgame::gl::Shader *' -> 'bool' [readability-implicit-bool-conversion] 36 | if (cfg.shader) | ^ | != nullptr /code/src/toolbox/gl/drawing.cpp:38:23: warning: variable 'unif' is not initialized [cppcoreguidelines-init-variables] 38 | GLint unif; | ^ | = 0 /code/src/toolbox/gl/drawing.cpp:44:32: warning: implicit conversion 'yourgame::math::Camera *' -> 'bool' [readability-implicit-bool-conversion] 44 | auto mvp = cfg.camera ? (cfg.camera->pMat() * cfg.camera->vMat() * cfg.modelMat) | ^ | ( != nullptr) /code/src/toolbox/gl/drawing.cpp:46:64: warning: no header providing "glm::value_ptr" is directly included [misc-include-cleaner] 20 | glUniformMatrix4fv(unif, 1, GL_FALSE, glm::value_ptr(mvp)); | ^ /code/src/toolbox/gl/drawing.cpp:53:64: warning: no header providing "glm::value_ptr" is directly included [misc-include-cleaner] 53 | glUniformMatrix4fv(unif, 1, GL_FALSE, glm::value_ptr(cfg.modelMat)); | ^ /code/src/toolbox/gl/drawing.cpp:60:43: warning: no header providing "glm::inverseTranspose" is directly included [misc-include-cleaner] 20 | auto normalMat = glm::inverseTranspose(glm::mat3(cfg.modelMat)); | ^ /code/src/toolbox/gl/drawing.cpp:60:65: warning: no header providing "glm::mat3" is directly included [misc-include-cleaner] 20 | auto normalMat = glm::inverseTranspose(glm::mat3(cfg.modelMat)); | ^ /code/src/toolbox/gl/drawing.cpp:61:64: warning: no header providing "glm::value_ptr" is directly included [misc-include-cleaner] 61 | glUniformMatrix3fv(unif, 1, GL_FALSE, glm::value_ptr(normalMat)); | ^ /code/src/toolbox/gl/drawing.cpp:74:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 74 | for (const auto &t : cfg.textures) | ^ /code/src/toolbox/gl/drawing.cpp:76:21: warning: implicit conversion 'yourgame::gl::Texture *' -> 'bool' [readability-implicit-bool-conversion] 76 | if (t) | ^ | != nullptr /code/src/toolbox/gl/drawing.cpp:93:14: warning: no header providing "std::array" is directly included [misc-include-cleaner] 22 | std::array drawSprite(yourgame::gl::Texture *texture, | ^ /code/src/toolbox/gl/drawing.cpp:94:61: warning: no header providing "yourgame::gl::TextureCoords" is directly included [misc-include-cleaner] 20 | const yourgame::gl::TextureCoords &coords, | ^ /code/src/toolbox/gl/drawing.cpp:96:41: warning: 2 adjacent parameters of 'drawSprite' of similar type ('float') are easily swapped by mistake [bugprone-easily-swappable-parameters] 96 | float y, | ^~~~~~~~ 97 | float width, | ~~~~~~~~~~~ /code/src/toolbox/gl/drawing.cpp:96:47: note: the first parameter in the range is 'y' 96 | float y, | ^ /code/src/toolbox/gl/drawing.cpp:97:47: note: the last parameter in the range is 'width' 97 | float width, | ^~~~~ /code/src/toolbox/gl/drawing.cpp:98:41: warning: 2 adjacent parameters of 'drawSprite' of similar type ('float') are easily swapped by mistake [bugprone-easily-swappable-parameters] 98 | float height, | ^~~~~~~~~~~~~ 99 | float angle) | ~~~~~~~~~~~ /code/src/toolbox/gl/drawing.cpp:98:47: note: the first parameter in the range is 'height' 98 | float height, | ^~~~~~ /code/src/toolbox/gl/drawing.cpp:99:47: note: the last parameter in the range is 'angle' 99 | float angle) | ^~~~~ /code/src/toolbox/gl/drawing.cpp:104:17: warning: implicit conversion 'yourgame::gl::Shader *' -> 'bool' [readability-implicit-bool-conversion] 104 | if (cfg.shader) | ^ | != nullptr /code/src/toolbox/gl/drawing.cpp:113:17: warning: implicit conversion 'yourgame::gl::Texture *' -> 'bool' [readability-implicit-bool-conversion] 113 | if (texture) | ^ | != nullptr /code/src/toolbox/gl/drawing.cpp:117:26: warning: no header providing "std::fpclassify" is directly included [misc-include-cleaner] 22 | if (std::fpclassify(width) == FP_ZERO && std::fpclassify(height) == FP_ZERO) | ^ /code/src/toolbox/gl/drawing.cpp:117:47: warning: no header providing "FP_ZERO" is directly included [misc-include-cleaner] 117 | if (std::fpclassify(width) == FP_ZERO && std::fpclassify(height) == FP_ZERO) | ^ /code/src/toolbox/gl/drawing.cpp:132:13: warning: uninitialized record type: 'screenPos' [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 132 | std::array screenPos; | ^ | {} /code/src/toolbox/gl/drawing.cpp:134:17: warning: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays] 134 | GLint viewport[4]; | ^ /code/src/toolbox/gl/drawing.cpp:135:44: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,hicpp-no-array-decay] 135 | glGetIntegerv(GL_VIEWPORT, viewport); | ^ /code/src/toolbox/gl/drawing.cpp:137:17: warning: use auto when initializing with a cast to avoid duplicating the type name [hicpp-use-auto,modernize-use-auto] 137 | float windowWidth = static_cast(viewport[2]); | ^~~~~ | auto /code/src/toolbox/gl/drawing.cpp:137:17: warning: variable 'windowWidth' of type 'float' can be declared 'const' [misc-const-correctness] 137 | float windowWidth = static_cast(viewport[2]); | ^ | const /code/src/toolbox/gl/drawing.cpp:138:17: warning: use auto when initializing with a cast to avoid duplicating the type name [hicpp-use-auto,modernize-use-auto] 138 | float windowHeight = static_cast(viewport[3]); | ^~~~~ | auto /code/src/toolbox/gl/drawing.cpp:138:17: warning: variable 'windowHeight' of type 'float' can be declared 'const' [misc-const-correctness] 138 | float windowHeight = static_cast(viewport[3]); | ^ | const /code/src/toolbox/gl/drawing.cpp:142:33: warning: no header providing "yourgame::math::Trafo" is directly included [misc-include-cleaner] 20 | yourgame::math::Trafo trafo; | ^ /code/src/toolbox/gl/drawing.cpp:144:59: warning: no header providing "yourgame::math::Axis" is directly included [misc-include-cleaner] 20 | trafo.rotateGlobal(angle, yourgame::math::Axis::Z); | ^ /code/src/toolbox/gl/drawing.cpp:152:37: warning: no header providing "glm::ortho" is directly included [misc-include-cleaner] 20 | cfg.modelMat = glm::ortho(0.0f, windowWidth, -windowHeight, 0.0f, -1.0f, 1.0f) * | ^ /code/src/toolbox/gl/drawing.cpp:173:18: warning: implicit conversion 'yourgame::gl::Texture *' -> 'bool' [readability-implicit-bool-conversion] 173 | if (!texture || !camera) | ~^ | ( == nullptr) /code/src/toolbox/gl/drawing.cpp:173:30: warning: implicit conversion 'yourgame::math::Camera *' -> 'bool' [readability-implicit-bool-conversion] 173 | if (!texture || !camera) | ~^ | ( == nullptr) /code/src/toolbox/gl/drawing.cpp:178:13: warning: variable 'isCubemap' of type 'bool' can be declared 'const' [misc-const-correctness] 178 | bool isCubemap = (texture->getTarget() == GL_TEXTURE_CUBE_MAP); | ^ | const /code/src/toolbox/gl/drawing.cpp:190:31: warning: no header providing "yourgame::gl::Lightsource" is directly included [misc-include-cleaner] 20 | yourgame::gl::Lightsource light; | ^ /code/src/toolbox/gl/drawing.cpp:197:17: warning: implicit conversion 'yourgame::math::Trafo *' -> 'bool' [readability-implicit-bool-conversion] 197 | if (trafo) | ^ | != nullptr /code/src/toolbox/gl/drawing.cpp:211:27: warning: variable 'depthMask' is not initialized [cppcoreguidelines-init-variables] 211 | GLboolean depthMask; | ^ | = 0 /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/platform_desktop_web/yourgame.cpp /code/include/base/yourgame/audio.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_AUDIO_H | ^~~~~~~~~~~~~~~~ | BASE_YOURGAME_AUDIO_H 21 | #define YOURGAME_AUDIO_H | ~~~~~~~~~~~~~~~~ | BASE_YOURGAME_AUDIO_H /code/include/base/yourgame/audio.h:26:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 26 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 27 | { | ~ 28 | namespace audio | ~~~~~~~~~~~~~~~ | namespace yourgame::audio /code/include/base/yourgame/control.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_CONTROL_H | ^~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_CONTROL_H 21 | #define YOURGAME_CONTROL_H | ~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_CONTROL_H /code/include/base/yourgame/control.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace control | ~~~~~~~~~~~~~~~~~ | namespace yourgame::control /code/include/base/yourgame/file.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_FILE_H | ^~~~~~~~~~~~~~~ | BASE_YOURGAME_FILE_H 21 | #define YOURGAME_FILE_H | ~~~~~~~~~~~~~~~ | BASE_YOURGAME_FILE_H /code/include/base/yourgame/file.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace file | ~~~~~~~~~~~~~~ | namespace yourgame::file /code/include/base/yourgame/gl_include.h:38:9: warning: header guard does not follow preferred style [llvm-header-guard] 38 | #ifndef YOURGAME_GL_INCLUDE_H | ^~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H 39 | #define YOURGAME_GL_INCLUDE_H | ~~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H /code/include/base/yourgame/input.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_INPUT_H | ^~~~~~~~~~~~~~~~ | BASE_YOURGAME_INPUT_H 21 | #define YOURGAME_INPUT_H | ~~~~~~~~~~~~~~~~ | BASE_YOURGAME_INPUT_H /code/include/base/yourgame/input.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace input | ~~~~~~~~~~~~~~~ | namespace yourgame::input /code/include/base/yourgame/input.h:28:14: warning: enum 'Source' uses a larger base type ('unsigned int', size: 4 bytes) than necessary for its value set, consider using 'std::uint16_t' (2 bytes) as the base type to reduce its size [performance-enum-size] 28 | enum Source | ^ /code/include/base/yourgame/log.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_LOG_H | ^~~~~~~~~~~~~~ | BASE_YOURGAME_LOG_H 21 | #define YOURGAME_LOG_H | ~~~~~~~~~~~~~~ | BASE_YOURGAME_LOG_H /code/include/base/yourgame/log.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace log | ~~~~~~~~~~~~~ | namespace yourgame::log /code/include/base/yourgame/log.h:35:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 35 | if (logr != nullptr) | ^ | { 36 | logr->debug(s, value, args...); | /code/include/base/yourgame/log.h:46:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 46 | if (logr != nullptr) | ^ | { 47 | logr->debug(value); | /code/include/base/yourgame/log.h:56:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 56 | if (logr != nullptr) | ^ | { 57 | logr->info(s, value, args...); | /code/include/base/yourgame/log.h:65:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 65 | if (logr != nullptr) | ^ | { 66 | logr->info(value); | /code/include/base/yourgame/log.h:74:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 74 | if (logr != nullptr) | ^ | { 75 | logr->warn(s, value, args...); | /code/include/base/yourgame/log.h:83:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 83 | if (logr != nullptr) | ^ | { 84 | logr->warn(value); | /code/include/base/yourgame/log.h:92:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 92 | if (logr != nullptr) | ^ | { 93 | logr->error(s, value, args...); | /code/include/base/yourgame/log.h:101:33: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] 101 | if (logr != nullptr) | ^ | { 102 | logr->error(value); | /code/include/base/yourgame/math.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_MATH_H | ^~~~~~~~~~~~~~~ | BASE_YOURGAME_MATH_H 21 | #define YOURGAME_MATH_H | ~~~~~~~~~~~~~~~ | BASE_YOURGAME_MATH_H /code/include/base/yourgame/math.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/base/yourgame/math.h:27:20: warning: enum 'Projection' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 27 | enum class Projection | ^ /code/include/base/yourgame/math.h:33:20: warning: enum 'Axis' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 33 | enum class Axis | ^ /code/include/base/yourgame/time.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_TIME_H | ^~~~~~~~~~~~~~~ | BASE_YOURGAME_TIME_H 21 | #define YOURGAME_TIME_H | ~~~~~~~~~~~~~~~ | BASE_YOURGAME_TIME_H /code/include/base/yourgame/time.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace time | ~~~~~~~~~~~~~~ | namespace yourgame::time 26 | { 27 | /** \brief returns time clock period [seconds] (clock precision) */ 28 | double getClockPeriod(); 29 | 30 | /** \brief returns time delta [seconds] since last cycle */ 31 | double getDelta(); 32 | 33 | /** \brief returns (monotonic) time duration [seconds] since init */ 34 | double getTime(); 35 | 36 | /** \brief resets the timing so time retrieved by getTime() starts at 0 again */ 37 | void reset(); 38 | } // namespace time | ~~~~~~~~~~~~~~~~~~~ | } // namespace yourgame::time /code/include/base/yourgame/version.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_VERSION_H | ^~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_VERSION_H 21 | #define YOURGAME_VERSION_H | ~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_VERSION_H /code/include/base/yourgame/version.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace version | ~~~~~~~~~~~~~~~~~ | namespace yourgame::version /code/include/base/yourgame/yourgame.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_YOURGAME_H | ^~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_YOURGAME_H 21 | #define YOURGAME_YOURGAME_H | ~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_YOURGAME_H /code/include/base_internal/yourgame_internal/file_desktop.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_INTERNAL_FILE_DESKTOP_H | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_FILE_DESKTOP_H 21 | #define YOURGAME_INTERNAL_FILE_DESKTOP_H | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_FILE_DESKTOP_H /code/include/base_internal/yourgame_internal/file_desktop.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace file | ~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace desktop | ~~~~~~~~~~~~~~~~~ | namespace yourgame_internal::file::desktop 28 | { 29 | void initFile(); 30 | } 31 | } // namespace file | ~~~~~~~~~~~~~~~~~~~ 32 | } // namespace yourgame_internal | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/include/base_internal/yourgame_internal/file_desktop.h:30:9: warning: namespace 'desktop' not terminated with a closing comment [llvm-namespace-comment] 30 | } | ^ | // namespace desktop /code/include/base_internal/yourgame_internal/file_desktop.h:27:19: note: namespace 'desktop' starts here 27 | namespace desktop | ^ /code/include/base_internal/yourgame_internal/input.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_INTERNAL_INPUT_H | ^~~~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_INPUT_H 21 | #define YOURGAME_INTERNAL_INPUT_H | ~~~~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_INPUT_H /code/include/base_internal/yourgame_internal/input.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~ | "yourgame/input.h" 24 | #include "yourgame/input.h" | ~~~~~~~~~~~~~~~~~~ | /code/include/base_internal/yourgame_internal/input.h:26:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 26 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 27 | { | ~ 28 | namespace input | ~~~~~~~~~~~~~~~ | namespace yourgame_internal::input /code/include/base_internal/yourgame_internal/input.h:30:16: warning: accessing fields in struct 'InputValue' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 8 bytes [altera-struct-pack-align] 30 | struct InputValue | ^ 31 | { 32 | InputValue(float v = 0.0f) : val(v), valLast(v) {} // default ctor 33 | float val; 34 | float valLast; 35 | }; | | __attribute__((aligned(8))) /code/include/base_internal/yourgame_internal/input.h:30:16: note: use "__attribute__((aligned(8)))" to align struct 'InputValue' to 8 bytes /code/include/base_internal/yourgame_internal/input.h:32:13: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,hicpp-explicit-conversions] 32 | InputValue(float v = 0.0f) : val(v), valLast(v) {} // default ctor | ^ | explicit /code/include/base_internal/yourgame_internal/input.h:33:19: warning: member variable 'val' has public visibility [misc-non-private-member-variables-in-classes] 33 | float val; | ^ /code/include/base_internal/yourgame_internal/input.h:34:19: warning: member variable 'valLast' has public visibility [misc-non-private-member-variables-in-classes] 34 | float valLast; | ^ /code/include/base_internal/yourgame_internal/input.h:37:62: warning: variable 'inputStates' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 37 | extern std::map inputStates; | ^ /code/include/base_internal/yourgame_internal/input_desktop.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_INTERNAL_INPUT_DESKTOP_H | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_INPUT_DESKTOP_H 21 | #define YOURGAME_INTERNAL_INPUT_DESKTOP_H | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_INPUT_DESKTOP_H /code/include/base_internal/yourgame_internal/input_desktop.h:26:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 26 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 27 | { | ~ 28 | namespace input | ~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace desktop | ~~~~~~~~~~~~~~~~~ | namespace yourgame_internal::input::desktop 31 | { 32 | void initInput(GLFWwindow *window); 33 | } 34 | } // namespace input | ~~~~~~~~~~~~~~~~~~~~ 35 | } // namespace yourgame_internal | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/include/base_internal/yourgame_internal/input_desktop.h:33:9: warning: namespace 'desktop' not terminated with a closing comment [llvm-namespace-comment] 33 | } | ^ | // namespace desktop /code/include/base_internal/yourgame_internal/input_desktop.h:30:19: note: namespace 'desktop' starts here 30 | namespace desktop | ^ /code/include/base_internal/yourgame_internal/log.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_INTERNAL_LOG_H | ^~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_LOG_H 21 | #define YOURGAME_INTERNAL_LOG_H | ~~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_LOG_H /code/include/base_internal/yourgame_internal/log.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace log | ~~~~~~~~~~~~~ | namespace yourgame_internal::log 26 | { 27 | void init(int argc, char *argv[]); 28 | } 29 | } // namespace yourgame_internal | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/include/base_internal/yourgame_internal/log.h:27:29: warning: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays] 27 | void init(int argc, char *argv[]); | ^ /code/include/base_internal/yourgame_internal/log.h:28:5: warning: namespace 'log' not terminated with a closing comment [llvm-namespace-comment] 28 | } | ^ | // namespace log /code/include/base_internal/yourgame_internal/log.h:25:15: note: namespace 'log' starts here 25 | namespace log | ^ /code/include/base_internal/yourgame_internal/mygame_external.h:21:9: warning: header guard does not follow preferred style [llvm-header-guard] 21 | #ifndef MYGAME_EXTERNAL_H | ^~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_MYGAME_EXTERNAL_H 22 | #define MYGAME_EXTERNAL_H | ~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_MYGAME_EXTERNAL_H /code/include/base_internal/yourgame_internal/mygame_external.h:42:32: warning: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays] 42 | extern void init(int argc, char *argv[]); | ^ /code/include/base_internal/yourgame_internal/time.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_INTERNAL_TIME_H | ^~~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_TIME_H 21 | #define YOURGAME_INTERNAL_TIME_H | ~~~~~~~~~~~~~~~~~~~~~~~~ | BASE_INTERNAL_YOURGAME_INTERNAL_TIME_H /code/include/base_internal/yourgame_internal/time.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace time | ~~~~~~~~~~~~~~ | namespace yourgame_internal::time 26 | { 27 | void init(); 28 | void tick(); 29 | } // namespace time | ~~~~~~~~~~~~~~~~~~~ | } // namespace yourgame_internal::time 30 | } // namespace yourgame_internal | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/include/toolbox/yourgame/gl/buffer.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLBUFFER_H | ^~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_BUFFER_H 21 | #define YOURGAME_GLBUFFER_H | ~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_BUFFER_H /code/include/toolbox/yourgame/gl/buffer.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/buffer.h:29:15: warning: class 'Buffer' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 29 | class Buffer | ^ /code/include/toolbox/yourgame/gl/buffer.h:44:13: warning: constructor does not initialize these fields: m_target, m_handle, m_usage [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 44 | Buffer() {} | ^ 45 | GLenum m_target; | | {} 46 | GLuint m_handle; | | {} 47 | GLenum m_usage; | | {} /code/include/toolbox/yourgame/gl/conventions.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLCONVENTIONS_H | ^~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_CONVENTIONS_H 21 | #define YOURGAME_GLCONVENTIONS_H | ~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_CONVENTIONS_H /code/include/toolbox/yourgame/gl/conventions.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/conventions.h:38:30: warning: variable 'unifNameMvpMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 38 | extern const GLchar *unifNameMvpMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:39:30: warning: variable 'unifNameVpMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 39 | extern const GLchar *unifNameVpMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:40:30: warning: variable 'unifNameModelMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 40 | extern const GLchar *unifNameModelMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:41:30: warning: variable 'unifNameNormalMatrix' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 41 | extern const GLchar *unifNameNormalMatrix; | ^ /code/include/toolbox/yourgame/gl/conventions.h:42:30: warning: variable 'unifNameCameraPosition' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 42 | extern const GLchar *unifNameCameraPosition; | ^ /code/include/toolbox/yourgame/gl/conventions.h:43:30: warning: variable 'unifNameCameraTrafo' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 43 | extern const GLchar *unifNameCameraTrafo; | ^ /code/include/toolbox/yourgame/gl/conventions.h:44:30: warning: variable 'unifNameSkyRotationInv' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 44 | extern const GLchar *unifNameSkyRotationInv; | ^ /code/include/toolbox/yourgame/gl/conventions.h:45:30: warning: variable 'unifNameTextureDiffuse' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 45 | extern const GLchar *unifNameTextureDiffuse; | ^ /code/include/toolbox/yourgame/gl/conventions.h:46:30: warning: variable 'unifNameTextureSkyCube' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 46 | extern const GLchar *unifNameTextureSkyCube; | ^ /code/include/toolbox/yourgame/gl/conventions.h:47:30: warning: variable 'unifNameTextureSky' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 47 | extern const GLchar *unifNameTextureSky; | ^ /code/include/toolbox/yourgame/gl/conventions.h:48:30: warning: variable 'unifNameTextureBufferDepth' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 48 | extern const GLchar *unifNameTextureBufferDepth; | ^ /code/include/toolbox/yourgame/gl/conventions.h:49:30: warning: variable 'unifNameTextureBufferColor0' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 49 | extern const GLchar *unifNameTextureBufferColor0; | ^ /code/include/toolbox/yourgame/gl/conventions.h:50:30: warning: variable 'unifNameLightAmbient' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 50 | extern const GLchar *unifNameLightAmbient; | ^ /code/include/toolbox/yourgame/gl/conventions.h:51:30: warning: variable 'unifNameLightDiffuse' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 51 | extern const GLchar *unifNameLightDiffuse; | ^ /code/include/toolbox/yourgame/gl/conventions.h:52:30: warning: variable 'unifNameLightSpecular' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 52 | extern const GLchar *unifNameLightSpecular; | ^ /code/include/toolbox/yourgame/gl/conventions.h:53:30: warning: variable 'unifNameLightPosition' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 53 | extern const GLchar *unifNameLightPosition; | ^ /code/include/toolbox/yourgame/gl/conventions.h:54:30: warning: variable 'unifNameSubtexture' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 54 | extern const GLchar *unifNameSubtexture; | ^ /code/include/toolbox/yourgame/gl/drawing.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLDRAWING_H | ^~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_DRAWING_H 21 | #define YOURGAME_GLDRAWING_H | ~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_DRAWING_H /code/include/toolbox/yourgame/gl/drawing.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~ | "yourgame/gl/geometry.h" 24 | #include | ~~~~~~~~ | "yourgame/gl/shader.h" 25 | #include "yourgame/math/camera.h" | ~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/gl/texture.h" 26 | #include "yourgame/math/trafo.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/math/camera.h" 27 | #include "yourgame/gl/geometry.h" | ~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/math/trafo.h" 28 | #include "yourgame/gl/shader.h" | ~~~~~~~~~~~~~~~~~~~~~~ | 29 | #include "yourgame/gl/texture.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/drawing.h:31:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 31 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 32 | { | ~ 33 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/drawing.h:35:16: warning: accessing fields in struct 'DrawConfig' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 128 bytes [altera-struct-pack-align] 35 | struct DrawConfig | ^ 36 | { 37 | yourgame::gl::Shader *shader = nullptr; 38 | yourgame::math::Camera *camera = nullptr; 39 | glm::mat4 modelMat = glm::mat4(1); 40 | std::vector textures = {}; 41 | std::array subtex = {0.0f, 1.0f, 0.0f, 1.0f}; 42 | GLsizei instancecount = 1; 43 | }; | | __attribute__((aligned(128))) /code/include/toolbox/yourgame/gl/drawing.h:35:16: note: use "__attribute__((aligned(128)))" to align struct 'DrawConfig' to 128 bytes /code/include/toolbox/yourgame/gl/drawing.h:40:59: warning: initializer for member 'textures' is redundant [readability-redundant-member-init] 40 | std::vector textures = {}; | ^~~~ /code/include/toolbox/yourgame/gl/framebuffer.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLFRAMEBUFFER_H | ^~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_FRAMEBUFFER_H 21 | #define YOURGAME_GLFRAMEBUFFER_H | ~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_FRAMEBUFFER_H /code/include/toolbox/yourgame/gl/framebuffer.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/texture.h" 24 | #include "yourgame/gl_include.h" 25 | #include "yourgame/gl/texture.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/framebuffer.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/framebuffer.h:31:15: warning: class 'Framebuffer' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 31 | class Framebuffer | ^ /code/include/toolbox/yourgame/gl/framebuffer.h:34:20: warning: accessing fields in struct 'TextureAttachDescr' is inefficient due to padding; only needs 44 bytes but is using 48 bytes [altera-struct-pack-align] 34 | struct TextureAttachDescr | ^ 35 | { 36 | GLint internalformat; 37 | GLenum format; 38 | GLenum type; 39 | GLenum unit; 40 | std::vector> parameteri; 41 | GLenum attachment; 42 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/gl/framebuffer.h:34:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'TextureAttachDescr' /code/include/toolbox/yourgame/gl/framebuffer.h:34:20: warning: accessing fields in struct 'TextureAttachDescr' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 64 bytes [altera-struct-pack-align] 34 | struct TextureAttachDescr | ^ 35 | { 36 | GLint internalformat; 37 | GLenum format; 38 | GLenum type; 39 | GLenum unit; 40 | std::vector> parameteri; 41 | GLenum attachment; 42 | }; | | __attribute__((aligned(64))) /code/include/toolbox/yourgame/gl/framebuffer.h:34:20: note: use "__attribute__((aligned(64)))" to align struct 'TextureAttachDescr' to 64 bytes /code/include/toolbox/yourgame/gl/framebuffer.h:59:13: warning: constructor does not initialize these fields: m_handle [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 59 | Framebuffer() {} | ^ 60 | GLuint m_handle; | | {} /code/include/toolbox/yourgame/gl/geometry.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLGEOMETRY_H | ^~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_GEOMETRY_H 21 | #define YOURGAME_GLGEOMETRY_H | ~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_GEOMETRY_H /code/include/toolbox/yourgame/gl/geometry.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/buffer.h" 24 | #include | ~~~~~ | "yourgame/gl/shape.h" 25 | #include | ~~~~~~~~ | "yourgame/gl_include.h" 26 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | 27 | #include "yourgame/gl/buffer.h" | ~~~~~~~~~~~~~~~~~~~~~~ | 28 | #include "yourgame/gl/shape.h" | ~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/geometry.h:30:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 30 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 31 | { | ~ 32 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/geometry.h:34:15: warning: class 'Geometry' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 34 | class Geometry | ^ /code/include/toolbox/yourgame/gl/lightsource.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLLIGHTSOURCE_H | ^~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_LIGHTSOURCE_H 21 | #define YOURGAME_GLLIGHTSOURCE_H | ~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_LIGHTSOURCE_H /code/include/toolbox/yourgame/gl/lightsource.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/loading.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLLOADING_H | ^~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_LOADING_H 21 | #define YOURGAME_GLLOADING_H | ~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_LOADING_H /code/include/toolbox/yourgame/gl/loading.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/conventions.h" 24 | #include | ~~~~~~~~ | "yourgame/gl/geometry.h" 25 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/gl/shader.h" 26 | #include "yourgame/gl/geometry.h" | ~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/gl/texture.h" 27 | #include "yourgame/gl/shader.h" | ~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/gl_include.h" 28 | #include "yourgame/gl/texture.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | 29 | #include "yourgame/gl/conventions.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/loading.h:31:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 31 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 32 | { | ~ 33 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/loading.h:35:16: warning: accessing fields in struct 'TextureConfig' is inefficient due to padding; only needs 38 bytes but is using 40 bytes [altera-struct-pack-align] 35 | struct TextureConfig | ^ 36 | { 37 | GLenum unit = gl::textureUnitDiffuse; 38 | GLint minMagFilter = GL_LINEAR; 39 | GLint wrapMode = GL_REPEAT; 40 | bool generateMipmap = false; 41 | bool premultiplyAlpha = true; 42 | std::vector> parameteri = {}; 43 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/gl/loading.h:35:16: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'TextureConfig' /code/include/toolbox/yourgame/gl/loading.h:35:16: warning: accessing fields in struct 'TextureConfig' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 64 bytes [altera-struct-pack-align] 35 | struct TextureConfig | ^ 36 | { 37 | GLenum unit = gl::textureUnitDiffuse; 38 | GLint minMagFilter = GL_LINEAR; 39 | GLint wrapMode = GL_REPEAT; 40 | bool generateMipmap = false; 41 | bool premultiplyAlpha = true; 42 | std::vector> parameteri = {}; 43 | }; | | __attribute__((aligned(64))) /code/include/toolbox/yourgame/gl/loading.h:35:16: note: use "__attribute__((aligned(64)))" to align struct 'TextureConfig' to 64 bytes /code/include/toolbox/yourgame/gl/loading.h:42:62: warning: initializer for member 'parameteri' is redundant [readability-redundant-member-init] 42 | std::vector> parameteri = {}; | ^~~~ /code/include/toolbox/yourgame/gl/particles.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLPARTICLES_H | ^~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_PARTICLES_H 21 | #define YOURGAME_GLPARTICLES_H | ~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_PARTICLES_H /code/include/toolbox/yourgame/gl/particles.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include "yourgame/math/particles.h" | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/gl/geometry.h" 24 | #include "yourgame/gl_include.h" 25 | #include "yourgame/gl/geometry.h" | ~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/math/particles.h" /code/include/toolbox/yourgame/gl/particles.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/particles.h:31:15: warning: class 'Particles' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 31 | class Particles : public yourgame::math::Particles | ^ /code/include/toolbox/yourgame/gl/particles.h:31:15: warning: destructor of 'Particles' is public and non-virtual [cppcoreguidelines-virtual-class-destructor] /code/include/toolbox/yourgame/gl/particles.h:31:15: note: make it public and virtual 31 | class Particles : public yourgame::math::Particles | ^ 32 | { 33 | public: 34 | static Particles *make(const Config cfg, yourgame::gl::Geometry *geo); 35 | ~Particles(); | virtual /code/include/toolbox/yourgame/gl/particles.h:34:36: warning: parameter 'cfg' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls] 34 | static Particles *make(const Config cfg, yourgame::gl::Geometry *geo); | ^~~~~ /code/include/toolbox/yourgame/gl/shader.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLSHADER_H | ^~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHADER_H 21 | #define YOURGAME_GLSHADER_H | ~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHADER_H /code/include/toolbox/yourgame/gl/shader.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/lightsource.h" 24 | #include | ~~~~~~~~ | "yourgame/gl_include.h" 25 | #include | ~~~~~ | "yourgame/math/camera.h" 26 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | 27 | #include "yourgame/gl/lightsource.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 28 | #include "yourgame/math/camera.h" | ~~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/shader.h:30:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 30 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 31 | { | ~ 32 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/shader.h:34:15: warning: class 'Shader' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 34 | class Shader | ^ /code/include/toolbox/yourgame/gl/shader.h:51:13: warning: constructor does not initialize these fields: m_programHandle [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 51 | Shader() {} | ^ 52 | GLuint m_programHandle; | | {} /code/include/toolbox/yourgame/gl/shape.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLSHAPE_H | ^~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHAPE_H 21 | #define YOURGAME_GLSHAPE_H | ~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SHAPE_H /code/include/toolbox/yourgame/gl/shape.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/buffer.h" 24 | #include "yourgame/gl_include.h" 25 | #include "yourgame/gl/buffer.h" | ~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/shape.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/shape.h:31:15: warning: class 'Shape' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 31 | class Shape | ^ /code/include/toolbox/yourgame/gl/shape.h:34:20: warning: accessing fields in struct 'ArrBufferDescr' is inefficient due to padding; only needs 29 bytes but is using 40 bytes [altera-struct-pack-align] 34 | struct ArrBufferDescr | ^ 35 | { 36 | GLuint index; 37 | GLint size; 38 | GLenum type; 39 | GLboolean normalized; 40 | GLsizei stride; 41 | const GLvoid *pointer; 42 | GLuint attribDivisor; 43 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/gl/shape.h:34:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'ArrBufferDescr' /code/include/toolbox/yourgame/gl/shape.h:34:20: warning: accessing fields in struct 'ArrBufferDescr' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 32 bytes [altera-struct-pack-align] 34 | struct ArrBufferDescr | ^ 35 | { 36 | GLuint index; 37 | GLint size; 38 | GLenum type; 39 | GLboolean normalized; 40 | GLsizei stride; 41 | const GLvoid *pointer; 42 | GLuint attribDivisor; 43 | }; | | __attribute__((aligned(32))) /code/include/toolbox/yourgame/gl/shape.h:34:20: note: use "__attribute__((aligned(32)))" to align struct 'ArrBufferDescr' to 32 bytes /code/include/toolbox/yourgame/gl/shape.h:45:20: warning: accessing fields in struct 'ElemArrBufferDescr' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 16 bytes [altera-struct-pack-align] 45 | struct ElemArrBufferDescr | ^ 46 | { 47 | GLenum type; 48 | GLenum drawMode; 49 | GLsizei numElements; 50 | }; | | __attribute__((aligned(16))) /code/include/toolbox/yourgame/gl/shape.h:45:20: note: use "__attribute__((aligned(16)))" to align struct 'ElemArrBufferDescr' to 16 bytes /code/include/toolbox/yourgame/gl/shape.h:68:13: warning: constructor does not initialize these fields: m_elArDescr, m_vaoHandle [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 68 | Shape() {} | ^ 69 | ElemArrBufferDescr m_elArDescr; | | {} 70 | GLuint m_vaoHandle; | | {} /code/include/toolbox/yourgame/gl/spritegrid.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLSPRITEGRID_H | ^~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SPRITEGRID_H 21 | #define YOURGAME_GLSPRITEGRID_H | ~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_SPRITEGRID_H /code/include/toolbox/yourgame/gl/spritegrid.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | "yourgame/gl/geometry.h" 24 | #include | ~~~~~~~~ | "yourgame/gl/texture.h" 25 | #include "yourgame/gl/geometry.h" | ~~~~~~~~~~~~~~~~~~~~~~~~ | 26 | #include "yourgame/gl/texture.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/spritegrid.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/spritegrid.h:32:15: warning: class 'SpriteGrid' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 32 | class SpriteGrid | ^ /code/include/toolbox/yourgame/gl/spritegrid.h:67:13: warning: function 'geo' should be marked [[nodiscard]] [modernize-use-nodiscard] 67 | Geometry *geo() const { return m_geo; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLTEXTURE_H | ^~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_TEXTURE_H 21 | #define YOURGAME_GLTEXTURE_H | ~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_TEXTURE_H /code/include/toolbox/yourgame/gl/texture.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~ | "yourgame/gl_include.h" 24 | #include | ~~~~~~~~ | 25 | #include | ~~~~~~~~ | 26 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/texture.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/texture.h:32:16: warning: accessing fields in struct 'TextureCoords' is inefficient due to padding; only needs 41 bytes but is using 44 bytes [altera-struct-pack-align] 32 | struct TextureCoords | ^ /code/include/toolbox/yourgame/gl/texture.h:32:16: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'TextureCoords' /code/include/toolbox/yourgame/gl/texture.h:32:16: warning: accessing fields in struct 'TextureCoords' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 64 bytes [altera-struct-pack-align] 32 | struct TextureCoords | ^ /code/include/toolbox/yourgame/gl/texture.h:32:16: note: use "__attribute__((aligned(64)))" to align struct 'TextureCoords' to 64 bytes /code/include/toolbox/yourgame/gl/texture.h:35:13: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default,modernize-use-equals-default] 35 | TextureCoords() {} | ^ ~~ | = default; /code/include/toolbox/yourgame/gl/texture.h:37:27: warning: 2 adjacent parameters of 'TextureCoords' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters] 37 | TextureCoords(int x, int y, int width, int height, int texWidth, int texHeight, bool cwRot) | ^~~~~~~~~~~~ /code/include/toolbox/yourgame/gl/texture.h:37:31: note: the first parameter in the range is 'x' 37 | TextureCoords(int x, int y, int width, int height, int texWidth, int texHeight, bool cwRot) | ^ /code/include/toolbox/yourgame/gl/texture.h:37:38: note: the last parameter in the range is 'y' 37 | TextureCoords(int x, int y, int width, int height, int texWidth, int texHeight, bool cwRot) | ^ /code/include/toolbox/yourgame/gl/texture.h:55:19: warning: member variable 'uMin' has public visibility [misc-non-private-member-variables-in-classes] 55 | float uMin = 0.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:56:19: warning: member variable 'uMax' has public visibility [misc-non-private-member-variables-in-classes] 56 | float uMax = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:57:19: warning: member variable 'vMin' has public visibility [misc-non-private-member-variables-in-classes] 57 | float vMin = 0.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:58:19: warning: member variable 'vMax' has public visibility [misc-non-private-member-variables-in-classes] 58 | float vMax = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:59:17: warning: member variable 'xMinPixel' has public visibility [misc-non-private-member-variables-in-classes] 59 | int xMinPixel = 0; | ^ /code/include/toolbox/yourgame/gl/texture.h:60:17: warning: member variable 'xMaxPixel' has public visibility [misc-non-private-member-variables-in-classes] 60 | int xMaxPixel = 1; | ^ /code/include/toolbox/yourgame/gl/texture.h:61:17: warning: member variable 'yMinPixel' has public visibility [misc-non-private-member-variables-in-classes] 61 | int yMinPixel = 0; | ^ /code/include/toolbox/yourgame/gl/texture.h:62:17: warning: member variable 'yMaxPixel' has public visibility [misc-non-private-member-variables-in-classes] 62 | int yMaxPixel = 1; | ^ /code/include/toolbox/yourgame/gl/texture.h:63:19: warning: member variable 'aspectRatioPixel' has public visibility [misc-non-private-member-variables-in-classes] 63 | float aspectRatioPixel = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:64:19: warning: member variable 'aspectRatioPixelInverse' has public visibility [misc-non-private-member-variables-in-classes] 64 | float aspectRatioPixelInverse = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:65:18: warning: member variable 'cwRotated' has public visibility [misc-non-private-member-variables-in-classes] 65 | bool cwRotated = false; | ^ /code/include/toolbox/yourgame/gl/texture.h:68:15: warning: class 'Texture' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 68 | class Texture | ^ /code/include/toolbox/yourgame/gl/texture.h:95:13: warning: function 'handle' should be marked [[nodiscard]] [modernize-use-nodiscard] 95 | GLuint handle() const { return m_handle; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:96:13: warning: function 'getTarget' should be marked [[nodiscard]] [modernize-use-nodiscard] 96 | GLenum getTarget() const { return m_target; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:97:13: warning: function 'getWidth' should be marked [[nodiscard]] [modernize-use-nodiscard] 97 | GLsizei getWidth() const { return m_width; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:98:13: warning: function 'getHeight' should be marked [[nodiscard]] [modernize-use-nodiscard] 98 | GLsizei getHeight() const { return m_height; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:107:13: warning: function 'getCoords' should be marked [[nodiscard]] [modernize-use-nodiscard] 107 | TextureCoords getCoords(std::string name) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:122:13: warning: function 'getNumFrames' should be marked [[nodiscard]] [modernize-use-nodiscard] 122 | int getNumFrames(std::string sequenceName) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:127:13: warning: function 'getSequenceNames' should be marked [[nodiscard]] [modernize-use-nodiscard] 127 | std::vector getSequenceNames() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:136:13: warning: function 'getGridCoords' should be marked [[nodiscard]] [modernize-use-nodiscard] 136 | TextureCoords getGridCoords(int gridWidth, int gridHeight, int index) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:139:13: warning: constructor does not initialize these fields: m_handle, m_target, m_unit, m_width, m_height [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 139 | Texture() {} | ^ 140 | GLuint m_handle; | | {} 141 | GLenum m_target; | | {} 142 | GLenum m_unit; | | {} 143 | GLsizei m_width; | | {} 144 | GLsizei m_height; | | {} /code/include/toolbox/yourgame/gl/texture.h:146:20: warning: accessing fields in struct 'Sequence' is inefficient due to padding; only needs 73 bytes but is using 80 bytes [altera-struct-pack-align] 146 | struct Sequence | ^ 147 | { 148 | std::map frames; 149 | bool framesInvalidated; 150 | std::vector framesConsec; /**< \brief consecutive representation of the frame coordinates */ 151 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/gl/texture.h:146:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'Sequence' /code/include/toolbox/yourgame/gl/texture.h:146:20: warning: accessing fields in struct 'Sequence' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 128 bytes [altera-struct-pack-align] 146 | struct Sequence | ^ 147 | { 148 | std::map frames; 149 | bool framesInvalidated; 150 | std::vector framesConsec; /**< \brief consecutive representation of the frame coordinates */ 151 | }; | | __attribute__((aligned(128))) /code/include/toolbox/yourgame/gl/texture.h:146:20: note: use "__attribute__((aligned(128)))" to align struct 'Sequence' to 128 bytes /code/include/toolbox/yourgame/math/camera.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_CAMERA_H | ^~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_CAMERA_H 21 | #define YOURGAME_CAMERA_H | ~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_CAMERA_H /code/include/toolbox/yourgame/math/camera.h:24:1: warning: #includes are not sorted properly [llvm-include-order] 24 | #include | ^ ~~~~~~~~~~~~~ | "yourgame/math.h" 25 | #include | ~~~~~~~~~~~~~ | "yourgame/math/trafo.h" 26 | #include "yourgame/math.h" | ~~~~~~~~~~~~~~~~~ | 27 | #include "yourgame/math/trafo.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/math/camera.h:29:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 29 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 30 | { | ~ 31 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/toolbox/yourgame/math/particles.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_PARTICLES_H | ^~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_PARTICLES_H 21 | #define YOURGAME_PARTICLES_H | ~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_PARTICLES_H /code/include/toolbox/yourgame/math/particles.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~ | 24 | #include | ~~~~~~~~ | 25 | #include | ~~~~~~~ | 26 | #include | ~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/math/particles.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/toolbox/yourgame/math/particles.h:38:15: warning: destructor of 'Particles' is public and non-virtual [cppcoreguidelines-virtual-class-destructor] 38 | class Particles | ^ /code/include/toolbox/yourgame/math/particles.h:38:15: note: make it public and virtual 38 | class Particles | ^ 39 | { 40 | public: | /code/include/toolbox/yourgame/math/particles.h:47:20: warning: accessing fields in struct 'Config' is inefficient due to padding; only needs 103 bytes but is using 104 bytes [altera-struct-pack-align] 47 | struct Config | ^ /code/include/toolbox/yourgame/math/particles.h:47:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'Config' /code/include/toolbox/yourgame/math/particles.h:47:20: warning: accessing fields in struct 'Config' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 128 bytes [altera-struct-pack-align] 47 | struct Config | ^ /code/include/toolbox/yourgame/math/particles.h:47:20: note: use "__attribute__((aligned(128)))" to align struct 'Config' to 128 bytes /code/include/toolbox/yourgame/math/particles.h:66:13: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,hicpp-explicit-conversions] 66 | Particles(const Config cfg); | ^ | explicit /code/include/toolbox/yourgame/math/particles.h:66:23: warning: parameter 'cfg' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls] 66 | Particles(const Config cfg); | ^~~~~ /code/include/toolbox/yourgame/math/particles.h:74:20: warning: member variable 'm_cfg' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes,misc-non-private-member-variables-in-classes] 74 | Config m_cfg; | ^ /code/include/toolbox/yourgame/math/particles.h:75:36: warning: member variable 'm_positionData' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes,misc-non-private-member-variables-in-classes] 75 | std::vector m_positionData; | ^ /code/include/toolbox/yourgame/math/particles.h:76:32: warning: member variable 'm_progressData' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes,misc-non-private-member-variables-in-classes] 76 | std::vector m_progressData; | ^ /code/include/toolbox/yourgame/math/particles.h:79:20: warning: accessing fields in struct 'Part' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 64 bytes [altera-struct-pack-align] 79 | struct Part | ^ 80 | { 81 | glm::vec3 pos; 82 | glm::vec3 move; 83 | float lifetime; 84 | float totalLifeInv; 85 | float progress; 86 | }; | | __attribute__((aligned(64))) /code/include/toolbox/yourgame/math/particles.h:79:20: note: use "__attribute__((aligned(64)))" to align struct 'Part' to 64 bytes /code/include/toolbox/yourgame/math/trafo.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_TRAFO_H | ^~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_TRAFO_H 21 | #define YOURGAME_TRAFO_H | ~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_MATH_TRAFO_H /code/include/toolbox/yourgame/math/trafo.h:24:1: warning: #includes are not sorted properly [llvm-include-order] 24 | #include | ^ ~~~~~~~~~~~~~ | "yourgame/math.h" 25 | #include 26 | #include "yourgame/math.h" | ~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/math/trafo.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace math | ~~~~~~~~~~~~~~ | namespace yourgame::math /code/include/toolbox/yourgame/math/trafo.h:56:13: warning: function 'getAxisGlobal' should be marked [[nodiscard]] [modernize-use-nodiscard] 56 | glm::vec3 getAxisGlobal(math::Axis ax) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/math/trafo.h:57:13: warning: function 'getEye' should be marked [[nodiscard]] [modernize-use-nodiscard] 57 | glm::vec3 getEye() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/math/trafo.h:58:13: warning: function 'getRotation' should be marked [[nodiscard]] [modernize-use-nodiscard] 58 | glm::quat getRotation() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/math/trafo.h:59:13: warning: function 'getScale' should be marked [[nodiscard]] [modernize-use-nodiscard] 59 | glm::vec3 getScale() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/toolbox.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_TOOLBOX_H | ^~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_TOOLBOX_H 21 | #define YOURGAME_TOOLBOX_H | ~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_TOOLBOX_H /code/include/toolbox/yourgame/util/assetmanager.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_ASSETMANAGER_H | ^~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_ASSETMANAGER_H 21 | #define YOURGAME_ASSETMANAGER_H | ~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_ASSETMANAGER_H /code/include/toolbox/yourgame/util/assetmanager.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~~~~~ | // std::uintptr_t 24 | #include // std::uintptr_t | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 25 | #include | ~~~~~~~~~~ | 26 | #include | ~~~~~ | 27 | #include | ~~~~~~~~ | /code/include/toolbox/yourgame/util/assetmanager.h:29:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 29 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 30 | { | ~ 31 | namespace util | ~~~~~~~~~~~~~~ | namespace yourgame::util /code/include/toolbox/yourgame/util/assetmanager.h:46:15: warning: class 'AssetManager' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 46 | class AssetManager | ^ /code/include/toolbox/yourgame/util/assetmanager.h:63:37: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 63 | bool insert(std::string name, T *obj) | ^ /code/include/toolbox/yourgame/util/assetmanager.h:76:23: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory] 76 | { delete reinterpret_cast(ptr); }; | ^ ~~~ /code/include/toolbox/yourgame/util/assetmanager.h:75:28: note: variable declared here 75 | [](std::uintptr_t ptr) | ^~~~~~~~~~~~~~~~~~ /code/include/toolbox/yourgame/util/assetmanager.h:76:30: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast] 76 | { delete reinterpret_cast(ptr); }; | ^ /code/include/toolbox/yourgame/util/assetmanager.h:85:58: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast] 85 | m_ptrMaps[typeid(T).hash_code()][name] = reinterpret_cast(obj); | ^ /code/include/toolbox/yourgame/util/assetmanager.h:98:37: warning: parameter 'name' is unused [misc-unused-parameters] 98 | void insert(std::string name, T obj) | ^~~~ | /*name*/ /code/include/toolbox/yourgame/util/assetmanager.h:98:37: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] /code/include/toolbox/yourgame/util/assetmanager.h:98:45: warning: parameter 'obj' is unused [misc-unused-parameters] 98 | void insert(std::string name, T obj) | ^~~ | /*obj*/ /code/include/toolbox/yourgame/util/assetmanager.h:111:32: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 111 | T *get(std::string name) | ^ /code/include/toolbox/yourgame/util/assetmanager.h:119:32: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast] 119 | return reinterpret_cast(itT->second); | ^ /code/include/toolbox/yourgame/util/assetmanager.h:149:38: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 149 | void destroy(std::string name) | ^ /code/include/toolbox/yourgame/util/assetmanager.h:174:21: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 174 | for (const auto &ptr : itMap->second) | ^ /code/include/toolbox/yourgame/util/assetmanager.h:189:21: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 189 | for (const auto &ptr : map.second) | ^ /code/include/toolbox/yourgame/util/image.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_IMAGE_H | ^~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_IMAGE_H 21 | #define YOURGAME_IMAGE_H | ~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_IMAGE_H /code/include/toolbox/yourgame/util/image.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~~~~~ | 24 | #include | ~~~~~~~ | /code/include/toolbox/yourgame/util/image.h:27:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 27 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace util | ~~~~~~~~~~~~~~ | namespace yourgame::util /code/include/toolbox/yourgame/util/image.h:31:15: warning: class 'Image' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 31 | class Image | ^ /code/include/toolbox/yourgame/util/image.h:34:24: warning: enum 'Layout' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 34 | enum class Layout | ^ /code/include/toolbox/yourgame/util/image.h:70:13: warning: function 'getData' should be marked [[nodiscard]] [modernize-use-nodiscard] 70 | const uint8_t *getData() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/image.h:72:13: warning: function 'getWidth' should be marked [[nodiscard]] [modernize-use-nodiscard] 72 | int getWidth() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/image.h:74:13: warning: function 'getHeight' should be marked [[nodiscard]] [modernize-use-nodiscard] 74 | int getHeight() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/image.h:76:13: warning: function 'getLayout' should be marked [[nodiscard]] [modernize-use-nodiscard] 76 | Layout getLayout() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/image.h:78:13: warning: function 'getNumChannels' should be marked [[nodiscard]] [modernize-use-nodiscard] 78 | int getNumChannels() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/image.h:80:13: warning: function 'getNumDemandedBytes' should be marked [[nodiscard]] [modernize-use-nodiscard] 80 | size_t getNumDemandedBytes() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/image.h:83:13: warning: constructor does not initialize these fields: m_width, m_height, m_layout [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 83 | Image() {} | ^ 84 | std::vector m_data; 85 | int m_width; | | {} 86 | int m_height; | | {} /code/include/toolbox/yourgame/util/motion.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_MOTION_H | ^~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_MOTION_H 21 | #define YOURGAME_MOTION_H | ~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_MOTION_H /code/include/toolbox/yourgame/util/motion.h:26:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 26 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 27 | { | ~ 28 | namespace util | ~~~~~~~~~~~~~~ | namespace yourgame::util /code/include/toolbox/yourgame/util/motion.h:33:24: warning: enum 'FlowType' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 33 | enum class FlowType | ^ /code/include/toolbox/yourgame/util/motion.h:40:24: warning: enum 'SegmentEase' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size] 40 | enum class SegmentEase | ^ /code/include/toolbox/yourgame/util/motion.h:53:13: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,hicpp-explicit-conversions] 53 | Motion(FlowType flowType); | ^ | explicit /code/include/toolbox/yourgame/util/motion.h:69:20: warning: accessing fields in struct 'Segment' is inefficient due to padding; only needs 80 bytes but is using 88 bytes [altera-struct-pack-align] 69 | struct Segment | ^ 70 | { 71 | Segment(float dt, 72 | std::function calcFn, 73 | std::function easeFn, 74 | float val0, 75 | float val1, 76 | float val2) : dt(dt), calcFn(calcFn), easeFn(easeFn), val0(val0), val1(val1), val2(val2) {} 77 | 78 | float dt; 79 | std::function calcFn; 80 | std::function easeFn; 81 | float val0; 82 | float val1; 83 | float val2; 84 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/util/motion.h:69:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'Segment' /code/include/toolbox/yourgame/util/motion.h:69:20: warning: accessing fields in struct 'Segment' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 128 bytes [altera-struct-pack-align] 69 | struct Segment | ^ 70 | { 71 | Segment(float dt, 72 | std::function calcFn, 73 | std::function easeFn, 74 | float val0, 75 | float val1, 76 | float val2) : dt(dt), calcFn(calcFn), easeFn(easeFn), val0(val0), val1(val1), val2(val2) {} 77 | 78 | float dt; 79 | std::function calcFn; 80 | std::function easeFn; 81 | float val0; 82 | float val1; 83 | float val2; 84 | }; | | __attribute__((aligned(128))) /code/include/toolbox/yourgame/util/motion.h:69:20: note: use "__attribute__((aligned(128)))" to align struct 'Segment' to 128 bytes /code/include/toolbox/yourgame/util/motion.h:72:25: warning: pass by value and use std::move [modernize-pass-by-value] 24 | std::function calcFn, | ^ 25 | std::function easeFn, 26 | float val0, 27 | float val1, 28 | float val2) : dt(dt), calcFn(calcFn), easeFn(easeFn), val0(val0), val1(val1), val2(val2) {} | | std::move( ) /code/include/toolbox/yourgame/util/motion.h:73:25: warning: pass by value and use std::move [modernize-pass-by-value] 73 | std::function easeFn, | ^ 74 | float val0, 75 | float val1, 76 | float val2) : dt(dt), calcFn(calcFn), easeFn(easeFn), val0(val0), val1(val1), val2(val2) {} | | std::move( ) /code/include/toolbox/yourgame/util/motion.h:76:54: warning: parameter 'calcFn' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param] 24 | float val2) : dt(dt), calcFn(calcFn), easeFn(easeFn), val0(val0), val1(val1), val2(val2) {} | ^ | std::move( ) /code/include/toolbox/yourgame/util/motion.h:76:70: warning: parameter 'easeFn' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param] 76 | float val2) : dt(dt), calcFn(calcFn), easeFn(easeFn), val0(val0), val1(val1), val2(val2) {} | ^ | std::move( ) /code/include/toolbox/yourgame/util/motion.h:78:23: warning: member variable 'dt' has public visibility [misc-non-private-member-variables-in-classes] 78 | float dt; | ^ /code/include/toolbox/yourgame/util/motion.h:79:62: warning: member variable 'calcFn' has public visibility [misc-non-private-member-variables-in-classes] 79 | std::function calcFn; | ^ /code/include/toolbox/yourgame/util/motion.h:80:52: warning: member variable 'easeFn' has public visibility [misc-non-private-member-variables-in-classes] 80 | std::function easeFn; | ^ /code/include/toolbox/yourgame/util/motion.h:81:23: warning: member variable 'val0' has public visibility [misc-non-private-member-variables-in-classes] 81 | float val0; | ^ /code/include/toolbox/yourgame/util/motion.h:82:23: warning: member variable 'val1' has public visibility [misc-non-private-member-variables-in-classes] 82 | float val1; | ^ /code/include/toolbox/yourgame/util/motion.h:83:23: warning: member variable 'val2' has public visibility [misc-non-private-member-variables-in-classes] 83 | float val2; | ^ /code/include/toolbox/yourgame/util/physenv.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_PHYSENV_H | ^~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_PHYSENV_H 21 | #define YOURGAME_PHYSENV_H | ~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_PHYSENV_H /code/include/toolbox/yourgame/util/physenv.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include // unique_ptr | ^ ~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/math/trafo.h" 24 | #include 25 | #include | ~~~~~~~~ | // unique_ptr 26 | #include "yourgame/math/trafo.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/util/physenv.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace util | ~~~~~~~~~~~~~~ | namespace yourgame::util /code/include/toolbox/yourgame/util/physenv.h:32:16: warning: accessing fields in struct 'RigidBodyInfo' is inefficient due to padding; only needs 38 bytes but is using 40 bytes [altera-struct-pack-align] 32 | struct RigidBodyInfo | ^ 33 | { 34 | float mass = 1.0f; 35 | float linearDamping = 0.0f; 36 | float angularDamping = 0.0f; 37 | float friction = 0.5f; 38 | float rollingFriction = 0.0f; 39 | float spinningFriction = 0.0f; 40 | float restitution = 0.0f; 41 | float linearSleepingThreshold = 0.8f; 42 | float angularSleepingThreshold = 1.0f; 43 | bool kinematic = false; 44 | bool disableDeactivation = false; 45 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/util/physenv.h:32:16: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'RigidBodyInfo' /code/include/toolbox/yourgame/util/physenv.h:32:16: warning: accessing fields in struct 'RigidBodyInfo' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 64 bytes [altera-struct-pack-align] 32 | struct RigidBodyInfo | ^ 33 | { 34 | float mass = 1.0f; 35 | float linearDamping = 0.0f; 36 | float angularDamping = 0.0f; 37 | float friction = 0.5f; 38 | float rollingFriction = 0.0f; 39 | float spinningFriction = 0.0f; 40 | float restitution = 0.0f; 41 | float linearSleepingThreshold = 0.8f; 42 | float angularSleepingThreshold = 1.0f; 43 | bool kinematic = false; 44 | bool disableDeactivation = false; 45 | }; | | __attribute__((aligned(64))) /code/include/toolbox/yourgame/util/physenv.h:32:16: note: use "__attribute__((aligned(64)))" to align struct 'RigidBodyInfo' to 64 bytes /code/include/toolbox/yourgame/util/physenv.h:48:15: warning: class 'RigidBody' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 48 | class RigidBody | ^ /code/include/toolbox/yourgame/util/physenv.h:57:23: warning: pass by value and use std::move [modernize-pass-by-value] 26 | RigidBody(std::string name, void *body) : m_name(name), m_body(body) {} | ^ | std::move( ) /code/include/toolbox/yourgame/util/physenv.h:57:62: warning: parameter 'name' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param] 26 | RigidBody(std::string name, void *body) : m_name(name), m_body(body) {} | ^ | std::move( ) /code/include/toolbox/yourgame/util/physenv.h:142:25: warning: member variable 'm_name' has public visibility [misc-non-private-member-variables-in-classes] 142 | std::string m_name; | ^ /code/include/toolbox/yourgame/util/physenv.h:143:25: warning: member 'm_body' of type 'void *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 143 | void *const m_body; | ^ /code/include/toolbox/yourgame/util/physenv.h:143:25: warning: member variable 'm_body' has public visibility [misc-non-private-member-variables-in-classes] /code/include/toolbox/yourgame/util/physenv.h:160:24: warning: member variable 'm_body0' has public visibility [misc-non-private-member-variables-in-classes] 160 | RigidBody *m_body0; | ^ /code/include/toolbox/yourgame/util/physenv.h:161:24: warning: member variable 'm_body1' has public visibility [misc-non-private-member-variables-in-classes] 161 | RigidBody *m_body1; | ^ /code/include/toolbox/yourgame/util/physenv.h:162:19: warning: member variable 'm_impulse' has public visibility [misc-non-private-member-variables-in-classes] 162 | float m_impulse; | ^ /code/include/toolbox/yourgame/util/physenv.h:170:13: warning: function 'involves' should be marked [[nodiscard]] [modernize-use-nodiscard] 170 | bool involves(const std::string &name) const | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/physenv.h:182:13: warning: function 'involves2' should be marked [[nodiscard]] [modernize-use-nodiscard] 182 | bool involves2(const std::string &nameA, const std::string &nameB) const | ^ | [[nodiscard]] /code/include/toolbox/yourgame/util/physenv.h:193:13: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,hicpp-explicit-conversions] 193 | RayTestResult(RigidBody *rigidBody) : m_rigidBody(rigidBody) {} | ^ | explicit /code/include/toolbox/yourgame/util/physenv.h:194:24: warning: member variable 'm_rigidBody' has public visibility [misc-non-private-member-variables-in-classes] 194 | RigidBody *m_rigidBody; | ^ /code/include/toolbox/yourgame/util/physenv.h:198:15: warning: class 'PhysEnv' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 198 | class PhysEnv | ^ /code/include/toolbox/yourgame/util/postproc.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_POSTPROC_H | ^~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_POSTPROC_H 21 | #define YOURGAME_POSTPROC_H | ~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_UTIL_POSTPROC_H /code/include/toolbox/yourgame/util/postproc.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace util | ~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace postproc | ~~~~~~~~~~~~~~~~~~ | namespace yourgame::util::postproc 30 | { 31 | void resize(uint32_t width, uint32_t height); 32 | bool init(uint32_t width, uint32_t height); 33 | void shutdown(); 34 | bool isInitialized(); 35 | void use(yourgame::gl::Shader *shader); 36 | } // namespace postproc | ~~~~~~~~~~~~~~~~~~~~~~~ | } // namespace yourgame::util::postproc 37 | } // namespace util | ~~~~~~~~~~~~~~~~~~~ 38 | } // namespace yourgame | ~~~~~~~~~~~~~~~~~~~~~~~ /code/include/toolbox_internal/yourgame_internal/gl/init.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_INTERNAL_GL_INIT_H | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_INTERNAL_YOURGAME_INTERNAL_GL_INIT_H 21 | #define YOURGAME_INTERNAL_GL_INIT_H | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_INTERNAL_YOURGAME_INTERNAL_GL_INIT_H /code/include/toolbox_internal/yourgame_internal/gl/init.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame_internal::gl 26 | { 27 | void initState(); 28 | } // namespace gl | ~~~~~~~~~~~~~~~~~ | } // namespace yourgame_internal::gl 29 | } // namespace yourgame_internal | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/include/toolbox_internal/yourgame_internal/util/assets.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_INTERNAL_ASSETS_H | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_INTERNAL_YOURGAME_INTERNAL_UTIL_ASSETS_H 21 | #define YOURGAME_INTERNAL_ASSETS_H | ~~~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_INTERNAL_YOURGAME_INTERNAL_UTIL_ASSETS_H /code/include/toolbox_internal/yourgame_internal/util/assets.h:25:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 25 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace util | ~~~~~~~~~~~~~~ 28 | { | ~ 29 | namespace assets | ~~~~~~~~~~~~~~~~ | namespace yourgame_internal::util::assets 30 | { 31 | extern yourgame::util::AssetManager manager; 32 | bool loadStockAssets(); 33 | void clearStockAssets(); 34 | } // namespace assets | ~~~~~~~~~~~~~~~~~~~~~ | } // namespace yourgame_internal::util::assets 35 | } // namespace util | ~~~~~~~~~~~~~~~~~~~ 36 | } // namespace yourgame_internal | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/include/toolbox_internal/yourgame_internal/util/assets.h:31:49: warning: variable 'manager' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 31 | extern yourgame::util::AssetManager manager; | ^ /code/include/toolbox_internal/yourgame_internal/util/postproc.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_INTERNAL_POSTPROC_H | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_INTERNAL_YOURGAME_INTERNAL_UTIL_POSTPROC_H 21 | #define YOURGAME_INTERNAL_POSTPROC_H | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_INTERNAL_YOURGAME_INTERNAL_UTIL_POSTPROC_H /code/include/toolbox_internal/yourgame_internal/util/postproc.h:23:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 23 | namespace yourgame_internal | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 24 | { | ~ 25 | namespace util | ~~~~~~~~~~~~~~ 26 | { | ~ 27 | namespace postproc | ~~~~~~~~~~~~~~~~~~ | namespace yourgame_internal::util::postproc 28 | { 29 | void activate(); 30 | void deactivateAndDraw(); 31 | } // namespace postproc | ~~~~~~~~~~~~~~~~~~~~~~~ | } // namespace yourgame_internal::util::postproc 32 | } // namespace util | ~~~~~~~~~~~~~~~~~~~ 33 | } // namespace yourgame_internal | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/platform_desktop_web/yourgame.cpp:34:1: warning: included header yourgame.h is not used directly [misc-include-cleaner] 34 | #include "yourgame/yourgame.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35 | #include "yourgame_internal/mygame_external.h" /code/src/platform_desktop_web/yourgame.cpp:35:1: warning: #includes are not sorted properly [llvm-include-order] 35 | #include "yourgame_internal/mygame_external.h" | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame_internal/file_desktop.h" 36 | #include "yourgame_internal/file_desktop.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame_internal/input.h" 37 | #include "yourgame_internal/input.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame_internal/input_desktop.h" 38 | #include "yourgame_internal/input_desktop.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame_internal/log.h" 39 | #include "yourgame_internal/log.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame_internal/mygame_external.h" /code/src/platform_desktop_web/yourgame.cpp:49:10: warning: variable '_wantToExit' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 49 | bool _wantToExit = false; | ^ /code/src/platform_desktop_web/yourgame.cpp:50:17: warning: variable '_window' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables] 50 | GLFWwindow *_window = NULL; | ^ /code/src/platform_desktop_web/yourgame.cpp:50:17: warning: variable '_window' provides global access to a non-const object; consider making the pointed-to data 'const' [cppcoreguidelines-avoid-non-const-global-variables] /code/src/platform_desktop_web/yourgame.cpp:50:27: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 50 | GLFWwindow *_window = NULL; | ^~~~ | nullptr /code/src/platform_desktop_web/yourgame.cpp:50:27: warning: no header providing "NULL" is directly included [misc-include-cleaner] 20 | GLFWwindow *_window = NULL; | ^ /code/src/platform_desktop_web/yourgame.cpp:52:46: warning: parameter 'window' is unused [misc-unused-parameters] 52 | void framebufferSizeCallback(GLFWwindow *window, int width, int height) | ^~~~~~ | /*window*/ /code/src/platform_desktop_web/yourgame.cpp:54:24: warning: no header providing "yourgame::log::debug" is directly included [misc-include-cleaner] 20 | yourgame::log::debug("GLFW framebuffer resized: %v,%v", width, height); | ^ /code/src/platform_desktop_web/yourgame.cpp:56:62: warning: no header providing "yourgame::input::WINDOW_WIDTH" is directly included [misc-include-cleaner] 20 | yourgame_internal::input::setInput2(yourgame::input::WINDOW_WIDTH, static_cast(width)); | ^ /code/src/platform_desktop_web/yourgame.cpp:57:62: warning: no header providing "yourgame::input::WINDOW_HEIGHT" is directly included [misc-include-cleaner] 57 | yourgame_internal::input::setInput2(yourgame::input::WINDOW_HEIGHT, static_cast(height)); | ^ /code/src/platform_desktop_web/yourgame.cpp:58:62: warning: no header providing "yourgame::input::WINDOW_WIDTH_INVERSE" is directly included [misc-include-cleaner] 58 | yourgame_internal::input::setInput2(yourgame::input::WINDOW_WIDTH_INVERSE, | ^ /code/src/platform_desktop_web/yourgame.cpp:60:62: warning: no header providing "yourgame::input::WINDOW_HEIGHT_INVERSE" is directly included [misc-include-cleaner] 60 | yourgame_internal::input::setInput2(yourgame::input::WINDOW_HEIGHT_INVERSE, | ^ /code/src/platform_desktop_web/yourgame.cpp:62:62: warning: no header providing "yourgame::input::WINDOW_ASPECT_RATIO" is directly included [misc-include-cleaner] 62 | yourgame_internal::input::setInput2(yourgame::input::WINDOW_ASPECT_RATIO, | ^ /code/src/platform_desktop_web/yourgame.cpp:64:62: warning: no header providing "yourgame::input::WINDOW_ASPECT_RATIO_INVERSE" is directly included [misc-include-cleaner] 64 | yourgame_internal::input::setInput2(yourgame::input::WINDOW_ASPECT_RATIO_INVERSE, | ^ /code/src/platform_desktop_web/yourgame.cpp:70:24: warning: no header providing "yourgame::log::error" is directly included [misc-include-cleaner] 70 | yourgame::log::error("GLFW error %v: %v", errorCode, errorMessage); | ^ /code/src/platform_desktop_web/yourgame.cpp:155:9: warning: variable 'ret' of type 'int' can be declared 'const' [misc-const-correctness] 155 | int ret = mygame::shutdown(); | ^ | const /code/src/platform_desktop_web/yourgame.cpp:164:24: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 164 | if (_window != NULL) | ^~~~ | nullptr /code/src/platform_desktop_web/yourgame.cpp:181:28: warning: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays] 181 | int init(int argc, char *argv[]) | ^ /code/src/platform_desktop_web/yourgame.cpp:189:28: warning: no header providing "yourgame::log::info" is directly included [misc-include-cleaner] 189 | yourgame::log::info("YOURGAME_GL_API_GL"); | ^ /code/src/platform_desktop_web/yourgame.cpp:193:28: warning: no header providing "yourgame::log::info" is directly included [misc-include-cleaner] 193 | yourgame::log::info("YOURGAME_GLSL_VERSION_STRING: %v", YOURGAME_GLSL_VERSION_STRING); | ^ /code/src/platform_desktop_web/yourgame.cpp:201:18: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 201 | if (!glfwInit()) | ~^ | == 0 /code/src/platform_desktop_web/yourgame.cpp:203:32: warning: no header providing "yourgame::log::error" is directly included [misc-include-cleaner] 203 | yourgame::log::error("glfwInit() failed"); | ^ /code/src/platform_desktop_web/yourgame.cpp:246:17: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 246 | if (yourgame::input::geti(yourgame::input::WINDOW_FULLSCREEN)) | ^ | != 0 /code/src/platform_desktop_web/yourgame.cpp:246:34: warning: no header providing "yourgame::input::geti" is directly included [misc-include-cleaner] 246 | if (yourgame::input::geti(yourgame::input::WINDOW_FULLSCREEN)) | ^ /code/src/platform_desktop_web/yourgame.cpp:246:56: warning: no header providing "yourgame::input::WINDOW_FULLSCREEN" is directly included [misc-include-cleaner] 246 | if (yourgame::input::geti(yourgame::input::WINDOW_FULLSCREEN)) | ^ /code/src/platform_desktop_web/yourgame.cpp:249:100: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 249 | _window = glfwCreateWindow(mode->width, mode->height, "", glfwGetPrimaryMonitor(), NULL); | ^~~~ | nullptr /code/src/platform_desktop_web/yourgame.cpp:254:97: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 254 | _window = glfwCreateWindow((mode->width * 8) / 10, (mode->height * 8) / 10, "", NULL, NULL); | ^~~~ | nullptr /code/src/platform_desktop_web/yourgame.cpp:254:103: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 254 | _window = glfwCreateWindow((mode->width * 8) / 10, (mode->height * 8) / 10, "", NULL, NULL); | ^~~~ | nullptr /code/src/platform_desktop_web/yourgame.cpp:255:21: warning: implicit conversion 'GLFWwindow *' -> 'bool' [readability-implicit-bool-conversion] 255 | if (_window) | ^ | != nullptr /code/src/platform_desktop_web/yourgame.cpp:262:18: warning: implicit conversion 'GLFWwindow *' -> 'bool' [readability-implicit-bool-conversion] 262 | if (!_window) | ~^ | == nullptr /code/src/platform_desktop_web/yourgame.cpp:274:17: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 274 | int width, height; | ^~~~~~~~~~~~~~~~~~ /code/src/platform_desktop_web/yourgame.cpp:274:21: warning: variable 'width' is not initialized [cppcoreguidelines-init-variables] 274 | int width, height; | ^ note: this fix will not be applied because it overlaps with another fix /code/src/platform_desktop_web/yourgame.cpp:274:28: warning: variable 'height' is not initialized [cppcoreguidelines-init-variables] 274 | int width, height; | ^ note: this fix will not be applied because it overlaps with another fix /code/src/platform_desktop_web/yourgame.cpp:281:18: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 281 | if (!gladLoadGL()) | ~^ | == 0 /code/src/platform_desktop_web/yourgame.cpp:294:30: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 294 | glfwSwapInterval(yourgame::input::geti(yourgame::input::VSYNC_ON) ? 1 : 0); | ^ | ( != 0) /code/src/platform_desktop_web/yourgame.cpp:294:69: warning: no header providing "yourgame::input::VSYNC_ON" is directly included [misc-include-cleaner] 294 | glfwSwapInterval(yourgame::input::geti(yourgame::input::VSYNC_ON) ? 1 : 0); | ^ /code/src/platform_desktop_web/yourgame.cpp:296:17: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 296 | if (glfwRawMouseMotionSupported()) | ^ | != 0 /code/src/platform_desktop_web/yourgame.cpp:307:13: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] 307 | imgio.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; | ^~~~~~~~~~~~~~~~~ ~~ /code/src/platform_desktop_web/yourgame.cpp:308:33: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 308 | imgio.IniFilename = NULL; | ^~~~ | nullptr /code/src/platform_desktop_web/yourgame.cpp:334:87: warning: no header providing "yourgame::time::getClockPeriod" is directly included [misc-include-cleaner] 20 | yourgame::log::info("steady_clock precision: %vs (%vns)", yourgame::time::getClockPeriod(), yourgame::time::getClockPeriod() * 1.0e+9); | ^ /code/src/platform_desktop_web/yourgame.cpp:341:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 341 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 342 | { | ~ 343 | namespace control | ~~~~~~~~~~~~~~~~~ | namespace yourgame::control /code/src/platform_desktop_web/yourgame.cpp:350:26: warning: 2 adjacent parameters of 'sendCmdToEnv' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters] 350 | int sendCmdToEnv(int cmdId, int data0, int data1, int data2) | ^~~~~~~~~~~~~~~~~~~~ /code/src/platform_desktop_web/yourgame.cpp:350:30: note: the first parameter in the range is 'cmdId' 350 | int sendCmdToEnv(int cmdId, int data0, int data1, int data2) | ^~~~~ /code/src/platform_desktop_web/yourgame.cpp:350:41: note: the last parameter in the range is 'data0' 350 | int sendCmdToEnv(int cmdId, int data0, int data1, int data2) | ^~~~~ /code/src/platform_desktop_web/yourgame.cpp:350:30: warning: parameter 'cmdId' is unused [misc-unused-parameters] 350 | int sendCmdToEnv(int cmdId, int data0, int data1, int data2) | ^~~~~ | /*cmdId*/ /code/src/platform_desktop_web/yourgame.cpp:350:41: warning: parameter 'data0' is unused [misc-unused-parameters] 350 | int sendCmdToEnv(int cmdId, int data0, int data1, int data2) | ^~~~~ | /*data0*/ /code/src/platform_desktop_web/yourgame.cpp:350:52: warning: parameter 'data1' is unused [misc-unused-parameters] 350 | int sendCmdToEnv(int cmdId, int data0, int data1, int data2) | ^~~~~ | /*data1*/ /code/src/platform_desktop_web/yourgame.cpp:350:63: warning: parameter 'data2' is unused [misc-unused-parameters] 350 | int sendCmdToEnv(int cmdId, int data0, int data1, int data2) | ^~~~~ | /*data2*/ /code/src/platform_desktop_web/yourgame.cpp:360:13: warning: 'auto mode' can be declared as 'const auto *mode' [llvm-qualified-auto,readability-qualified-auto] 360 | auto mode = glfwGetVideoMode(glfwGetPrimaryMonitor()); | ^~~~ | const auto * /code/src/platform_desktop_web/yourgame.cpp:369:47: warning: use nullptr [hicpp-use-nullptr,modernize-use-nullptr] 369 | glfwSetWindowMonitor(_window, NULL, 0, 0, (mode->width * 8) / 10, (mode->height * 8) / 10, mode->refreshRate); | ^~~~ | nullptr /code/src/platform_desktop_web/yourgame.cpp:385:66: warning: no header providing "yourgame::input::MOUSE_CATCHED" is directly included [misc-include-cleaner] 385 | yourgame_internal::input::setInput2(yourgame::input::MOUSE_CATCHED, enable ? 1.0f : 0.0f); | ^ /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/toolbox/headerlibs.cpp /usr/bin/clang-tidy -p=_build --config-file=../.clang-tidy /code/src/toolbox/gl/texture.cpp /code/include/base/yourgame/gl_include.h:38:9: warning: header guard does not follow preferred style [llvm-header-guard] 38 | #ifndef YOURGAME_GL_INCLUDE_H | ^~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H 39 | #define YOURGAME_GL_INCLUDE_H | ~~~~~~~~~~~~~~~~~~~~~ | BASE_YOURGAME_GL_INCLUDE_H /code/include/toolbox/yourgame/gl/texture.h:20:9: warning: header guard does not follow preferred style [llvm-header-guard] 20 | #ifndef YOURGAME_GLTEXTURE_H | ^~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_TEXTURE_H 21 | #define YOURGAME_GLTEXTURE_H | ~~~~~~~~~~~~~~~~~~~~ | TOOLBOX_YOURGAME_GL_TEXTURE_H /code/include/toolbox/yourgame/gl/texture.h:23:1: warning: #includes are not sorted properly [llvm-include-order] 23 | #include | ^ ~~~~~ | "yourgame/gl_include.h" 24 | #include | ~~~~~~~~ | 25 | #include | ~~~~~~~~ | 26 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/include/toolbox/yourgame/gl/texture.h:28:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 28 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 29 | { | ~ 30 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/include/toolbox/yourgame/gl/texture.h:32:16: warning: accessing fields in struct 'TextureCoords' is inefficient due to padding; only needs 41 bytes but is using 44 bytes [altera-struct-pack-align] 32 | struct TextureCoords | ^ /code/include/toolbox/yourgame/gl/texture.h:32:16: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'TextureCoords' /code/include/toolbox/yourgame/gl/texture.h:32:16: warning: accessing fields in struct 'TextureCoords' is inefficient due to poor alignment; currently aligned to 4 bytes, but recommended alignment is 64 bytes [altera-struct-pack-align] 32 | struct TextureCoords | ^ /code/include/toolbox/yourgame/gl/texture.h:32:16: note: use "__attribute__((aligned(64)))" to align struct 'TextureCoords' to 64 bytes /code/include/toolbox/yourgame/gl/texture.h:35:13: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default,modernize-use-equals-default] 35 | TextureCoords() {} | ^ ~~ | = default; /code/include/toolbox/yourgame/gl/texture.h:37:27: warning: 2 adjacent parameters of 'TextureCoords' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters] 37 | TextureCoords(int x, int y, int width, int height, int texWidth, int texHeight, bool cwRot) | ^~~~~~~~~~~~ /code/include/toolbox/yourgame/gl/texture.h:37:31: note: the first parameter in the range is 'x' 37 | TextureCoords(int x, int y, int width, int height, int texWidth, int texHeight, bool cwRot) | ^ /code/include/toolbox/yourgame/gl/texture.h:37:38: note: the last parameter in the range is 'y' 37 | TextureCoords(int x, int y, int width, int height, int texWidth, int texHeight, bool cwRot) | ^ /code/include/toolbox/yourgame/gl/texture.h:55:19: warning: member variable 'uMin' has public visibility [misc-non-private-member-variables-in-classes] 55 | float uMin = 0.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:56:19: warning: member variable 'uMax' has public visibility [misc-non-private-member-variables-in-classes] 56 | float uMax = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:57:19: warning: member variable 'vMin' has public visibility [misc-non-private-member-variables-in-classes] 57 | float vMin = 0.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:58:19: warning: member variable 'vMax' has public visibility [misc-non-private-member-variables-in-classes] 58 | float vMax = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:59:17: warning: member variable 'xMinPixel' has public visibility [misc-non-private-member-variables-in-classes] 59 | int xMinPixel = 0; | ^ /code/include/toolbox/yourgame/gl/texture.h:60:17: warning: member variable 'xMaxPixel' has public visibility [misc-non-private-member-variables-in-classes] 60 | int xMaxPixel = 1; | ^ /code/include/toolbox/yourgame/gl/texture.h:61:17: warning: member variable 'yMinPixel' has public visibility [misc-non-private-member-variables-in-classes] 61 | int yMinPixel = 0; | ^ /code/include/toolbox/yourgame/gl/texture.h:62:17: warning: member variable 'yMaxPixel' has public visibility [misc-non-private-member-variables-in-classes] 62 | int yMaxPixel = 1; | ^ /code/include/toolbox/yourgame/gl/texture.h:63:19: warning: member variable 'aspectRatioPixel' has public visibility [misc-non-private-member-variables-in-classes] 63 | float aspectRatioPixel = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:64:19: warning: member variable 'aspectRatioPixelInverse' has public visibility [misc-non-private-member-variables-in-classes] 64 | float aspectRatioPixelInverse = 1.0f; | ^ /code/include/toolbox/yourgame/gl/texture.h:65:18: warning: member variable 'cwRotated' has public visibility [misc-non-private-member-variables-in-classes] 65 | bool cwRotated = false; | ^ /code/include/toolbox/yourgame/gl/texture.h:68:15: warning: class 'Texture' defines a non-default destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,hicpp-special-member-functions] 68 | class Texture | ^ /code/include/toolbox/yourgame/gl/texture.h:95:13: warning: function 'handle' should be marked [[nodiscard]] [modernize-use-nodiscard] 95 | GLuint handle() const { return m_handle; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:96:13: warning: function 'getTarget' should be marked [[nodiscard]] [modernize-use-nodiscard] 96 | GLenum getTarget() const { return m_target; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:97:13: warning: function 'getWidth' should be marked [[nodiscard]] [modernize-use-nodiscard] 97 | GLsizei getWidth() const { return m_width; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:98:13: warning: function 'getHeight' should be marked [[nodiscard]] [modernize-use-nodiscard] 98 | GLsizei getHeight() const { return m_height; } | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:107:13: warning: function 'getCoords' should be marked [[nodiscard]] [modernize-use-nodiscard] 107 | TextureCoords getCoords(std::string name) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:122:13: warning: function 'getNumFrames' should be marked [[nodiscard]] [modernize-use-nodiscard] 122 | int getNumFrames(std::string sequenceName) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:127:13: warning: function 'getSequenceNames' should be marked [[nodiscard]] [modernize-use-nodiscard] 127 | std::vector getSequenceNames() const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:136:13: warning: function 'getGridCoords' should be marked [[nodiscard]] [modernize-use-nodiscard] 136 | TextureCoords getGridCoords(int gridWidth, int gridHeight, int index) const; | ^ | [[nodiscard]] /code/include/toolbox/yourgame/gl/texture.h:139:13: warning: constructor does not initialize these fields: m_handle, m_target, m_unit, m_width, m_height [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 139 | Texture() {} | ^ 140 | GLuint m_handle; | | {} 141 | GLenum m_target; | | {} 142 | GLenum m_unit; | | {} 143 | GLsizei m_width; | | {} 144 | GLsizei m_height; | | {} /code/include/toolbox/yourgame/gl/texture.h:146:20: warning: accessing fields in struct 'Sequence' is inefficient due to padding; only needs 73 bytes but is using 80 bytes [altera-struct-pack-align] 146 | struct Sequence | ^ 147 | { 148 | std::map frames; 149 | bool framesInvalidated; 150 | std::vector framesConsec; /**< \brief consecutive representation of the frame coordinates */ 151 | }; | | __attribute__((packed)) /code/include/toolbox/yourgame/gl/texture.h:146:20: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct 'Sequence' /code/include/toolbox/yourgame/gl/texture.h:146:20: warning: accessing fields in struct 'Sequence' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 128 bytes [altera-struct-pack-align] 146 | struct Sequence | ^ 147 | { 148 | std::map frames; 149 | bool framesInvalidated; 150 | std::vector framesConsec; /**< \brief consecutive representation of the frame coordinates */ 151 | }; | | __attribute__((aligned(128))) /code/include/toolbox/yourgame/gl/texture.h:146:20: note: use "__attribute__((aligned(128)))" to align struct 'Sequence' to 128 bytes /code/include/toolbox/yourgame/gl/texture.h:146:20: warning: constructor does not initialize these fields: framesInvalidated [cppcoreguidelines-pro-type-member-init,hicpp-member-init] 146 | struct Sequence | ^ 147 | { 148 | std::map frames; 149 | bool framesInvalidated; | | {} /code/src/toolbox/gl/texture.cpp:20:1: warning: #includes are not sorted properly [llvm-include-order] 20 | #include | ^ ~~~~~~~ | "yourgame/gl_include.h" 21 | #include "yourgame/gl_include.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | "yourgame/gl/texture.h" 22 | #include "yourgame/gl/texture.h" | ~~~~~~~~~~~~~~~~~~~~~~~ | /code/src/toolbox/gl/texture.cpp:24:1: warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces] 24 | namespace yourgame | ^~~~~~~~~~~~~~~~~~ 25 | { | ~ 26 | namespace gl | ~~~~~~~~~~~~ | namespace yourgame::gl /code/src/toolbox/gl/texture.cpp:28:32: warning: 2 adjacent parameters of 'make' of similar type ('GLenum') are easily swapped by mistake [bugprone-easily-swappable-parameters] 28 | Texture *Texture::make(GLenum target, | ^~~~~~~~~~~~~~ 29 | GLenum unit, | ~~~~~~~~~~~ /code/src/toolbox/gl/texture.cpp:28:39: note: the first parameter in the range is 'target' 28 | Texture *Texture::make(GLenum target, | ^~~~~~ /code/src/toolbox/gl/texture.cpp:29:39: note: the last parameter in the range is 'unit' 29 | GLenum unit, | ^~~~ /code/src/toolbox/gl/texture.cpp:30:43: warning: no header providing "std::vector" is directly included [misc-include-cleaner] 21 | #include "yourgame/gl_include.h" 22 | #include "yourgame/gl/texture.h" 23 | 24 | namespace yourgame 25 | { 26 | namespace gl 27 | { 28 | Texture *Texture::make(GLenum target, 29 | GLenum unit, 30 | const std::vector> ¶meteri) | ^ /code/src/toolbox/gl/texture.cpp:30:55: warning: no header providing "std::pair" is directly included [misc-include-cleaner] 21 | #include "yourgame/gl_include.h" 22 | #include "yourgame/gl/texture.h" 23 | 24 | namespace yourgame 25 | { 26 | namespace gl 27 | { 28 | Texture *Texture::make(GLenum target, 29 | GLenum unit, 30 | const std::vector> ¶meteri) | ^ /code/src/toolbox/gl/texture.cpp:32:20: warning: variable 'handle' is not initialized [cppcoreguidelines-init-variables] 32 | GLuint handle; | ^ | = 0 /code/src/toolbox/gl/texture.cpp:37:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 37 | for (const auto &par : parameteri) | ^ /code/src/toolbox/gl/texture.cpp:42:13: warning: initializing non-owner 'Texture *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 42 | Texture *newTexture = new Texture(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /code/src/toolbox/gl/texture.cpp:42:13: warning: use auto when initializing with new to avoid duplicating the type name [hicpp-use-auto,modernize-use-auto] 42 | Texture *newTexture = new Texture(); | ^~~~~~~ | auto /code/src/toolbox/gl/texture.cpp:103:41: warning: no header providing "std::string" is directly included [misc-include-cleaner] 21 | void Texture::insertCoords(std::string name, int x, int y, int width, int height, bool cwRot) | ^ /code/src/toolbox/gl/texture.cpp:103:48: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 103 | void Texture::insertCoords(std::string name, int x, int y, int width, int height, bool cwRot) | ^ | const & /code/src/toolbox/gl/texture.cpp:114:13: warning: variable 'reSequence' of type 'std::regex' (aka 'basic_regex') can be declared 'const' [misc-const-correctness] 114 | static std::regex reSequence("^(.+)[-_](\\d+)$"); | ^ | const /code/src/toolbox/gl/texture.cpp:119:17: warning: variable 'seqFrameIdx' of type 'int' can be declared 'const' [misc-const-correctness] 119 | int seqFrameIdx = std::stoi(reMatch[2].str()); | ^ | const /code/src/toolbox/gl/texture.cpp:119:40: warning: no header providing "std::stoi" is directly included [misc-include-cleaner] 119 | int seqFrameIdx = std::stoi(reMatch[2].str()); | ^ /code/src/toolbox/gl/texture.cpp:127:54: warning: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 127 | TextureCoords Texture::getCoords(std::string name) const | ^ | const & /code/src/toolbox/gl/texture.cpp:138:59: warning: the parameter 'sequenceName' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 138 | TextureCoords Texture::getFrameCoords(std::string sequenceName, int frame) | ^ | const & /code/src/toolbox/gl/texture.cpp:148:21: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 148 | for (const auto &f : it->second.frames) | ^ /code/src/toolbox/gl/texture.cpp:155:17: warning: variable 'sizeV' of type 'int' can be declared 'const' [misc-const-correctness] 155 | int sizeV = static_cast(it->second.framesConsec.size()); | ^ | const /code/src/toolbox/gl/texture.cpp:162:17: warning: variable 'i' of type 'int' can be declared 'const' [misc-const-correctness] 162 | int i = (sizeV + (frame % sizeV)) % sizeV; | ^ | const /code/src/toolbox/gl/texture.cpp:170:47: warning: the parameter 'sequenceName' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 170 | int Texture::getNumFrames(std::string sequenceName) const | ^ | const & /code/src/toolbox/gl/texture.cpp:173:70: warning: narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 173 | return (it == m_sequences.end()) ? 0 : it->second.frames.size(); | ^ /code/src/toolbox/gl/texture.cpp:179:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] 179 | for (const auto &seq : m_sequences) | ^ /code/src/toolbox/gl/texture.cpp:181:17: warning: 'push_back' is called inside a loop; consider pre-allocating the container capacity before the loop [performance-inefficient-vector-operation] 179 | for (const auto &seq : m_sequences) 180 | { 181 | names.push_back(seq.first); | ^ /code/src/toolbox/gl/texture.cpp:186:32: warning: function 'getGridCoords' is within a recursive call chain [misc-no-recursion] 186 | TextureCoords Texture::getGridCoords(int gridWidth, int gridHeight, int index) const | ^ /code/src/toolbox/gl/texture.cpp:186:32: note: example recursive call chain, starting from function 'getGridCoords' /code/src/toolbox/gl/texture.cpp:190:24: note: Frame #1: function 'getGridCoords' calls function 'getGridCoords' here: 190 | return getGridCoords(1, 1, 0); | ^ /code/src/toolbox/gl/texture.cpp:190:24: note: ... which was the starting point of the recursive call chain; there may be other cycles /code/src/toolbox/gl/texture.cpp:193:13: warning: variable 'x' of type 'float' can be declared 'const' [misc-const-correctness] 193 | float x = (static_cast(index % gridWidth) / gridWidth) * getWidth(); | ^ | const /code/src/toolbox/gl/texture.cpp:193:64: warning: narrowing conversion from 'int' to 'float' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 193 | float x = (static_cast(index % gridWidth) / gridWidth) * getWidth(); | ^ /code/src/toolbox/gl/texture.cpp:193:77: warning: narrowing conversion from 'GLsizei' (aka 'int') to 'float' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 193 | float x = (static_cast(index % gridWidth) / gridWidth) * getWidth(); | ^ /code/src/toolbox/gl/texture.cpp:194:13: warning: variable 'y' of type 'float' can be declared 'const' [misc-const-correctness] 194 | float y = ((index / gridWidth) / static_cast(gridHeight)) * getHeight(); | ^ | const /code/src/toolbox/gl/texture.cpp:194:24: warning: narrowing conversion from 'int' to 'float' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 194 | float y = ((index / gridWidth) / static_cast(gridHeight)) * getHeight(); | ^ /code/src/toolbox/gl/texture.cpp:194:25: warning: result of integer division used in a floating point context; possible loss of precision [bugprone-integer-division] 194 | float y = ((index / gridWidth) / static_cast(gridHeight)) * getHeight(); | ^ /code/src/toolbox/gl/texture.cpp:194:80: warning: narrowing conversion from 'GLsizei' (aka 'int') to 'float' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 194 | float y = ((index / gridWidth) / static_cast(gridHeight)) * getHeight(); | ^ /code/src/toolbox/gl/texture.cpp:195:13: warning: variable 'width' of type 'int' can be declared 'const' [misc-const-correctness] 195 | int width = getWidth() / gridWidth; | ^ | const /code/src/toolbox/gl/texture.cpp:196:13: warning: variable 'height' of type 'int' can be declared 'const' [misc-const-correctness] 196 | int height = getHeight() / gridHeight; | ^ | const