Enabled checks: bugprone-argument-comment bugprone-assert-side-effect bugprone-assignment-in-if-condition bugprone-bad-signal-to-kill-thread bugprone-bitwise-pointer-cast bugprone-bool-pointer-implicit-conversion bugprone-branch-clone bugprone-capturing-this-in-member-variable bugprone-casting-through-void bugprone-chained-comparison bugprone-command-processor bugprone-compare-pointer-to-member-virtual-function bugprone-copy-constructor-init bugprone-copy-constructor-mutates-argument bugprone-crtp-constructor-accessibility bugprone-dangling-handle bugprone-default-operator-new-on-overaligned-type bugprone-derived-method-shadowing-base-method bugprone-dynamic-static-initializers bugprone-empty-catch bugprone-exception-copy-constructor-throws bugprone-exception-escape bugprone-float-loop-counter 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-enable-shared-from-this bugprone-incorrect-roundings bugprone-infinite-loop bugprone-integer-division bugprone-invalid-enum-default-initialization bugprone-lambda-function-name bugprone-macro-parentheses bugprone-macro-repeated-side-effects bugprone-misleading-setter-of-reference 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-nondeterministic-pointer-iteration-order bugprone-not-null-terminated-result bugprone-optional-value-conversion bugprone-parent-virtual-call bugprone-pointer-arithmetic-on-polymorphic-object bugprone-posix-return bugprone-random-generator-seed bugprone-raw-memory-call-on-non-trivial-type bugprone-redundant-branch-condition bugprone-reserved-identifier bugprone-return-const-ref-from-parameter 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-std-namespace-modification 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-suspicious-stringview-data-usage bugprone-swapped-arguments bugprone-switch-missing-default-case bugprone-tagged-union-member-count bugprone-terminating-continue bugprone-throw-keyword-missing bugprone-throwing-static-initialization bugprone-too-small-loop-variable bugprone-unchecked-optional-access bugprone-unchecked-string-to-number-conversion bugprone-undefined-memory-manipulation bugprone-undelegated-constructor bugprone-unhandled-exception-at-new bugprone-unhandled-self-assignment bugprone-unintended-char-ostream-output 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-arr39-c cert-con36-c cert-con54-cpp cert-ctr56-cpp cert-dcl03-c cert-dcl16-c 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-int09-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.DivideZero clang-analyzer-core.DynamicTypePropagation clang-analyzer-core.FixedAddressDereference clang-analyzer-core.NonNullParamChecker clang-analyzer-core.NonnilStringConstants clang-analyzer-core.NullDereference clang-analyzer-core.NullPointerArithm clang-analyzer-core.StackAddressEscape clang-analyzer-core.UndefinedBinaryOperatorResult clang-analyzer-core.VLASize clang-analyzer-core.builtin.AssumeModeling 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.ArrayDelete 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-deadcode.DeadStores clang-analyzer-fuchsia.HandleChecker clang-analyzer-nullability.NullPassedToNonnull clang-analyzer-nullability.NullReturnedFromNonnull 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-optin.taint.GenericTaint clang-analyzer-optin.taint.TaintPropagation clang-analyzer-optin.taint.TaintedAlloc clang-analyzer-optin.taint.TaintedDiv clang-analyzer-osx.API clang-analyzer-osx.MIG 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.ArrayBound clang-analyzer-security.FloatLoopCounter clang-analyzer-security.MmapWriteExec clang-analyzer-security.PointerSub clang-analyzer-security.PutenvStackArray clang-analyzer-security.SetgidSetuidOrder clang-analyzer-security.VAList 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.BlockInCriticalSection clang-analyzer-unix.Chroot 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.Stream clang-analyzer-unix.Vfork clang-analyzer-unix.cstring.BadSizeArg clang-analyzer-unix.cstring.CStringModeling clang-analyzer-unix.cstring.NotNullTerminated clang-analyzer-unix.cstring.NullArg clang-analyzer-webkit.NoUncountedMemberChecker clang-analyzer-webkit.RefCntblBaseVirtualDtor clang-analyzer-webkit.UncountedLambdaCapturesChecker 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-reference-coroutine-parameters cppcoreguidelines-c-copy-assignment-signature cppcoreguidelines-explicit-virtual-functions cppcoreguidelines-init-variables cppcoreguidelines-interfaces-global-init cppcoreguidelines-macro-to-enum cppcoreguidelines-macro-usage 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-type-const-cast cppcoreguidelines-pro-type-cstyle-cast cppcoreguidelines-pro-type-member-init cppcoreguidelines-pro-type-static-cast-downcast cppcoreguidelines-pro-type-union-access cppcoreguidelines-rvalue-reference-param-not-moved cppcoreguidelines-slicing cppcoreguidelines-special-member-functions cppcoreguidelines-use-default-member-init cppcoreguidelines-use-enum-class cppcoreguidelines-virtual-class-destructor misc-anonymous-namespace-in-header misc-confusable-identifiers 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-multiple-inheritance misc-new-delete-overloads misc-no-recursion misc-non-copyable-objects misc-override-with-different-visibility misc-predictable-rand 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-internal-linkage modernize-avoid-bind modernize-avoid-c-arrays modernize-avoid-c-style-cast modernize-avoid-setjmp-longjmp modernize-avoid-variadic-functions 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-min-max-use-initializer-list 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-designated-initializers modernize-use-emplace modernize-use-equals-default modernize-use-equals-delete modernize-use-integer-sign-comparison modernize-use-nodiscard modernize-use-noexcept modernize-use-nullptr modernize-use-override modernize-use-ranges modernize-use-scoped-lock modernize-use-starts-ends-with modernize-use-std-format modernize-use-std-numbers modernize-use-std-print modernize-use-transparent-functors modernize-use-uncaught-exceptions modernize-use-using 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 readability-ambiguous-smartptr-reset-call 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-enum-initial-value readability-function-cognitive-complexity readability-function-size readability-identifier-naming readability-implicit-bool-conversion readability-inconsistent-declaration-parameter-name readability-inconsistent-ifelse-braces 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-parentheses readability-redundant-preprocessor readability-redundant-smartptr-get readability-redundant-string-cstr readability-redundant-string-init readability-redundant-typename 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 readability-use-concise-preprocessor-directives readability-use-std-min-max Running clang-tidy in 3 threads for 13 files out of 18 in compilation database ... [ 1/13][16.4s] clang-tidy-22 -p=/home/runner/work/corticalsim/corticalsim/build/debug --config-file=/home/runner/work/corticalsim/corticalsim/.clang-tidy /home/runner/work/corticalsim/corticalsim/src/det_queue.cpp include/CompactList_impl.hpp:12:7: warning: class 'CompactList' 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] 12 | class CompactList | ^ include/CompactList_impl.hpp:26:19: warning: all parameters should be named in a function [readability-named-parameter] 26 | void remove(T*); | ^ | /*element*/ include/CompactList_impl.hpp:49:16: warning: all parameters should be named in a function [readability-named-parameter] 49 | T* create(Q); | ^ | /*par1*/ include/CompactList_impl.hpp:51:16: warning: all parameters should be named in a function [readability-named-parameter] 51 | T* create(Q, R); | ^ | /*par1*/ /*par2*/ include/CompactList_impl.hpp:53:16: warning: all parameters should be named in a function [readability-named-parameter] 53 | T* create(Q, R, S); | ^ | /*par1*/ /*par2*/ /*par3*/ include/CompactList_impl.hpp:80:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 80 | return; | ^~~~~~~ 81 | } include/CompactList_impl.hpp:86:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 86 | T* new_element = new (MemPool::malloc()) T(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:94:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 94 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:102:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 102 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:110:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 110 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:145:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 145 | return; | ^~~~~~~ 146 | } include/CompactList_impl.hpp:149:7: warning: class 'CompactListItem' 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] 149 | class CompactListItem | ^ include/CompactList_impl.hpp:149:7: warning: destructor of 'CompactListItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] include/CompactList_impl.hpp:149:7: note: make it protected and non-virtual 149 | class CompactListItem | ^ 150 | { 151 | public: 152 | 153 | CompactListItem(): 154 | index(0) {}; 155 | int index; 156 | 157 | protected: 158 | 159 | virtual ~CompactListItem() {}; | ~~~~~~~ include/CompactList_impl.hpp:153:5: warning: public constructor allows the CRTP to be constructed as a regular template class; consider making it private and declaring the derived class as friend [bugprone-crtp-constructor-accessibility] 153 | CompactListItem(): | ^ 154 | index(0) {}; | 155 | int index; 156 | 157 | protected: 158 | 159 | virtual ~CompactListItem() {}; 160 | template 161 | friend class CompactList; 162 | }; include/CompactList_impl.hpp:155:9: warning: use default member initializer for 'index' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 154 | index(0) {}; | ~~~~~~~~ 155 | int index; | ^ | {0} include/CompactList_impl.hpp:159:13: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] 159 | virtual ~CompactListItem() {}; | ^ ~~ | = default include/DLList_impl.hpp:32:7: warning: class 'DLList' 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] 32 | class DLList | ^ include/DLList_impl.hpp:36:9: warning: use default member initializer for 'num_elements' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 36 | int num_elements; | ^ | { 0 } include/DLList_impl.hpp:42:8: warning: use default member initializer for 'first_element' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 42 | T* first_element; | ^ | { nullptr } 43 | T* last_element; 44 | 45 | using MemPool = crts::SingletonPool; 46 | 47 | void unlink_element(T*); 48 | T* link_element(T*); 49 | 50 | public: 51 | 52 | DLList(): 53 | num_elements{ 0 }, 54 | first_element{ nullptr }, | ~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:43:8: warning: use default member initializer for 'last_element' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 43 | T* last_element; | ^ | { nullptr } 44 | 45 | using MemPool = crts::SingletonPool; 46 | 47 | void unlink_element(T*); 48 | T* link_element(T*); 49 | 50 | public: 51 | 52 | DLList(): 53 | num_elements{ 0 }, 54 | first_element{ nullptr }, 55 | last_element{ nullptr } {}; | ~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:47:27: warning: all parameters should be named in a function [readability-named-parameter] 47 | void unlink_element(T*); | ^ | /*element*/ include/DLList_impl.hpp:48:23: warning: all parameters should be named in a function [readability-named-parameter] 48 | T* link_element(T*); | ^ | /*new_element*/ include/DLList_impl.hpp:70:16: warning: all parameters should be named in a function [readability-named-parameter] 70 | T* create(Q); | ^ | /*par1*/ include/DLList_impl.hpp:72:16: warning: all parameters should be named in a function [readability-named-parameter] 72 | T* create(Q, R); | ^ | /*par1*/ /*par2*/ include/DLList_impl.hpp:74:16: warning: all parameters should be named in a function [readability-named-parameter] 74 | T* create(Q, R, S); | ^ | /*par1*/ /*par2*/ /*par3*/ include/DLList_impl.hpp:75:19: warning: all parameters should be named in a function [readability-named-parameter] 75 | void remove(T*); | ^ | /*element*/ include/DLList_impl.hpp:77:49: warning: all parameters should be named in a function [readability-named-parameter] 77 | void import(DLList&, T*); | ^ | /*old_list*/ /*element*/ include/DLList_impl.hpp:78:53: warning: all parameters should be named in a function [readability-named-parameter] 78 | void import_set(DLList&, T*, T*); | ^ | /*old_list*/ /*first_element*/ /*last_element*/ include/DLList_impl.hpp:137:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 137 | return; | ^~~~~~~ 138 | } include/DLList_impl.hpp:154:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 154 | T* new_element = new (MemPool::malloc()) T(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:162:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 162 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:170:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 170 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:178:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 178 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:196:8: warning: variable 'temp' is not initialized [cppcoreguidelines-init-variables] 196 | T* temp; | ^ | = nullptr include/DLList_impl.hpp:211:7: warning: class 'DLBaseItem' 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] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: the implicit default constructor of the CRTP is publicly accessible; consider making it private and declaring the derived class as friend [bugprone-crtp-constructor-accessibility] 211 | class DLBaseItem | ^ 212 | { | include/DLList_impl.hpp:226:13: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] 226 | virtual ~DLBaseItem() {}; | ^ ~~ | = default include/det_queue.hpp:14:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 14 | System* const system; // pointer to containing system | ^ include/det_queue.hpp:14:19: warning: member variable 'system' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes] include/det_queue.hpp:15:31: warning: all parameters should be named in a function [readability-named-parameter] 15 | DeterministicQueue(System*, double (System::*dt_func)(double), double (System::*td_func)(double)); | ^ | /*s*/ include/det_queue.hpp:17:12: warning: method 'current_pos' can be made const [readability-make-member-function-const] 17 | double current_pos() | ^ | const include/det_queue.hpp:22:29: warning: all parameters should be named in a function [readability-named-parameter] 22 | void advance_time(double); // advances the parameters to the current system time | ^ | /*t*/ include/det_queue.hpp:23:24: warning: all parameters should be named in a function [readability-named-parameter] 23 | void store_time(int); // store 'currentBase' in the cache at a given tag position | ^ | /*tag*/ include/det_queue.hpp:25:63: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 25 | double progression(int cache_pos) { return current_base - value_cache[cache_pos]; } | ^ include/det_queue.hpp:38:28: warning: all parameters should be named in a function [readability-named-parameter] 38 | void push_global(double, GlobalEventType); // pushes a global event onto the | ^ | /*timedist*/ /*type*/ include/det_queue.hpp:40:47: warning: all parameters should be named in a function [readability-named-parameter] 40 | EventTrackingTag push_deterministic(double, EventDescriptorIndex); | ^ | /*timedist*/ /*idx*/ include/det_queue.hpp:47:12: warning: use default member initializer for 'current_base' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 47 | double current_base; // the current 'distance' | ^ | {0} include/det_queue.hpp:48:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 48 | double value_cache[POSITION_CACHE_SIZE]; // cache of previous 'distance' values | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/det_queue.hpp:49:29: warning: member 'distance_time_conversion_function' of type 'double (System::*const)(double)' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 49 | double (System::* const distance_time_conversion_function)(double); | ^ include/det_queue.hpp:51:29: warning: member 'time_distance_conversion_function' of type 'double (System::*const)(double)' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 51 | double (System::* const time_distance_conversion_function)(double); | ^ include/event.hpp:7:7: warning: class 'EventDescriptor' 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] 7 | class EventDescriptor | ^ include/event.hpp:19:26: warning: use default member initializer for 'index' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 19 | EventDescriptorIndex index; | ^ | {0} include/event.hpp:20:24: warning: member 'mt' of type 'Microtubule *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | Microtubule* const mt; | ^ include/event.hpp:23:28: warning: use default member initializer for 'type' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 23 | DeterministicEventType type; | ^ | {DeterministicEventType::NONE} include/event.hpp:26:22: warning: use default member initializer for 'tag' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 26 | EventTrackingTag tag; | ^ | {-1} include/event.hpp:31:33: warning: all parameters should be named in a function [readability-named-parameter] 31 | EventDescriptor(Microtubule*, DeterministicQueue*, double); | ^ | /*m*/ /*q*/ /*velocity*/ include/event.hpp:35:42: warning: all parameters should be named in a function [readability-named-parameter] 35 | void reinitialize(DeterministicQueue*, double); | ^ | /*q*/ /*velocity*/ include/event.hpp:38:30: warning: all parameters should be named in a function [readability-named-parameter] 38 | void push_on_queue(double, DeterministicEventType); | ^ | /*dist*/ /*t*/ include/event.hpp:44:7: warning: do not access members of unions; consider using (boost::)variant instead [cppcoreguidelines-pro-type-union-access] 44 | class DeterministicEvent | ^ include/intersection.hpp:6:7: warning: constructor does not initialize these fields: occupancy, other_trajectory, occupied_list_ptr [cppcoreguidelines-pro-type-member-init] 6 | class Intersection | ^ 7 | // this object describes the intersection of one trajectory with another, from 8 | // one side. since it is created twice for every intersection, it is by far the 9 | // most memory-intensive object and should be kept as small as possible 10 | { 11 | public: 12 | 13 | int occupancy; | | {} 14 | Trajectory* other_trajectory; | | {} 15 | IntersectionItr mirror; 16 | #ifdef CROSS_SEV 17 | OccupiedIntersection* occupied_list_ptr; | | {} include/intersection.hpp:33:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | : x(x1) 32 | { 33 | x = x1; | ^~~~~~~ include/intersection.hpp:34:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , y(y1) 32 | { 33 | x = x1; 34 | y = y1; | ^~~~~~~ include/intersection.hpp:35:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , z(z1) 32 | { 33 | x = x1; 34 | y = y1; 35 | z = z1; | ^~~~~~~ include/intersection.hpp:36:9: warning: 'next_element' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , next_element(n1) 32 | { 33 | x = x1; 34 | y = y1; 35 | z = z1; 36 | next_element = n1; | ^~~~~~~~~~~~~~~~~~ include/measurement.hpp:7:7: warning: constructor does not initialize these fields: time, length_density, optical_density, average_length, number_of_m_ts, segments_per_mt, growing_number, shrinking_number, segments, trajectories, zipper_count, crossover_count, induced_catastrophe_count, valid_d_event_count, invalid_d_event_count, s_event_count, length_severing_count, intersection_severing_count, occupied_intersection_count, g_eff_adjust [cppcoreguidelines-pro-type-member-init] 7 | class Measurement | ^ 8 | { 9 | public: 10 | 11 | double time; | | {} 12 | double length_density; | | {} 13 | double optical_density; | | {} 14 | double average_length; | | {} 15 | int number_of_m_ts; | | {} 16 | double segments_per_mt; | | {} 17 | OrderParameters order; 18 | int growing_number; | | {} 19 | int shrinking_number; | | {} 20 | int segments; | | {} 21 | int trajectories; | | {} 22 | int zipper_count; | | {} include/measurement.hpp:34:41: warning: parameter 2 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 | std::ostream& operator<<(std::ostream&, const Measurement); | ^~~~~ include/microtubule.hpp:10:7: warning: class 'Microtubule' 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] 10 | class Microtubule: public DLBaseItem | ^ include/microtubule.hpp:14:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 14 | System* const system; | ^ include/microtubule.hpp:31:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 31 | ~Microtubule(); | ^ | override include/mt_tip.hpp:7:7: warning: class 'MTTip' 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] 7 | class MTTip | ^ include/parameters.hpp:105:3: warning: redundant access specifier has the same accessibility as the previous access specifier [readability-redundant-access-specifiers] 105 | public: | ^~~~~~~ include/parameters.hpp:42:3: note: previously declared here 42 | public: | ^ include/parameters.hpp:119:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 119 | double rdirector[3]; | ^~~~~~~~~~~~~~~~~~~ include/parameters.hpp:139:5: warning: constructor does not initialize these fields: local_order [cppcoreguidelines-pro-type-member-init] 136 | double local_order; | | {} 137 | Eigen::Vector3d sv; 138 | 139 | OrderParametersRaw(void) | ^ include/parameters.hpp:139:24: warning: redundant void argument list in function definition [modernize-redundant-void-arg] 139 | OrderParametersRaw(void) | ^~~~ include/parameters.hpp:141:9: warning: 'local_l' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | : local_l(0.) 140 | { 141 | local_l = 0.; | ^~~~~~~~~~~~~ include/parameters.hpp:142:9: warning: 'local_l_opt' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , local_l_opt(0.) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; | ^~~~~~~~~~~~~~~~~ include/parameters.hpp:143:9: warning: 'qxx' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxx(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; | ^~~~~~~~ include/parameters.hpp:144:9: warning: 'qxy' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxy(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; | ^~~~~~~~ include/parameters.hpp:145:9: warning: 'qxz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; | ^~~~~~~~ include/parameters.hpp:146:9: warning: 'qyy' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qyy(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; | ^~~~~~~~ include/parameters.hpp:147:9: warning: 'qyz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qyz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; 147 | qyz = 0; | ^~~~~~~~ include/parameters.hpp:148:9: warning: 'qzz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qzz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; 147 | qyz = 0; 148 | qzz = 0; | ^~~~~~~~ include/parameters.hpp:152:9: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 152 | return; | ^~~~~~~ 153 | } include/parameters.hpp:155:22: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 155 | double extract_r(double director[3], std::string geometry) | ^~~~~~~~~~~~~~~~~~ include/parameters.hpp:155:54: warning: the parameter 'geometry' of type 'std::string' (aka 'basic_string') is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 155 | double extract_r(double director[3], std::string geometry) | ^ | const & include/parameters.hpp:178:40: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 178 | director[i] = evec_mat(i, max_pos); | ^ include/parameters.hpp:195:40: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 195 | director[i] = evec_mat(i, min_pos); | ^ include/parameters.hpp:199:16: warning: redundant parentheses around expression [readability-redundant-parentheses] 199 | return (sel_eigen_val); | ^ ~ include/segment.hpp:7:7: warning: class 'Segment' 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] 7 | class Segment: public DLBaseItem | ^ include/segment.hpp:12:23: warning: member 'trajectory' of type 'Trajectory *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 12 | Trajectory* const trajectory; | ^ include/segment.hpp:27:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 27 | ~Segment(); | ^ | override include/segment.hpp:29:12: warning: method 'length' can be made const [readability-make-member-function-const] 29 | double length() { return std::abs(end - start); } | ^ | const include/surface.hpp:16:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | : x(x1) 15 | { 16 | x = x1; | ^~~~~~~ include/surface.hpp:17:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | , y(y1) 15 | { 16 | x = x1; 17 | y = y1; | ^~~~~~~ include/surface.hpp:18:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | , z(z1) 15 | { 16 | x = x1; 17 | y = y1; 18 | z = z1; | ^~~~~~~ include/surface.hpp:32:9: warning: 'cos_theta' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 30 | BendingOperator() | | : cos_theta(0.0) 31 | { 32 | cos_theta = 0.0; | ^~~~~~~~~~~~~~~~ include/surface.hpp:33:9: warning: 'sin_theta' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 30 | BendingOperator() | | , sin_theta(0.0) 31 | { 32 | cos_theta = 0.0; 33 | sin_theta = 0.0; | ^~~~~~~~~~~~~~~~ include/surface.hpp:49:5: warning: constructor does not initialize these fields: region [cppcoreguidelines-pro-type-member-init] 47 | Region* region; | | {} 48 | 49 | SurfaceVector() | ^ include/surface.hpp:51:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | : x(0.0) 50 | { 51 | x = 0.0; | ^~~~~~~~ include/surface.hpp:52:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , y(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; | ^~~~~~~~ include/surface.hpp:53:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , z(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; | ^~~~~~~~ include/surface.hpp:55:9: warning: 'angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , angle(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; 54 | 55 | angle = 0.0; | ^~~~~~~~~~~~ include/surface.hpp:56:9: warning: 'tv_pos' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , tv_pos(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; 54 | 55 | angle = 0.0; 56 | tv_pos = 0.0; | ^~~~~~~~~~~~~ include/surface.hpp:73:9: warning: 'mid_point' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | : mid_point(0) 72 | { 73 | mid_point = 0; | ^~~~~~~~~~~~~~ include/surface.hpp:74:9: warning: 'length' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | , length(0.0) 72 | { 73 | mid_point = 0; 74 | length = 0.0; | ^~~~~~~~~~~~~ include/surface.hpp:75:9: warning: 'edge_3d_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | , edge_3d_angle(0.0) 72 | { 73 | mid_point = 0; 74 | length = 0.0; 75 | edge_3d_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~ include/system.hpp:14:7: warning: class 'System' 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] 14 | class System | ^ include/system.hpp:70:12: warning: method 'identity' can be made static [readability-convert-member-functions-to-static] 70 | double identity(double i) { return i; } | ^ | static include/system.hpp:115:21: warning: redundant void argument list in function declaration [modernize-redundant-void-arg] 115 | void next_event(void); | ^~~~ include/system.hpp:138:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 138 | double binomial_table[MAXBINOM][MAXBINOM]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/system.hpp:139:30: warning: redundant void argument list in function declaration [modernize-redundant-void-arg] 139 | void make_binomial_table(void); | ^~~~ include/trajectory.hpp:16:5: warning: constructor does not initialize these fields: cdir [cppcoreguidelines-pro-type-member-init] 16 | TrajectoryVector(double p, Direction d, Trajectory* t): | ^ include/trajectory.hpp:23:5: warning: constructor does not initialize these fields: pos, dir, cdir, trajectory [cppcoreguidelines-pro-type-member-init] 12 | double pos; | | {} 13 | Direction dir, cdir; 14 | Trajectory* trajectory; | | {} 15 | 16 | TrajectoryVector(double p, Direction d, Trajectory* t): 17 | pos(p), 18 | dir(d), 19 | trajectory(t) 20 | { 21 | } 22 | 23 | TrajectoryVector() {} | ^ include/trajectory.hpp:23:5: warning: use '= default' to define a trivial default constructor [modernize-use-equals-default] 23 | TrajectoryVector() {} | ^ ~~ | = default; include/trajectory.hpp:25:22: warning: method 'flipped' can be made const [readability-make-member-function-const] 25 | TrajectoryVector flipped() | ^ | const include/trajectory.hpp:27:16: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] 27 | return TrajectoryVector(pos, dir == Direction::FORWARD ? Direction::BACKWARD : Direction::FORWARD, trajectory); | ^~~~~~~~~~~~~~~~~ ~ | { } include/trajectory.hpp:31:7: warning: class 'Trajectory' 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] 31 | class Trajectory: public DLBaseItem | ^ include/trajectory.hpp:40:25: warning: member 'base' of type 'const SurfaceVector' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 40 | const SurfaceVector base; | ^ include/trajectory.hpp:41:18: warning: member 'length' of type 'const double' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 41 | const double length; | ^ include/trajectory.hpp:82:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 82 | ~Trajectory(); | ^ | override include/types.hpp:40:9: warning: macro 'PROGRAM_VERSION' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] 40 | #define PROGRAM_VERSION "BC.2018" | ^ include/types.hpp:88:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 88 | extern std::string direction_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:132:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 132 | extern std::string nucleation_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:141:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 141 | extern std::string interaction_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:153:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 153 | extern std::string bundle_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:4:1: warning: constructor does not initialize these fields: value_cache [cppcoreguidelines-pro-type-member-init] 4 | DeterministicQueue::DeterministicQueue(System* s, double (System::*dt_func)(double), double (System::*td_func)(double)): | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:16:5: warning: no header providing "DeterministicEvent" is directly included [misc-include-cleaner] 2 | #include "system.hpp" 3 | 4 | DeterministicQueue::DeterministicQueue(System* s, double (System::*dt_func)(double), double (System::*td_func)(double)): 5 | system(s), 6 | current_base(0), 7 | distance_time_conversion_function(dt_func), 8 | time_distance_conversion_function(td_func) 9 | { 10 | // do not use the system pointer here, as it has not been initialized 11 | value_cache[0] = 0; 12 | } 13 | 14 | double DeterministicQueue::first_event_time() 15 | { 16 | DeterministicEvent event = queue.top(); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:16:5: warning: variable 'event' of type 'DeterministicEvent' can be declared 'const' [misc-const-correctness] 16 | DeterministicEvent event = queue.top(); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:49:5: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 49 | value_cache[system->current_time_tag] = 0; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:51:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 51 | return; | ^~~~~~~ 52 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:67:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 67 | return; | ^~~~~~~ 68 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:73:5: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 73 | value_cache[tag] = current_base; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:74:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 74 | return; | ^~~~~~~ 75 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:77:55: warning: no header providing "GlobalEventType" is directly included [misc-include-cleaner] 3 | void DeterministicQueue::push_global(double timedist, GlobalEventType type) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:79:5: warning: uninitialized record type: 'event' [cppcoreguidelines-pro-type-member-init] 79 | DeterministicEvent event; | ^ | {} /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:82:11: warning: do not access members of unions; consider using (boost::)variant instead [cppcoreguidelines-pro-type-union-access] 82 | event.global_type = type; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:86:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 86 | return; | ^~~~~~~ 87 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:89:1: warning: no header providing "EventTrackingTag" is directly included [misc-include-cleaner] 89 | EventTrackingTag DeterministicQueue::push_deterministic(double timedist, EventDescriptorIndex idx) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:89:74: warning: no header providing "EventDescriptorIndex" is directly included [misc-include-cleaner] 89 | EventTrackingTag DeterministicQueue::push_deterministic(double timedist, EventDescriptorIndex idx) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:91:5: warning: uninitialized record type: 'event' [cppcoreguidelines-pro-type-member-init] 91 | DeterministicEvent event; | ^ | {} /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:94:11: warning: do not access members of unions; consider using (boost::)variant instead [cppcoreguidelines-pro-type-union-access] 94 | event.tag = system->get_event_tag(); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:98:18: warning: do not access members of unions; consider using (boost::)variant instead [cppcoreguidelines-pro-type-union-access] 98 | return event.tag; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:101:1: warning: no header providing "EventDescriptor" is directly included [misc-include-cleaner] 101 | EventDescriptor::EventDescriptor(Microtubule* m, DeterministicQueue* q, double velocity): | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:101:34: warning: no header providing "Microtubule" is directly included [misc-include-cleaner] 2 | EventDescriptor::EventDescriptor(Microtubule* m, DeterministicQueue* q, double velocity): | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:104:10: warning: no header providing "DeterministicEventType" is directly included [misc-include-cleaner] 104 | type(DeterministicEventType::NONE), | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:109:5: warning: 'index' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] note: this fix will not be applied because it overlaps with another fix 109 | index = q->system->register_event_descriptor(this); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:111:14: warning: no header providing "std::abs" is directly included [misc-include-cleaner] 3 | if (std::abs(velocity) > ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:111:30: warning: no header providing "ZERO_CUTOFF" is directly included [misc-include-cleaner] 2 | if (std::abs(velocity) > ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:118:9: warning: repeated branch body in conditional chain [bugprone-branch-clone] 118 | { | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:120:10: note: end of the original 120 | } | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:126:9: note: clone 1 starts here 126 | { | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:119:38: warning: no header providing "VERY_LARGE" is directly included [misc-include-cleaner] 119 | distance_scale_factor = -VERY_LARGE; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:131:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 131 | return; | ^~~~~~~ 132 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:138:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 138 | return; | ^~~~~~~ 139 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:161:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 161 | return; | ^~~~~~~ 162 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:179:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 179 | return; | ^~~~~~~ 180 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/det_queue.cpp:187:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 187 | return; | ^~~~~~~ 188 | } 34469 warnings generated. Suppressed 34286 warnings (34286 in non-user code). Use -header-filter=.* or leave it as default to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. [ 2/13][25.0s] clang-tidy-22 -p=/home/runner/work/corticalsim/corticalsim/build/debug --config-file=/home/runner/work/corticalsim/corticalsim/.clang-tidy /home/runner/work/corticalsim/corticalsim/src/main.cpp include/CompactList_impl.hpp:12:7: warning: class 'CompactList' 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] 12 | class CompactList | ^ include/CompactList_impl.hpp:26:19: warning: all parameters should be named in a function [readability-named-parameter] 26 | void remove(T*); | ^ | /*element*/ include/CompactList_impl.hpp:49:16: warning: all parameters should be named in a function [readability-named-parameter] 49 | T* create(Q); | ^ | /*par1*/ include/CompactList_impl.hpp:51:16: warning: all parameters should be named in a function [readability-named-parameter] 51 | T* create(Q, R); | ^ | /*par1*/ /*par2*/ include/CompactList_impl.hpp:53:16: warning: all parameters should be named in a function [readability-named-parameter] 53 | T* create(Q, R, S); | ^ | /*par1*/ /*par2*/ /*par3*/ include/CompactList_impl.hpp:80:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 80 | return; | ^~~~~~~ 81 | } include/CompactList_impl.hpp:86:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 86 | T* new_element = new (MemPool::malloc()) T(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:94:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 94 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:102:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 102 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:110:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 110 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:145:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 145 | return; | ^~~~~~~ 146 | } include/CompactList_impl.hpp:149:7: warning: class 'CompactListItem' 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] 149 | class CompactListItem | ^ include/CompactList_impl.hpp:149:7: warning: destructor of 'CompactListItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] include/CompactList_impl.hpp:149:7: note: make it protected and non-virtual 149 | class CompactListItem | ^ 150 | { 151 | public: 152 | 153 | CompactListItem(): 154 | index(0) {}; 155 | int index; 156 | 157 | protected: 158 | 159 | virtual ~CompactListItem() {}; | ~~~~~~~ include/CompactList_impl.hpp:153:5: warning: public constructor allows the CRTP to be constructed as a regular template class; consider making it private and declaring the derived class as friend [bugprone-crtp-constructor-accessibility] 153 | CompactListItem(): | ^ 154 | index(0) {}; | 155 | int index; 156 | 157 | protected: 158 | 159 | virtual ~CompactListItem() {}; 160 | template 161 | friend class CompactList; 162 | }; include/CompactList_impl.hpp:155:9: warning: use default member initializer for 'index' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 154 | index(0) {}; | ~~~~~~~~ 155 | int index; | ^ | {0} include/CompactList_impl.hpp:159:13: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] 159 | virtual ~CompactListItem() {}; | ^ ~~ | = default include/DLList_impl.hpp:32:7: warning: class 'DLList' 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] 32 | class DLList | ^ include/DLList_impl.hpp:36:9: warning: use default member initializer for 'num_elements' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 36 | int num_elements; | ^ | { 0 } include/DLList_impl.hpp:42:8: warning: use default member initializer for 'first_element' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 42 | T* first_element; | ^ | { nullptr } 43 | T* last_element; 44 | 45 | using MemPool = crts::SingletonPool; 46 | 47 | void unlink_element(T*); 48 | T* link_element(T*); 49 | 50 | public: 51 | 52 | DLList(): 53 | num_elements{ 0 }, 54 | first_element{ nullptr }, | ~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:43:8: warning: use default member initializer for 'last_element' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 43 | T* last_element; | ^ | { nullptr } 44 | 45 | using MemPool = crts::SingletonPool; 46 | 47 | void unlink_element(T*); 48 | T* link_element(T*); 49 | 50 | public: 51 | 52 | DLList(): 53 | num_elements{ 0 }, 54 | first_element{ nullptr }, 55 | last_element{ nullptr } {}; | ~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:47:27: warning: all parameters should be named in a function [readability-named-parameter] 47 | void unlink_element(T*); | ^ | /*element*/ include/DLList_impl.hpp:48:23: warning: all parameters should be named in a function [readability-named-parameter] 48 | T* link_element(T*); | ^ | /*new_element*/ include/DLList_impl.hpp:70:16: warning: all parameters should be named in a function [readability-named-parameter] 70 | T* create(Q); | ^ | /*par1*/ include/DLList_impl.hpp:72:16: warning: all parameters should be named in a function [readability-named-parameter] 72 | T* create(Q, R); | ^ | /*par1*/ /*par2*/ include/DLList_impl.hpp:74:16: warning: all parameters should be named in a function [readability-named-parameter] 74 | T* create(Q, R, S); | ^ | /*par1*/ /*par2*/ /*par3*/ include/DLList_impl.hpp:75:19: warning: all parameters should be named in a function [readability-named-parameter] 75 | void remove(T*); | ^ | /*element*/ include/DLList_impl.hpp:77:49: warning: all parameters should be named in a function [readability-named-parameter] 77 | void import(DLList&, T*); | ^ | /*old_list*/ /*element*/ include/DLList_impl.hpp:78:53: warning: all parameters should be named in a function [readability-named-parameter] 78 | void import_set(DLList&, T*, T*); | ^ | /*old_list*/ /*first_element*/ /*last_element*/ include/DLList_impl.hpp:137:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 137 | return; | ^~~~~~~ 138 | } include/DLList_impl.hpp:154:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 154 | T* new_element = new (MemPool::malloc()) T(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:162:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 162 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:170:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 170 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:178:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 178 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:196:8: warning: variable 'temp' is not initialized [cppcoreguidelines-init-variables] 196 | T* temp; | ^ | = nullptr include/DLList_impl.hpp:211:7: warning: class 'DLBaseItem' 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] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: the implicit default constructor of the CRTP is publicly accessible; consider making it private and declaring the derived class as friend [bugprone-crtp-constructor-accessibility] 211 | class DLBaseItem | ^ 212 | { | include/DLList_impl.hpp:226:13: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] 226 | virtual ~DLBaseItem() {}; | ^ ~~ | = default include/det_queue.hpp:14:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 14 | System* const system; // pointer to containing system | ^ include/det_queue.hpp:14:19: warning: member variable 'system' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes] include/det_queue.hpp:17:12: warning: method 'current_pos' can be made const [readability-make-member-function-const] 17 | double current_pos() | ^ | const include/det_queue.hpp:25:63: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 25 | double progression(int cache_pos) { return current_base - value_cache[cache_pos]; } | ^ include/det_queue.hpp:48:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 48 | double value_cache[POSITION_CACHE_SIZE]; // cache of previous 'distance' values | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/det_queue.hpp:49:29: warning: member 'distance_time_conversion_function' of type 'double (System::*const)(double)' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 49 | double (System::* const distance_time_conversion_function)(double); | ^ include/det_queue.hpp:51:29: warning: member 'time_distance_conversion_function' of type 'double (System::*const)(double)' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 51 | double (System::* const time_distance_conversion_function)(double); | ^ include/event.hpp:7:7: warning: class 'EventDescriptor' 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] 7 | class EventDescriptor | ^ include/event.hpp:20:24: warning: member 'mt' of type 'Microtubule *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | Microtubule* const mt; | ^ include/intersection.hpp:6:7: warning: constructor does not initialize these fields: occupancy, other_trajectory, occupied_list_ptr [cppcoreguidelines-pro-type-member-init] 6 | class Intersection | ^ 7 | // this object describes the intersection of one trajectory with another, from 8 | // one side. since it is created twice for every intersection, it is by far the 9 | // most memory-intensive object and should be kept as small as possible 10 | { 11 | public: 12 | 13 | int occupancy; | | {} 14 | Trajectory* other_trajectory; | | {} 15 | IntersectionItr mirror; 16 | #ifdef CROSS_SEV 17 | OccupiedIntersection* occupied_list_ptr; | | {} include/intersection.hpp:33:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | : x(x1) 32 | { 33 | x = x1; | ^~~~~~~ include/intersection.hpp:34:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , y(y1) 32 | { 33 | x = x1; 34 | y = y1; | ^~~~~~~ include/intersection.hpp:35:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , z(z1) 32 | { 33 | x = x1; 34 | y = y1; 35 | z = z1; | ^~~~~~~ include/intersection.hpp:36:9: warning: 'next_element' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , next_element(n1) 32 | { 33 | x = x1; 34 | y = y1; 35 | z = z1; 36 | next_element = n1; | ^~~~~~~~~~~~~~~~~~ include/measurement.hpp:34:41: warning: parameter 2 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 | std::ostream& operator<<(std::ostream&, const Measurement); | ^~~~~ include/microtubule.hpp:10:7: warning: class 'Microtubule' 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] 10 | class Microtubule: public DLBaseItem | ^ include/microtubule.hpp:14:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 14 | System* const system; | ^ include/microtubule.hpp:31:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 31 | ~Microtubule(); | ^ | override include/mt_tip.hpp:7:7: warning: class 'MTTip' 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] 7 | class MTTip | ^ include/parameters.hpp:105:3: warning: redundant access specifier has the same accessibility as the previous access specifier [readability-redundant-access-specifiers] 105 | public: | ^~~~~~~ include/parameters.hpp:42:3: note: previously declared here 42 | public: | ^ include/parameters.hpp:119:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 119 | double rdirector[3]; | ^~~~~~~~~~~~~~~~~~~ include/parameters.hpp:139:5: warning: constructor does not initialize these fields: local_order [cppcoreguidelines-pro-type-member-init] 136 | double local_order; | | {} 137 | Eigen::Vector3d sv; 138 | 139 | OrderParametersRaw(void) | ^ include/parameters.hpp:139:24: warning: redundant void argument list in function definition [modernize-redundant-void-arg] 139 | OrderParametersRaw(void) | ^~~~ include/parameters.hpp:141:9: warning: 'local_l' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | : local_l(0.) 140 | { 141 | local_l = 0.; | ^~~~~~~~~~~~~ include/parameters.hpp:142:9: warning: 'local_l_opt' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , local_l_opt(0.) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; | ^~~~~~~~~~~~~~~~~ include/parameters.hpp:143:9: warning: 'qxx' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxx(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; | ^~~~~~~~ include/parameters.hpp:144:9: warning: 'qxy' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxy(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; | ^~~~~~~~ include/parameters.hpp:145:9: warning: 'qxz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; | ^~~~~~~~ include/parameters.hpp:146:9: warning: 'qyy' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qyy(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; | ^~~~~~~~ include/parameters.hpp:147:9: warning: 'qyz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qyz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; 147 | qyz = 0; | ^~~~~~~~ include/parameters.hpp:148:9: warning: 'qzz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qzz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; 147 | qyz = 0; 148 | qzz = 0; | ^~~~~~~~ include/parameters.hpp:152:9: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 152 | return; | ^~~~~~~ 153 | } include/parameters.hpp:155:22: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 155 | double extract_r(double director[3], std::string geometry) | ^~~~~~~~~~~~~~~~~~ include/parameters.hpp:155:54: warning: the parameter 'geometry' of type 'std::string' (aka 'basic_string') is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 155 | double extract_r(double director[3], std::string geometry) | ^ | const & include/parameters.hpp:178:40: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 178 | director[i] = evec_mat(i, max_pos); | ^ include/parameters.hpp:195:40: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 195 | director[i] = evec_mat(i, min_pos); | ^ include/parameters.hpp:199:16: warning: redundant parentheses around expression [readability-redundant-parentheses] 199 | return (sel_eigen_val); | ^ ~ include/segment.hpp:7:7: warning: class 'Segment' 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] 7 | class Segment: public DLBaseItem | ^ include/segment.hpp:12:23: warning: member 'trajectory' of type 'Trajectory *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 12 | Trajectory* const trajectory; | ^ include/segment.hpp:27:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 27 | ~Segment(); | ^ | override include/segment.hpp:29:12: warning: method 'length' can be made const [readability-make-member-function-const] 29 | double length() { return std::abs(end - start); } | ^ | const include/surface.hpp:16:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | : x(x1) 15 | { 16 | x = x1; | ^~~~~~~ include/surface.hpp:17:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | , y(y1) 15 | { 16 | x = x1; 17 | y = y1; | ^~~~~~~ include/surface.hpp:18:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | , z(z1) 15 | { 16 | x = x1; 17 | y = y1; 18 | z = z1; | ^~~~~~~ include/surface.hpp:32:9: warning: 'cos_theta' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 30 | BendingOperator() | | : cos_theta(0.0) 31 | { 32 | cos_theta = 0.0; | ^~~~~~~~~~~~~~~~ include/surface.hpp:33:9: warning: 'sin_theta' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 30 | BendingOperator() | | , sin_theta(0.0) 31 | { 32 | cos_theta = 0.0; 33 | sin_theta = 0.0; | ^~~~~~~~~~~~~~~~ include/surface.hpp:49:5: warning: constructor does not initialize these fields: region [cppcoreguidelines-pro-type-member-init] 47 | Region* region; | | {} 48 | 49 | SurfaceVector() | ^ include/surface.hpp:51:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | : x(0.0) 50 | { 51 | x = 0.0; | ^~~~~~~~ include/surface.hpp:52:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , y(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; | ^~~~~~~~ include/surface.hpp:53:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , z(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; | ^~~~~~~~ include/surface.hpp:55:9: warning: 'angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , angle(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; 54 | 55 | angle = 0.0; | ^~~~~~~~~~~~ include/surface.hpp:56:9: warning: 'tv_pos' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , tv_pos(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; 54 | 55 | angle = 0.0; 56 | tv_pos = 0.0; | ^~~~~~~~~~~~~ include/surface.hpp:73:9: warning: 'mid_point' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | : mid_point(0) 72 | { 73 | mid_point = 0; | ^~~~~~~~~~~~~~ include/surface.hpp:74:9: warning: 'length' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | , length(0.0) 72 | { 73 | mid_point = 0; 74 | length = 0.0; | ^~~~~~~~~~~~~ include/surface.hpp:75:9: warning: 'edge_3d_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | , edge_3d_angle(0.0) 72 | { 73 | mid_point = 0; 74 | length = 0.0; 75 | edge_3d_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~ include/system.hpp:14:7: warning: class 'System' 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] 14 | class System | ^ include/system.hpp:70:12: warning: method 'identity' can be made static [readability-convert-member-functions-to-static] 70 | double identity(double i) { return i; } | ^ | static include/system.hpp:115:21: warning: redundant void argument list in function declaration [modernize-redundant-void-arg] 115 | void next_event(void); | ^~~~ include/system.hpp:138:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 138 | double binomial_table[MAXBINOM][MAXBINOM]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/system.hpp:139:30: warning: redundant void argument list in function declaration [modernize-redundant-void-arg] 139 | void make_binomial_table(void); | ^~~~ include/trajectory.hpp:16:5: warning: constructor does not initialize these fields: cdir [cppcoreguidelines-pro-type-member-init] 16 | TrajectoryVector(double p, Direction d, Trajectory* t): | ^ include/trajectory.hpp:23:5: warning: constructor does not initialize these fields: pos, dir, cdir, trajectory [cppcoreguidelines-pro-type-member-init] 12 | double pos; | | {} 13 | Direction dir, cdir; 14 | Trajectory* trajectory; | | {} 15 | 16 | TrajectoryVector(double p, Direction d, Trajectory* t): 17 | pos(p), 18 | dir(d), 19 | trajectory(t) 20 | { 21 | } 22 | 23 | TrajectoryVector() {} | ^ include/trajectory.hpp:23:5: warning: use '= default' to define a trivial default constructor [modernize-use-equals-default] 23 | TrajectoryVector() {} | ^ ~~ | = default; include/trajectory.hpp:25:22: warning: method 'flipped' can be made const [readability-make-member-function-const] 25 | TrajectoryVector flipped() | ^ | const include/trajectory.hpp:27:16: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] 27 | return TrajectoryVector(pos, dir == Direction::FORWARD ? Direction::BACKWARD : Direction::FORWARD, trajectory); | ^~~~~~~~~~~~~~~~~ ~ | { } include/trajectory.hpp:31:7: warning: class 'Trajectory' 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] 31 | class Trajectory: public DLBaseItem | ^ include/trajectory.hpp:40:25: warning: member 'base' of type 'const SurfaceVector' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 40 | const SurfaceVector base; | ^ include/trajectory.hpp:41:18: warning: member 'length' of type 'const double' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 41 | const double length; | ^ include/trajectory.hpp:82:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 82 | ~Trajectory(); | ^ | override include/types.hpp:40:9: warning: macro 'PROGRAM_VERSION' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] 40 | #define PROGRAM_VERSION "BC.2018" | ^ include/types.hpp:88:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 88 | extern std::string direction_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:132:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 132 | extern std::string nucleation_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:141:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 141 | extern std::string interaction_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:153:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 153 | extern std::string bundle_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/main.cpp:3:9: warning: variable 's1' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage] 3 | System* s1; | ^ | static src/main.cpp:5:14: warning: parameter 'argc' is unused [misc-unused-parameters] 5 | int main(int argc, char* argv[]) | ^~~~ | /*argc*/ src/main.cpp:7:10: warning: no header providing "std::cout" is directly included [misc-include-cleaner] 2 | 3 | System* s1; 4 | 5 | int main(int argc, char* argv[]) 6 | { 7 | std::cout << std::fixed; | ^ src/main.cpp:7:23: warning: no header providing "std::fixed" is directly included [misc-include-cleaner] 2 | 3 | System* s1; 4 | 5 | int main(int argc, char* argv[]) 6 | { 7 | std::cout << std::fixed; | ^ src/main.cpp:8:23: warning: no header providing "std::setprecision" is directly included [misc-include-cleaner] 2 | 3 | System* s1; 4 | 5 | int main(int argc, char* argv[]) 6 | { 7 | std::cout << std::fixed; 8 | std::cout << std::setprecision(3); | ^ src/main.cpp:9:5: warning: no header providing "time_t" is directly included [misc-include-cleaner] 2 | 3 | System* s1; 4 | 5 | int main(int argc, char* argv[]) 6 | { 7 | std::cout << std::fixed; 8 | std::cout << std::setprecision(3); 9 | time_t start_time = time(nullptr); | ^ src/main.cpp:9:5: warning: variable 'start_time' of type 'time_t' (aka 'long') can be declared 'const' [misc-const-correctness] 9 | time_t start_time = time(nullptr); | ^ | const src/main.cpp:9:25: warning: no header providing "time" is directly included [misc-include-cleaner] 9 | time_t start_time = time(nullptr); | ^ src/main.cpp:11:5: warning: assigning newly created 'gsl::owner<>' to non-owner 'System *' [cppcoreguidelines-owning-memory] 11 | s1 = new System(argv[1]); | ^~~~~~~~~~~~~~~~~~~~~~~~ src/main.cpp:18:41: warning: no header providing "PROGRAM_VERSION" is directly included [misc-include-cleaner] 2 | std::cout << "corticalSim v" << PROGRAM_VERSION << std::endl; | ^ src/main.cpp:18:65: warning: no header providing "std::endl" is directly included [misc-include-cleaner] 2 | std::cout << "corticalSim v" << PROGRAM_VERSION << std::endl; | ^ src/main.cpp:27:5: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory] 27 | delete s1; | ^ ~~ src/main.cpp:3:1: note: variable declared here 3 | System* s1; | ^~~~~~~~~~ 34463 warnings generated. Suppressed 34316 warnings (34316 in non-user code). Use -header-filter=.* or leave it as default to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. [ 3/13][25.9s] clang-tidy-22 -p=/home/runner/work/corticalsim/corticalsim/build/debug --config-file=/home/runner/work/corticalsim/corticalsim/.clang-tidy /home/runner/work/corticalsim/corticalsim/src/region.cpp include/CompactList_impl.hpp:12:7: warning: class 'CompactList' 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] 12 | class CompactList | ^ include/CompactList_impl.hpp:26:19: warning: all parameters should be named in a function [readability-named-parameter] 26 | void remove(T*); | ^ | /*element*/ include/CompactList_impl.hpp:49:16: warning: all parameters should be named in a function [readability-named-parameter] 49 | T* create(Q); | ^ | /*par1*/ include/CompactList_impl.hpp:51:16: warning: all parameters should be named in a function [readability-named-parameter] 51 | T* create(Q, R); | ^ | /*par1*/ /*par2*/ include/CompactList_impl.hpp:53:16: warning: all parameters should be named in a function [readability-named-parameter] 53 | T* create(Q, R, S); | ^ | /*par1*/ /*par2*/ /*par3*/ include/CompactList_impl.hpp:80:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 80 | return; | ^~~~~~~ 81 | } include/CompactList_impl.hpp:86:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 86 | T* new_element = new (MemPool::malloc()) T(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:94:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 94 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:102:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 102 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:110:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 110 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:145:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 145 | return; | ^~~~~~~ 146 | } include/CompactList_impl.hpp:149:7: warning: class 'CompactListItem' 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] 149 | class CompactListItem | ^ include/CompactList_impl.hpp:149:7: warning: destructor of 'CompactListItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] include/CompactList_impl.hpp:149:7: note: make it protected and non-virtual 149 | class CompactListItem | ^ 150 | { 151 | public: 152 | 153 | CompactListItem(): 154 | index(0) {}; 155 | int index; 156 | 157 | protected: 158 | 159 | virtual ~CompactListItem() {}; | ~~~~~~~ include/CompactList_impl.hpp:153:5: warning: public constructor allows the CRTP to be constructed as a regular template class; consider making it private and declaring the derived class as friend [bugprone-crtp-constructor-accessibility] 153 | CompactListItem(): | ^ 154 | index(0) {}; | 155 | int index; 156 | 157 | protected: 158 | 159 | virtual ~CompactListItem() {}; 160 | template 161 | friend class CompactList; 162 | }; include/CompactList_impl.hpp:155:9: warning: use default member initializer for 'index' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 154 | index(0) {}; | ~~~~~~~~ 155 | int index; | ^ | {0} include/CompactList_impl.hpp:159:13: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] 159 | virtual ~CompactListItem() {}; | ^ ~~ | = default include/DLList_impl.hpp:32:7: warning: class 'DLList' 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] 32 | class DLList | ^ include/DLList_impl.hpp:36:9: warning: use default member initializer for 'num_elements' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 36 | int num_elements; | ^ | { 0 } include/DLList_impl.hpp:42:8: warning: use default member initializer for 'first_element' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 42 | T* first_element; | ^ | { nullptr } 43 | T* last_element; 44 | 45 | using MemPool = crts::SingletonPool; 46 | 47 | void unlink_element(T*); 48 | T* link_element(T*); 49 | 50 | public: 51 | 52 | DLList(): 53 | num_elements{ 0 }, 54 | first_element{ nullptr }, | ~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:43:8: warning: use default member initializer for 'last_element' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 43 | T* last_element; | ^ | { nullptr } 44 | 45 | using MemPool = crts::SingletonPool; 46 | 47 | void unlink_element(T*); 48 | T* link_element(T*); 49 | 50 | public: 51 | 52 | DLList(): 53 | num_elements{ 0 }, 54 | first_element{ nullptr }, 55 | last_element{ nullptr } {}; | ~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:47:27: warning: all parameters should be named in a function [readability-named-parameter] 47 | void unlink_element(T*); | ^ | /*element*/ include/DLList_impl.hpp:48:23: warning: all parameters should be named in a function [readability-named-parameter] 48 | T* link_element(T*); | ^ | /*new_element*/ include/DLList_impl.hpp:70:16: warning: all parameters should be named in a function [readability-named-parameter] 70 | T* create(Q); | ^ | /*par1*/ include/DLList_impl.hpp:72:16: warning: all parameters should be named in a function [readability-named-parameter] 72 | T* create(Q, R); | ^ | /*par1*/ /*par2*/ include/DLList_impl.hpp:74:16: warning: all parameters should be named in a function [readability-named-parameter] 74 | T* create(Q, R, S); | ^ | /*par1*/ /*par2*/ /*par3*/ include/DLList_impl.hpp:75:19: warning: all parameters should be named in a function [readability-named-parameter] 75 | void remove(T*); | ^ | /*element*/ include/DLList_impl.hpp:77:49: warning: all parameters should be named in a function [readability-named-parameter] 77 | void import(DLList&, T*); | ^ | /*old_list*/ /*element*/ include/DLList_impl.hpp:78:53: warning: all parameters should be named in a function [readability-named-parameter] 78 | void import_set(DLList&, T*, T*); | ^ | /*old_list*/ /*first_element*/ /*last_element*/ include/DLList_impl.hpp:137:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 137 | return; | ^~~~~~~ 138 | } include/DLList_impl.hpp:154:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 154 | T* new_element = new (MemPool::malloc()) T(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:162:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 162 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:170:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 170 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:178:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 178 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:178:54: warning: parameter 'par2' of type 'std::vector' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param] 4 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^ | std::move( ) include/DLList_impl.hpp:196:8: warning: variable 'temp' is not initialized [cppcoreguidelines-init-variables] 196 | T* temp; | ^ | = nullptr include/DLList_impl.hpp:211:7: warning: class 'DLBaseItem' 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] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: the implicit default constructor of the CRTP is publicly accessible; consider making it private and declaring the derived class as friend [bugprone-crtp-constructor-accessibility] 211 | class DLBaseItem | ^ 212 | { | include/DLList_impl.hpp:226:13: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] 226 | virtual ~DLBaseItem() {}; | ^ ~~ | = default include/det_queue.hpp:14:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 14 | System* const system; // pointer to containing system | ^ include/det_queue.hpp:14:19: warning: member variable 'system' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes] include/det_queue.hpp:17:12: warning: method 'current_pos' can be made const [readability-make-member-function-const] 17 | double current_pos() | ^ | const include/det_queue.hpp:25:63: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 25 | double progression(int cache_pos) { return current_base - value_cache[cache_pos]; } | ^ include/det_queue.hpp:48:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 48 | double value_cache[POSITION_CACHE_SIZE]; // cache of previous 'distance' values | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/det_queue.hpp:49:29: warning: member 'distance_time_conversion_function' of type 'double (System::*const)(double)' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 49 | double (System::* const distance_time_conversion_function)(double); | ^ include/det_queue.hpp:51:29: warning: member 'time_distance_conversion_function' of type 'double (System::*const)(double)' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 51 | double (System::* const time_distance_conversion_function)(double); | ^ include/edge.hpp:31:9: warning: 'exclude_point' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | : exclude_point(0) 30 | { 31 | exclude_point = 0; | ^~~~~~~~~~~~~~~~~~ include/edge.hpp:33:9: warning: 'p_cat' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , p_cat(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; | ^~~~~~~~~~~~ include/edge.hpp:34:9: warning: 'edg_ang_norm' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , edg_ang_norm(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; | ^~~~~~~~~~~~~~~~~~~ include/edge.hpp:35:9: warning: 'xy_rotation_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , xy_rotation_angle(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; 35 | xy_rotation_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~~~~~ include/edge.hpp:36:9: warning: 'edg_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , edg_angle(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; 35 | xy_rotation_angle = 0.0; 36 | edg_angle = 0.0; | ^~~~~~~~~~~~~~~~ include/edge.hpp:37:9: warning: 'edg_bend_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , edg_bend_angle(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; 35 | xy_rotation_angle = 0.0; 36 | edg_angle = 0.0; 37 | edg_bend_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~~ include/event.hpp:7:7: warning: class 'EventDescriptor' 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] 7 | class EventDescriptor | ^ include/event.hpp:20:24: warning: member 'mt' of type 'Microtubule *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | Microtubule* const mt; | ^ include/geometry.hpp:10:7: warning: class 'Geometry' 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] 10 | class Geometry | ^ include/geometry.hpp:20:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | System* const system; | ^ include/geometry.hpp:28:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 28 | double patch_area[3]; | ^~~~~~~~~~~~~~~~~~~~ include/geometry.hpp:29:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 29 | std::vector regions_index[3]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/geometry.hpp:35:5: warning: constructor does not initialize these fields: areain_mesh, area_ppb, patch_area, element_max [cppcoreguidelines-pro-type-member-init] 19 | double area_ppb; | | {} 20 | std::vector ppb; 21 | 22 | double patch_area[3]; | | {} 23 | std::vector regions_index[3]; 24 | 25 | int element_max; | | {} 26 | Eigen::Vector3d object_cm, object_pa, nucleous_position; 27 | std::vector regions; 28 | 29 | Geometry(System* s, double a): | ^ include/geometry.hpp:39:9: warning: use range-based for loop instead [modernize-loop-convert] 39 | for (int i = 0; i < 3; i++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~ | (double & i : patch_area) 40 | { 41 | patch_area[i] = 0.0; | ~~~~~~~~~~~~~ | i include/geometry.hpp:41:13: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 41 | patch_area[i] = 0.0; | ^ include/geometry.hpp:46:27: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 46 | virtual ~Geometry() { return; }; | ^~~~~~~ include/geometry.hpp:77:22: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 77 | TrajectoryVector extend_trajectory(Trajectory*, Direction); | ^ | override include/geometry.hpp:77:22: warning: visibility of function 'extend_trajectory' is changed from private in class 'Geometry' to public [misc-override-with-different-visibility] include/geometry.hpp:69:30: note: function declared here as private 69 | virtual TrajectoryVector extend_trajectory(Trajectory*, Direction) = 0; | ^ include/geometry.hpp:77:51: warning: all parameters should be named in a function [readability-named-parameter] 77 | TrajectoryVector extend_trajectory(Trajectory*, Direction); | ^ | /*unused*/ /*unused*/ include/geometry.hpp:78:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 78 | void get_order_parameters(OrderParameters&); | ^ | override include/geometry.hpp:78:47: warning: all parameters should be named in a function [readability-named-parameter] 78 | void get_order_parameters(OrderParameters&); | ^ | /*unused*/ include/geometry.hpp:79:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 79 | void output_snapshot(std::ostream&); | ^ | override include/geometry.hpp:79:39: warning: all parameters should be named in a function [readability-named-parameter] 79 | void output_snapshot(std::ostream&); | ^ | /*unused*/ include/geometry.hpp:80:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 80 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | override include/geometry.hpp:80:45: warning: all parameters should be named in a function [readability-named-parameter] 80 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | /*unused*/ /*unused*/ /*unused*/ include/intersection.hpp:33:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | : x(x1) 32 | { 33 | x = x1; | ^~~~~~~ include/intersection.hpp:34:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , y(y1) 32 | { 33 | x = x1; 34 | y = y1; | ^~~~~~~ include/intersection.hpp:35:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , z(z1) 32 | { 33 | x = x1; 34 | y = y1; 35 | z = z1; | ^~~~~~~ include/intersection.hpp:36:9: warning: 'next_element' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , next_element(n1) 32 | { 33 | x = x1; 34 | y = y1; 35 | z = z1; 36 | next_element = n1; | ^~~~~~~~~~~~~~~~~~ include/measurement.hpp:7:7: warning: constructor does not initialize these fields: time, length_density, optical_density, average_length, number_of_m_ts, segments_per_mt, growing_number, shrinking_number, segments, trajectories, zipper_count, crossover_count, induced_catastrophe_count, valid_d_event_count, invalid_d_event_count, s_event_count, length_severing_count, intersection_severing_count, occupied_intersection_count, g_eff_adjust [cppcoreguidelines-pro-type-member-init] 7 | class Measurement | ^ 8 | { 9 | public: 10 | 11 | double time; | | {} 12 | double length_density; | | {} 13 | double optical_density; | | {} 14 | double average_length; | | {} 15 | int number_of_m_ts; | | {} 16 | double segments_per_mt; | | {} 17 | OrderParameters order; 18 | int growing_number; | | {} 19 | int shrinking_number; | | {} 20 | int segments; | | {} 21 | int trajectories; | | {} 22 | int zipper_count; | | {} include/measurement.hpp:34:41: warning: parameter 2 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 | std::ostream& operator<<(std::ostream&, const Measurement); | ^~~~~ include/microtubule.hpp:10:7: warning: class 'Microtubule' 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] 10 | class Microtubule: public DLBaseItem | ^ include/microtubule.hpp:14:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 14 | System* const system; | ^ include/microtubule.hpp:31:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 31 | ~Microtubule(); | ^ | override include/mt_tip.hpp:7:7: warning: class 'MTTip' 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] 7 | class MTTip | ^ include/parameters.hpp:105:3: warning: redundant access specifier has the same accessibility as the previous access specifier [readability-redundant-access-specifiers] 105 | public: | ^~~~~~~ include/parameters.hpp:42:3: note: previously declared here 42 | public: | ^ include/parameters.hpp:119:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 119 | double rdirector[3]; | ^~~~~~~~~~~~~~~~~~~ include/parameters.hpp:139:5: warning: constructor does not initialize these fields: local_order [cppcoreguidelines-pro-type-member-init] 136 | double local_order; | | {} 137 | Eigen::Vector3d sv; 138 | 139 | OrderParametersRaw(void) | ^ include/parameters.hpp:139:24: warning: redundant void argument list in function definition [modernize-redundant-void-arg] 139 | OrderParametersRaw(void) | ^~~~ include/parameters.hpp:141:9: warning: 'local_l' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | : local_l(0.) 140 | { 141 | local_l = 0.; | ^~~~~~~~~~~~~ include/parameters.hpp:142:9: warning: 'local_l_opt' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , local_l_opt(0.) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; | ^~~~~~~~~~~~~~~~~ include/parameters.hpp:143:9: warning: 'qxx' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxx(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; | ^~~~~~~~ include/parameters.hpp:144:9: warning: 'qxy' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxy(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; | ^~~~~~~~ include/parameters.hpp:145:9: warning: 'qxz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; | ^~~~~~~~ include/parameters.hpp:146:9: warning: 'qyy' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qyy(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; | ^~~~~~~~ include/parameters.hpp:147:9: warning: 'qyz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qyz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; 147 | qyz = 0; | ^~~~~~~~ include/parameters.hpp:148:9: warning: 'qzz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qzz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; 147 | qyz = 0; 148 | qzz = 0; | ^~~~~~~~ include/parameters.hpp:152:9: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 152 | return; | ^~~~~~~ 153 | } include/parameters.hpp:155:22: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 155 | double extract_r(double director[3], std::string geometry) | ^~~~~~~~~~~~~~~~~~ include/parameters.hpp:155:54: warning: the parameter 'geometry' of type 'std::string' (aka 'basic_string') is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 155 | double extract_r(double director[3], std::string geometry) | ^ | const & include/parameters.hpp:178:40: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 178 | director[i] = evec_mat(i, max_pos); | ^ include/parameters.hpp:195:40: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 195 | director[i] = evec_mat(i, min_pos); | ^ include/parameters.hpp:199:16: warning: redundant parentheses around expression [readability-redundant-parentheses] 199 | return (sel_eigen_val); | ^ ~ include/region.hpp:9:7: warning: class 'Region' 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] 9 | class Region | ^ include/region.hpp:20:21: warning: member 'geometry' of type 'Geometry *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | Geometry* const geometry; | ^ include/region.hpp:24:12: warning: use default member initializer for 'total_length' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 24 | double total_length; | ^ | {0} include/region.hpp:26:9: warning: use default member initializer for 'previous_update_tag' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 26 | int previous_update_tag; | ^ | {0} include/region.hpp:27:9: warning: use default member initializer for 'region_id' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 27 | int region_id; | ^ | {0} include/region.hpp:28:12: warning: use default member initializer for 'z_offset' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 28 | double z_offset; | ^ | {0.0} include/region.hpp:29:12: warning: use default member initializer for 'rot_angle' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 29 | double rot_angle; | ^ | {0.0} include/region.hpp:30:12: warning: use default member initializer for 'peri_meter' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 30 | double peri_meter; | ^ | {0.0} include/region.hpp:49:45: warning: all parameters should be named in a function [readability-named-parameter] 49 | RegionMTTipTag register_on_region(MTTip*, TipType, MTType); | ^ | /*p_tip*/ /*tiptype*/ /*mttype*/ include/region.hpp:50:47: warning: all parameters should be named in a function [readability-named-parameter] 50 | void unregister_from_region(RegionMTTipTag, TipType, MTType); | ^ | /*tag*/ /*tiptype*/ /*mttype*/ include/region.hpp:55:5: warning: constructor does not initialize these fields: face_tag, poly_intersect_mark [cppcoreguidelines-pro-type-member-init] 38 | Region(Geometry* g, double a): | ^ include/region.hpp:68:22: warning: use emplace_back instead of push_back [modernize-use-emplace] 68 | vertices.push_back(Eigen::Vector2d(0, 0)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~ | emplace_back( include/region.hpp:69:18: warning: use emplace_back instead of push_back [modernize-use-emplace] 69 | side.push_back(Edge()); | ^~~~~~~~~~~~~~~~ | emplace_back( include/region.hpp:73:25: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 73 | virtual ~Region() { return; }; | ^~~~~~~ include/region.hpp:78:51: warning: parameter 2 is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls] 78 | virtual void translate_vector(SurfaceVector&, const double) = 0; | ^~~~~ include/region.hpp:87:60: warning: all parameters should be named in a function [readability-named-parameter] 87 | TrajectoryVector insert_trajectory(const SurfaceVector&); | ^ | /*s_vec*/ include/region.hpp:88:39: warning: all parameters should be named in a function [readability-named-parameter] 88 | void remove_trajectory(Trajectory*); | ^ | /*tr*/ include/region.hpp:96:5: warning: use '= delete' to prohibit calling of a special member function [modernize-use-equals-delete] 96 | Region(const Region&); | ^ | = delete include/region.hpp:97:13: warning: use '= delete' to prohibit calling of a special member function [modernize-use-equals-delete] 97 | Region& operator=(const Region&); | ^ | = delete include/region.hpp:106:27: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 106 | virtual SurfaceVector random_surface_vector() = 0; | ~~~~~~~ ^ | override include/region.hpp:106:27: warning: visibility of function 'random_surface_vector' is changed from protected in class 'Region' to public [misc-override-with-different-visibility] include/region.hpp:90:27: note: function declared here as protected 90 | virtual SurfaceVector random_surface_vector() = 0; | ^ include/region.hpp:107:18: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 107 | virtual void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&) = 0; | ~~~~~~~ ^ | override include/region.hpp:107:59: warning: all parameters should be named in a function [readability-named-parameter] 107 | virtual void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&) = 0; | ^ | /*unused*/ /*unused*/ /*unused*/ /*unused*/ include/region.hpp:108:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 108 | void make_intersection_list(Trajectory*); | ^ | override include/region.hpp:108:10: warning: visibility of function 'make_intersection_list' is changed from protected in class 'Region' to public [misc-override-with-different-visibility] include/region.hpp:89:18: note: function declared here as protected 89 | virtual void make_intersection_list(Trajectory*) = 0; | ^ include/region.hpp:108:44: warning: all parameters should be named in a function [readability-named-parameter] 108 | void make_intersection_list(Trajectory*); | ^ | /*unused*/ include/region.hpp:109:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 109 | void translate_vector(SurfaceVector&, const double); | ^ | override include/region.hpp:109:41: warning: all parameters should be named in a function [readability-named-parameter] 109 | void translate_vector(SurfaceVector&, const double); | ^ | /*unused*/ /*unused*/ include/region.hpp:109:43: warning: parameter 2 is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls] 109 | void translate_vector(SurfaceVector&, const double); | ^~~~~ include/region.hpp:110:12: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 110 | double intersection_angle(Trajectory*, Trajectory*); | ^ | override include/region.hpp:110:42: warning: all parameters should be named in a function [readability-named-parameter] 110 | double intersection_angle(Trajectory*, Trajectory*); | ^ | /*unused*/ /*unused*/ include/region.hpp:116:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 116 | void output_snapshot(std::ostream&); | ^ | override include/region.hpp:116:39: warning: all parameters should be named in a function [readability-named-parameter] 116 | void output_snapshot(std::ostream&); | ^ | /*unused*/ include/region.hpp:119:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 119 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | override include/region.hpp:119:45: warning: all parameters should be named in a function [readability-named-parameter] 119 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | /*unused*/ /*unused*/ /*unused*/ include/region.hpp:128:19: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 128 | SurfaceVector random_surface_vector(); | ^ | override include/region.hpp:129:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 129 | void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&); | ^ | override include/region.hpp:129:51: warning: all parameters should be named in a function [readability-named-parameter] 129 | void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&); | ^ | /*unused*/ /*unused*/ /*unused*/ /*unused*/ include/segment.hpp:7:7: warning: class 'Segment' 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] 7 | class Segment: public DLBaseItem | ^ include/segment.hpp:12:23: warning: member 'trajectory' of type 'Trajectory *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 12 | Trajectory* const trajectory; | ^ include/segment.hpp:27:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 27 | ~Segment(); | ^ | override include/segment.hpp:29:12: warning: method 'length' can be made const [readability-make-member-function-const] 29 | double length() { return std::abs(end - start); } | ^ | const include/surface.hpp:16:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | : x(x1) 15 | { 16 | x = x1; | ^~~~~~~ include/surface.hpp:17:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | , y(y1) 15 | { 16 | x = x1; 17 | y = y1; | ^~~~~~~ include/surface.hpp:18:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | , z(z1) 15 | { 16 | x = x1; 17 | y = y1; 18 | z = z1; | ^~~~~~~ include/surface.hpp:32:9: warning: 'cos_theta' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 30 | BendingOperator() | | : cos_theta(0.0) 31 | { 32 | cos_theta = 0.0; | ^~~~~~~~~~~~~~~~ include/surface.hpp:33:9: warning: 'sin_theta' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 30 | BendingOperator() | | , sin_theta(0.0) 31 | { 32 | cos_theta = 0.0; 33 | sin_theta = 0.0; | ^~~~~~~~~~~~~~~~ include/surface.hpp:49:5: warning: constructor does not initialize these fields: region [cppcoreguidelines-pro-type-member-init] 47 | Region* region; | | {} 48 | 49 | SurfaceVector() | ^ include/surface.hpp:51:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | : x(0.0) 50 | { 51 | x = 0.0; | ^~~~~~~~ include/surface.hpp:52:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , y(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; | ^~~~~~~~ include/surface.hpp:53:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , z(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; | ^~~~~~~~ include/surface.hpp:55:9: warning: 'angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , angle(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; 54 | 55 | angle = 0.0; | ^~~~~~~~~~~~ include/surface.hpp:56:9: warning: 'tv_pos' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , tv_pos(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; 54 | 55 | angle = 0.0; 56 | tv_pos = 0.0; | ^~~~~~~~~~~~~ include/surface.hpp:73:9: warning: 'mid_point' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | : mid_point(0) 72 | { 73 | mid_point = 0; | ^~~~~~~~~~~~~~ include/surface.hpp:74:9: warning: 'length' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | , length(0.0) 72 | { 73 | mid_point = 0; 74 | length = 0.0; | ^~~~~~~~~~~~~ include/surface.hpp:75:9: warning: 'edge_3d_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | , edge_3d_angle(0.0) 72 | { 73 | mid_point = 0; 74 | length = 0.0; 75 | edge_3d_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~ include/system.hpp:14:7: warning: class 'System' 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] 14 | class System | ^ include/system.hpp:70:12: warning: method 'identity' can be made static [readability-convert-member-functions-to-static] 70 | double identity(double i) { return i; } | ^ | static include/system.hpp:115:21: warning: redundant void argument list in function declaration [modernize-redundant-void-arg] 115 | void next_event(void); | ^~~~ include/system.hpp:138:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 138 | double binomial_table[MAXBINOM][MAXBINOM]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/system.hpp:139:30: warning: redundant void argument list in function declaration [modernize-redundant-void-arg] 139 | void make_binomial_table(void); | ^~~~ include/trajectory.hpp:16:5: warning: constructor does not initialize these fields: cdir [cppcoreguidelines-pro-type-member-init] 16 | TrajectoryVector(double p, Direction d, Trajectory* t): | ^ include/trajectory.hpp:23:5: warning: constructor does not initialize these fields: pos, dir, cdir, trajectory [cppcoreguidelines-pro-type-member-init] 12 | double pos; | | {} 13 | Direction dir, cdir; 14 | Trajectory* trajectory; | | {} 15 | 16 | TrajectoryVector(double p, Direction d, Trajectory* t): 17 | pos(p), 18 | dir(d), 19 | trajectory(t) 20 | { 21 | } 22 | 23 | TrajectoryVector() {} | ^ include/trajectory.hpp:23:5: warning: use '= default' to define a trivial default constructor [modernize-use-equals-default] 23 | TrajectoryVector() {} | ^ ~~ | = default; include/trajectory.hpp:25:22: warning: method 'flipped' can be made const [readability-make-member-function-const] 25 | TrajectoryVector flipped() | ^ | const include/trajectory.hpp:27:16: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] 27 | return TrajectoryVector(pos, dir == Direction::FORWARD ? Direction::BACKWARD : Direction::FORWARD, trajectory); | ^~~~~~~~~~~~~~~~~ ~ | { } include/trajectory.hpp:31:7: warning: class 'Trajectory' 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] 31 | class Trajectory: public DLBaseItem | ^ include/trajectory.hpp:40:25: warning: member 'base' of type 'const SurfaceVector' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 40 | const SurfaceVector base; | ^ include/trajectory.hpp:41:18: warning: member 'length' of type 'const double' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 41 | const double length; | ^ include/trajectory.hpp:82:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 82 | ~Trajectory(); | ^ | override include/types.hpp:40:9: warning: macro 'PROGRAM_VERSION' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] 40 | #define PROGRAM_VERSION "BC.2018" | ^ include/types.hpp:88:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 88 | extern std::string direction_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:132:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 132 | extern std::string nucleation_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:141:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 141 | extern std::string interaction_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:153:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 153 | extern std::string bundle_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/region.cpp:5:1: warning: no header providing "TrajectoryVector" is directly included [misc-include-cleaner] 4 | 5 | TrajectoryVector Region::insert_trajectory(const SurfaceVector& s_vec) | ^ src/region.cpp:5:50: warning: no header providing "SurfaceVector" is directly included [misc-include-cleaner] 3 | #include "system.hpp" 4 | 5 | TrajectoryVector Region::insert_trajectory(const SurfaceVector& s_vec) | ^ src/region.cpp:15:10: warning: no header providing "std::vector" is directly included [misc-include-cleaner] 4 | 5 | TrajectoryVector Region::insert_trajectory(const SurfaceVector& s_vec) 6 | { 7 | #ifdef DBG_GEOMETRY 8 | cout << "DBG/GEOMETRY: Region::insertTrajectory() called\n"; 9 | #endif 10 | 11 | TrajectoryVector t_vec; 12 | double t_length(0.); 13 | SurfaceVector new_base(s_vec); 14 | 15 | std::vector end_point; | ^ src/region.cpp:15:17: warning: no header providing "PointAtEdge" is directly included [misc-include-cleaner] 3 | #include "system.hpp" 4 | 5 | TrajectoryVector Region::insert_trajectory(const SurfaceVector& s_vec) 6 | { 7 | #ifdef DBG_GEOMETRY 8 | cout << "DBG/GEOMETRY: Region::insertTrajectory() called\n"; 9 | #endif 10 | 11 | TrajectoryVector t_vec; 12 | double t_length(0.); 13 | SurfaceVector new_base(s_vec); 14 | 15 | std::vector end_point; | ^ src/region.cpp:27:46: warning: narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 27 | geometry->system->count_intersections += 2 * (t_vec.trajectory->intersections.size()); | ^ src/region.cpp:53:46: warning: narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 53 | geometry->system->count_intersections -= 2 * (tr->intersections.size()); | ^ src/region.cpp:56:5: warning: no header providing "IntersectionItr" is directly included [misc-include-cleaner] 4 | IntersectionItr is(++tr->intersections.begin()); | ^ src/region.cpp:56:5: warning: use auto when declaring iterators [modernize-use-auto] 56 | IntersectionItr is(++tr->intersections.begin()); | ^~~~~~~~~~~~~~~ | auto src/region.cpp:79:32: warning: no header providing "Direction" is directly included [misc-include-cleaner] 79 | if (tr->prev_tr.dir == Direction::BACKWARD) | ^ src/region.cpp:122:1: warning: no header providing "RegionMTTipTag" is directly included [misc-include-cleaner] 122 | RegionMTTipTag Region::register_on_region(MTTip* p_tip, TipType tiptype, MTType mttype) | ^ src/region.cpp:122:43: warning: no header providing "MTTip" is directly included [misc-include-cleaner] 3 | RegionMTTipTag Region::register_on_region(MTTip* p_tip, TipType tiptype, MTType mttype) | ^ src/region.cpp:122:57: warning: no header providing "TipType" is directly included [misc-include-cleaner] 122 | RegionMTTipTag Region::register_on_region(MTTip* p_tip, TipType tiptype, MTType mttype) | ^ src/region.cpp:122:74: warning: no header providing "MTType" is directly included [misc-include-cleaner] 122 | RegionMTTipTag Region::register_on_region(MTTip* p_tip, TipType tiptype, MTType mttype) | ^ src/region.cpp:134:5: warning: do not use 'else' after 'return' [readability-else-after-return] 134 | else | ^~~~ 135 | { | ~ 136 | // insert growing MT | ~~~~~~~~~~~~~~~~~~~~ 137 | if (mttype == MTType::GROWING) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 138 | { | ~ 139 | geometry->system->growing_tips_reg[face_tag]++; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 140 | return growing_plus_tip_list.insert(growing_plus_tip_list.end(), p_tip); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 141 | } | ~ 142 | 143 | // insert shrinking MT | ~~~~~~~~~~~~~~~~~~~~~~ 144 | else | ~~~~ 145 | { | ~ 146 | return shrinking_plus_tip_list.insert(shrinking_plus_tip_list.end(), p_tip); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 147 | } | ~ 148 | } | ~ src/region.cpp:144:9: warning: do not use 'else' after 'return' [readability-else-after-return] note: this fix will not be applied because it overlaps with another fix 144 | else | ^~~~ src/region.cpp:178:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 178 | return; | ^~~~~~~ 179 | } src/region.cpp:190:52: warning: narrowing conversion from 'size_type' (aka 'unsigned long') to 'double' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 190 | * (geometry->system->p.v_min * (shrinking_plus_tip_list.size()) | ^ src/region.cpp:191:53: warning: narrowing conversion from 'size_type' (aka 'unsigned long') to 'double' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 191 | - geometry->system->p.v_tm * (minus_tip_list.size())) | ^ src/region.cpp:193:55: warning: narrowing conversion from 'size_type' (aka 'unsigned long') to 'double' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 193 | * (geometry->system->p.v_plus * (growing_plus_tip_list.size())); | ^ src/region.cpp:197:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 197 | return; | ^~~~~~~ 198 | } 35258 warnings generated. Suppressed 35015 warnings (35015 in non-user code). Use -header-filter=.* or leave it as default to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. [ 4/13][18.1s] clang-tidy-22 -p=/home/runner/work/corticalsim/corticalsim/build/debug --config-file=/home/runner/work/corticalsim/corticalsim/.clang-tidy /home/runner/work/corticalsim/corticalsim/src/linalg.cpp src/linalg.cpp:3:33: warning: no header providing "Eigen::Matrix3d" is directly included [misc-include-cleaner] 2 | 3 | void eigen_decomposition(Eigen::Matrix3d& a, Eigen::Matrix3d& v, Eigen::Vector3d& d) | ^ src/linalg.cpp:3:73: warning: no header providing "Eigen::Vector3d" is directly included [misc-include-cleaner] 3 | void eigen_decomposition(Eigen::Matrix3d& a, Eigen::Matrix3d& v, Eigen::Vector3d& d) | ^ src/linalg.cpp:5:5: warning: variable 'solver' of type 'Eigen::SelfAdjointEigenSolver' (aka 'Eigen::SelfAdjointEigenSolver>') can be declared 'const' [misc-const-correctness] 5 | Eigen::SelfAdjointEigenSolver solver(a); | ^ | const src/linalg.cpp:5:12: warning: no header providing "Eigen::SelfAdjointEigenSolver" is directly included [misc-include-cleaner] 2 | 3 | void eigen_decomposition(Eigen::Matrix3d& a, Eigen::Matrix3d& v, Eigen::Vector3d& d) 4 | { 5 | Eigen::SelfAdjointEigenSolver solver(a); | ^ 34992 warnings generated. Suppressed 34988 warnings (34988 in non-user code). Use -header-filter=.* or leave it as default to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. [ 5/13][19.1s] clang-tidy-22 -p=/home/runner/work/corticalsim/corticalsim/build/debug --config-file=/home/runner/work/corticalsim/corticalsim/.clang-tidy /home/runner/work/corticalsim/corticalsim/src/trajectory.cpp include/CompactList_impl.hpp:12:7: warning: class 'CompactList' 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] 12 | class CompactList | ^ include/CompactList_impl.hpp:26:19: warning: all parameters should be named in a function [readability-named-parameter] 26 | void remove(T*); | ^ | /*element*/ include/CompactList_impl.hpp:49:16: warning: all parameters should be named in a function [readability-named-parameter] 49 | T* create(Q); | ^ | /*par1*/ include/CompactList_impl.hpp:51:16: warning: all parameters should be named in a function [readability-named-parameter] 51 | T* create(Q, R); | ^ | /*par1*/ /*par2*/ include/CompactList_impl.hpp:53:16: warning: all parameters should be named in a function [readability-named-parameter] 53 | T* create(Q, R, S); | ^ | /*par1*/ /*par2*/ /*par3*/ include/CompactList_impl.hpp:80:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 80 | return; | ^~~~~~~ 81 | } include/CompactList_impl.hpp:86:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 86 | T* new_element = new (MemPool::malloc()) T(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:94:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 94 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:102:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 102 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:110:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 110 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:145:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 145 | return; | ^~~~~~~ 146 | } include/CompactList_impl.hpp:149:7: warning: class 'CompactListItem' 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] 149 | class CompactListItem | ^ include/CompactList_impl.hpp:149:7: warning: destructor of 'CompactListItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] include/CompactList_impl.hpp:149:7: note: make it protected and non-virtual 149 | class CompactListItem | ^ 150 | { 151 | public: 152 | 153 | CompactListItem(): 154 | index(0) {}; 155 | int index; 156 | 157 | protected: 158 | 159 | virtual ~CompactListItem() {}; | ~~~~~~~ include/CompactList_impl.hpp:153:5: warning: public constructor allows the CRTP to be constructed as a regular template class; consider making it private and declaring the derived class as friend [bugprone-crtp-constructor-accessibility] 153 | CompactListItem(): | ^ 154 | index(0) {}; | 155 | int index; 156 | 157 | protected: 158 | 159 | virtual ~CompactListItem() {}; 160 | template 161 | friend class CompactList; 162 | }; include/CompactList_impl.hpp:155:9: warning: use default member initializer for 'index' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 154 | index(0) {}; | ~~~~~~~~ 155 | int index; | ^ | {0} include/CompactList_impl.hpp:159:13: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] 159 | virtual ~CompactListItem() {}; | ^ ~~ | = default include/DLList_impl.hpp:32:7: warning: class 'DLList' 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] 32 | class DLList | ^ include/DLList_impl.hpp:36:9: warning: use default member initializer for 'num_elements' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 36 | int num_elements; | ^ | { 0 } include/DLList_impl.hpp:42:8: warning: use default member initializer for 'first_element' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 42 | T* first_element; | ^ | { nullptr } 43 | T* last_element; 44 | 45 | using MemPool = crts::SingletonPool; 46 | 47 | void unlink_element(T*); 48 | T* link_element(T*); 49 | 50 | public: 51 | 52 | DLList(): 53 | num_elements{ 0 }, 54 | first_element{ nullptr }, | ~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:43:8: warning: use default member initializer for 'last_element' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 43 | T* last_element; | ^ | { nullptr } 44 | 45 | using MemPool = crts::SingletonPool; 46 | 47 | void unlink_element(T*); 48 | T* link_element(T*); 49 | 50 | public: 51 | 52 | DLList(): 53 | num_elements{ 0 }, 54 | first_element{ nullptr }, 55 | last_element{ nullptr } {}; | ~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:47:27: warning: all parameters should be named in a function [readability-named-parameter] 47 | void unlink_element(T*); | ^ | /*element*/ include/DLList_impl.hpp:48:23: warning: all parameters should be named in a function [readability-named-parameter] 48 | T* link_element(T*); | ^ | /*new_element*/ include/DLList_impl.hpp:70:16: warning: all parameters should be named in a function [readability-named-parameter] 70 | T* create(Q); | ^ | /*par1*/ include/DLList_impl.hpp:72:16: warning: all parameters should be named in a function [readability-named-parameter] 72 | T* create(Q, R); | ^ | /*par1*/ /*par2*/ include/DLList_impl.hpp:74:16: warning: all parameters should be named in a function [readability-named-parameter] 74 | T* create(Q, R, S); | ^ | /*par1*/ /*par2*/ /*par3*/ include/DLList_impl.hpp:75:19: warning: all parameters should be named in a function [readability-named-parameter] 75 | void remove(T*); | ^ | /*element*/ include/DLList_impl.hpp:77:49: warning: all parameters should be named in a function [readability-named-parameter] 77 | void import(DLList&, T*); | ^ | /*old_list*/ /*element*/ include/DLList_impl.hpp:78:53: warning: all parameters should be named in a function [readability-named-parameter] 78 | void import_set(DLList&, T*, T*); | ^ | /*old_list*/ /*first_element*/ /*last_element*/ include/DLList_impl.hpp:137:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 137 | return; | ^~~~~~~ 138 | } include/DLList_impl.hpp:154:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 154 | T* new_element = new (MemPool::malloc()) T(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:162:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 162 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:170:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 170 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:178:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 178 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:196:8: warning: variable 'temp' is not initialized [cppcoreguidelines-init-variables] 196 | T* temp; | ^ | = nullptr include/DLList_impl.hpp:211:7: warning: class 'DLBaseItem' 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] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: warning: constructor does not initialize these fields: next_element, previous_element [cppcoreguidelines-pro-type-member-init] 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; | | {} 221 | T* previous_element; | | {} include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: the implicit default constructor of the CRTP is publicly accessible; consider making it private and declaring the derived class as friend [bugprone-crtp-constructor-accessibility] 211 | class DLBaseItem | ^ 212 | { | include/DLList_impl.hpp:226:13: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] 226 | virtual ~DLBaseItem() {}; | ^ ~~ | = default include/det_queue.hpp:14:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 14 | System* const system; // pointer to containing system | ^ include/det_queue.hpp:14:19: warning: member variable 'system' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes] include/det_queue.hpp:17:12: warning: method 'current_pos' can be made const [readability-make-member-function-const] 17 | double current_pos() | ^ | const include/det_queue.hpp:25:63: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 25 | double progression(int cache_pos) { return current_base - value_cache[cache_pos]; } | ^ include/det_queue.hpp:48:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 48 | double value_cache[POSITION_CACHE_SIZE]; // cache of previous 'distance' values | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/det_queue.hpp:49:29: warning: member 'distance_time_conversion_function' of type 'double (System::*const)(double)' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 49 | double (System::* const distance_time_conversion_function)(double); | ^ include/det_queue.hpp:51:29: warning: member 'time_distance_conversion_function' of type 'double (System::*const)(double)' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 51 | double (System::* const time_distance_conversion_function)(double); | ^ include/edge.hpp:31:9: warning: 'exclude_point' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | : exclude_point(0) 30 | { 31 | exclude_point = 0; | ^~~~~~~~~~~~~~~~~~ include/edge.hpp:33:9: warning: 'p_cat' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , p_cat(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; | ^~~~~~~~~~~~ include/edge.hpp:34:9: warning: 'edg_ang_norm' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , edg_ang_norm(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; | ^~~~~~~~~~~~~~~~~~~ include/edge.hpp:35:9: warning: 'xy_rotation_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , xy_rotation_angle(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; 35 | xy_rotation_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~~~~~ include/edge.hpp:36:9: warning: 'edg_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , edg_angle(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; 35 | xy_rotation_angle = 0.0; 36 | edg_angle = 0.0; | ^~~~~~~~~~~~~~~~ include/edge.hpp:37:9: warning: 'edg_bend_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , edg_bend_angle(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; 35 | xy_rotation_angle = 0.0; 36 | edg_angle = 0.0; 37 | edg_bend_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~~ include/event.hpp:7:7: warning: class 'EventDescriptor' 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] 7 | class EventDescriptor | ^ include/event.hpp:20:24: warning: member 'mt' of type 'Microtubule *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | Microtubule* const mt; | ^ include/geometry.hpp:10:7: warning: class 'Geometry' 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] 10 | class Geometry | ^ include/geometry.hpp:20:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | System* const system; | ^ include/geometry.hpp:28:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 28 | double patch_area[3]; | ^~~~~~~~~~~~~~~~~~~~ include/geometry.hpp:29:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 29 | std::vector regions_index[3]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/geometry.hpp:35:5: warning: constructor does not initialize these fields: areain_mesh, area_ppb, patch_area, element_max [cppcoreguidelines-pro-type-member-init] 19 | double area_ppb; | | {} 20 | std::vector ppb; 21 | 22 | double patch_area[3]; | | {} 23 | std::vector regions_index[3]; 24 | 25 | int element_max; | | {} 26 | Eigen::Vector3d object_cm, object_pa, nucleous_position; 27 | std::vector regions; 28 | 29 | Geometry(System* s, double a): | ^ include/geometry.hpp:39:9: warning: use range-based for loop instead [modernize-loop-convert] 39 | for (int i = 0; i < 3; i++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~ | (double & i : patch_area) 40 | { 41 | patch_area[i] = 0.0; | ~~~~~~~~~~~~~ | i include/geometry.hpp:41:13: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 41 | patch_area[i] = 0.0; | ^ include/geometry.hpp:46:27: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 46 | virtual ~Geometry() { return; }; | ^~~~~~~ include/geometry.hpp:68:66: warning: all parameters should be named in a function [readability-named-parameter] 68 | friend TrajectoryVector Trajectory::next_trajectory(Direction); | ^ | /*dir*/ include/geometry.hpp:77:22: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 77 | TrajectoryVector extend_trajectory(Trajectory*, Direction); | ^ | override include/geometry.hpp:77:22: warning: visibility of function 'extend_trajectory' is changed from private in class 'Geometry' to public [misc-override-with-different-visibility] include/geometry.hpp:69:30: note: function declared here as private 69 | virtual TrajectoryVector extend_trajectory(Trajectory*, Direction) = 0; | ^ include/geometry.hpp:77:51: warning: all parameters should be named in a function [readability-named-parameter] 77 | TrajectoryVector extend_trajectory(Trajectory*, Direction); | ^ | /*unused*/ /*unused*/ include/geometry.hpp:78:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 78 | void get_order_parameters(OrderParameters&); | ^ | override include/geometry.hpp:78:47: warning: all parameters should be named in a function [readability-named-parameter] 78 | void get_order_parameters(OrderParameters&); | ^ | /*unused*/ include/geometry.hpp:79:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 79 | void output_snapshot(std::ostream&); | ^ | override include/geometry.hpp:79:39: warning: all parameters should be named in a function [readability-named-parameter] 79 | void output_snapshot(std::ostream&); | ^ | /*unused*/ include/geometry.hpp:80:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 80 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | override include/geometry.hpp:80:45: warning: all parameters should be named in a function [readability-named-parameter] 80 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | /*unused*/ /*unused*/ /*unused*/ include/intersection.hpp:6:7: warning: constructor does not initialize these fields: occupancy, other_trajectory, occupied_list_ptr [cppcoreguidelines-pro-type-member-init] 6 | class Intersection | ^ 7 | // this object describes the intersection of one trajectory with another, from 8 | // one side. since it is created twice for every intersection, it is by far the 9 | // most memory-intensive object and should be kept as small as possible 10 | { 11 | public: 12 | 13 | int occupancy; | | {} 14 | Trajectory* other_trajectory; | | {} 15 | IntersectionItr mirror; 16 | #ifdef CROSS_SEV 17 | OccupiedIntersection* occupied_list_ptr; | | {} include/intersection.hpp:33:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | : x(x1) 32 | { 33 | x = x1; | ^~~~~~~ include/intersection.hpp:34:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , y(y1) 32 | { 33 | x = x1; 34 | y = y1; | ^~~~~~~ include/intersection.hpp:35:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , z(z1) 32 | { 33 | x = x1; 34 | y = y1; 35 | z = z1; | ^~~~~~~ include/intersection.hpp:36:9: warning: 'next_element' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , next_element(n1) 32 | { 33 | x = x1; 34 | y = y1; 35 | z = z1; 36 | next_element = n1; | ^~~~~~~~~~~~~~~~~~ include/measurement.hpp:34:41: warning: parameter 2 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 | std::ostream& operator<<(std::ostream&, const Measurement); | ^~~~~ include/microtubule.hpp:10:7: warning: class 'Microtubule' 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] 10 | class Microtubule: public DLBaseItem | ^ include/microtubule.hpp:14:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 14 | System* const system; | ^ include/microtubule.hpp:31:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 31 | ~Microtubule(); | ^ | override include/mt_tip.hpp:7:7: warning: class 'MTTip' 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] 7 | class MTTip | ^ include/parameters.hpp:105:3: warning: redundant access specifier has the same accessibility as the previous access specifier [readability-redundant-access-specifiers] 105 | public: | ^~~~~~~ include/parameters.hpp:42:3: note: previously declared here 42 | public: | ^ include/parameters.hpp:119:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 119 | double rdirector[3]; | ^~~~~~~~~~~~~~~~~~~ include/parameters.hpp:139:5: warning: constructor does not initialize these fields: local_order [cppcoreguidelines-pro-type-member-init] 136 | double local_order; | | {} 137 | Eigen::Vector3d sv; 138 | 139 | OrderParametersRaw(void) | ^ include/parameters.hpp:139:24: warning: redundant void argument list in function definition [modernize-redundant-void-arg] 139 | OrderParametersRaw(void) | ^~~~ include/parameters.hpp:141:9: warning: 'local_l' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | : local_l(0.) 140 | { 141 | local_l = 0.; | ^~~~~~~~~~~~~ include/parameters.hpp:142:9: warning: 'local_l_opt' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , local_l_opt(0.) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; | ^~~~~~~~~~~~~~~~~ include/parameters.hpp:143:9: warning: 'qxx' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxx(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; | ^~~~~~~~ include/parameters.hpp:144:9: warning: 'qxy' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxy(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; | ^~~~~~~~ include/parameters.hpp:145:9: warning: 'qxz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; | ^~~~~~~~ include/parameters.hpp:146:9: warning: 'qyy' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qyy(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; | ^~~~~~~~ include/parameters.hpp:147:9: warning: 'qyz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qyz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; 147 | qyz = 0; | ^~~~~~~~ include/parameters.hpp:148:9: warning: 'qzz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qzz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; 147 | qyz = 0; 148 | qzz = 0; | ^~~~~~~~ include/parameters.hpp:152:9: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 152 | return; | ^~~~~~~ 153 | } include/parameters.hpp:155:22: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 155 | double extract_r(double director[3], std::string geometry) | ^~~~~~~~~~~~~~~~~~ include/parameters.hpp:155:54: warning: the parameter 'geometry' of type 'std::string' (aka 'basic_string') is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 155 | double extract_r(double director[3], std::string geometry) | ^ | const & include/parameters.hpp:178:40: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 178 | director[i] = evec_mat(i, max_pos); | ^ include/parameters.hpp:195:40: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 195 | director[i] = evec_mat(i, min_pos); | ^ include/parameters.hpp:199:16: warning: redundant parentheses around expression [readability-redundant-parentheses] 199 | return (sel_eigen_val); | ^ ~ include/region.hpp:9:7: warning: class 'Region' 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] 9 | class Region | ^ include/region.hpp:20:21: warning: member 'geometry' of type 'Geometry *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | Geometry* const geometry; | ^ include/region.hpp:24:12: warning: use default member initializer for 'total_length' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 24 | double total_length; | ^ | {0} include/region.hpp:26:9: warning: use default member initializer for 'previous_update_tag' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 26 | int previous_update_tag; | ^ | {0} include/region.hpp:27:9: warning: use default member initializer for 'region_id' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 27 | int region_id; | ^ | {0} include/region.hpp:28:12: warning: use default member initializer for 'z_offset' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 28 | double z_offset; | ^ | {0.0} include/region.hpp:29:12: warning: use default member initializer for 'rot_angle' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 29 | double rot_angle; | ^ | {0.0} include/region.hpp:30:12: warning: use default member initializer for 'peri_meter' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 30 | double peri_meter; | ^ | {0.0} include/region.hpp:55:5: warning: constructor does not initialize these fields: face_tag, poly_intersect_mark [cppcoreguidelines-pro-type-member-init] 38 | Region(Geometry* g, double a): | ^ include/region.hpp:68:22: warning: use emplace_back instead of push_back [modernize-use-emplace] 68 | vertices.push_back(Eigen::Vector2d(0, 0)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~ | emplace_back( include/region.hpp:69:18: warning: use emplace_back instead of push_back [modernize-use-emplace] 69 | side.push_back(Edge()); | ^~~~~~~~~~~~~~~~ | emplace_back( include/region.hpp:73:25: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 73 | virtual ~Region() { return; }; | ^~~~~~~ include/region.hpp:78:51: warning: parameter 2 is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls] 78 | virtual void translate_vector(SurfaceVector&, const double) = 0; | ^~~~~ include/region.hpp:106:27: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 106 | virtual SurfaceVector random_surface_vector() = 0; | ~~~~~~~ ^ | override include/region.hpp:106:27: warning: visibility of function 'random_surface_vector' is changed from protected in class 'Region' to public [misc-override-with-different-visibility] include/region.hpp:90:27: note: function declared here as protected 90 | virtual SurfaceVector random_surface_vector() = 0; | ^ include/region.hpp:107:18: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 107 | virtual void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&) = 0; | ~~~~~~~ ^ | override include/region.hpp:107:59: warning: all parameters should be named in a function [readability-named-parameter] 107 | virtual void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&) = 0; | ^ | /*unused*/ /*unused*/ /*unused*/ /*unused*/ include/region.hpp:108:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 108 | void make_intersection_list(Trajectory*); | ^ | override include/region.hpp:108:10: warning: visibility of function 'make_intersection_list' is changed from protected in class 'Region' to public [misc-override-with-different-visibility] include/region.hpp:89:18: note: function declared here as protected 89 | virtual void make_intersection_list(Trajectory*) = 0; | ^ include/region.hpp:108:44: warning: all parameters should be named in a function [readability-named-parameter] 108 | void make_intersection_list(Trajectory*); | ^ | /*unused*/ include/region.hpp:109:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 109 | void translate_vector(SurfaceVector&, const double); | ^ | override include/region.hpp:109:41: warning: all parameters should be named in a function [readability-named-parameter] 109 | void translate_vector(SurfaceVector&, const double); | ^ | /*unused*/ /*unused*/ include/region.hpp:109:43: warning: parameter 2 is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls] 109 | void translate_vector(SurfaceVector&, const double); | ^~~~~ include/region.hpp:110:12: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 110 | double intersection_angle(Trajectory*, Trajectory*); | ^ | override include/region.hpp:110:42: warning: all parameters should be named in a function [readability-named-parameter] 110 | double intersection_angle(Trajectory*, Trajectory*); | ^ | /*unused*/ /*unused*/ include/region.hpp:116:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 116 | void output_snapshot(std::ostream&); | ^ | override include/region.hpp:116:39: warning: all parameters should be named in a function [readability-named-parameter] 116 | void output_snapshot(std::ostream&); | ^ | /*unused*/ include/region.hpp:119:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 119 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | override include/region.hpp:119:45: warning: all parameters should be named in a function [readability-named-parameter] 119 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | /*unused*/ /*unused*/ /*unused*/ include/region.hpp:128:19: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 128 | SurfaceVector random_surface_vector(); | ^ | override include/region.hpp:129:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 129 | void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&); | ^ | override include/region.hpp:129:51: warning: all parameters should be named in a function [readability-named-parameter] 129 | void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&); | ^ | /*unused*/ /*unused*/ /*unused*/ /*unused*/ include/segment.hpp:7:7: warning: class 'Segment' 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] 7 | class Segment: public DLBaseItem | ^ include/segment.hpp:12:23: warning: member 'trajectory' of type 'Trajectory *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 12 | Trajectory* const trajectory; | ^ include/segment.hpp:27:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 27 | ~Segment(); | ^ | override include/segment.hpp:29:12: warning: method 'length' can be made const [readability-make-member-function-const] 29 | double length() { return std::abs(end - start); } | ^ | const include/surface.hpp:16:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | : x(x1) 15 | { 16 | x = x1; | ^~~~~~~ include/surface.hpp:17:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | , y(y1) 15 | { 16 | x = x1; 17 | y = y1; | ^~~~~~~ include/surface.hpp:18:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | , z(z1) 15 | { 16 | x = x1; 17 | y = y1; 18 | z = z1; | ^~~~~~~ include/surface.hpp:32:9: warning: 'cos_theta' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 30 | BendingOperator() | | : cos_theta(0.0) 31 | { 32 | cos_theta = 0.0; | ^~~~~~~~~~~~~~~~ include/surface.hpp:33:9: warning: 'sin_theta' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 30 | BendingOperator() | | , sin_theta(0.0) 31 | { 32 | cos_theta = 0.0; 33 | sin_theta = 0.0; | ^~~~~~~~~~~~~~~~ include/surface.hpp:49:5: warning: constructor does not initialize these fields: region [cppcoreguidelines-pro-type-member-init] 47 | Region* region; | | {} 48 | 49 | SurfaceVector() | ^ include/surface.hpp:51:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | : x(0.0) 50 | { 51 | x = 0.0; | ^~~~~~~~ include/surface.hpp:52:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , y(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; | ^~~~~~~~ include/surface.hpp:53:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , z(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; | ^~~~~~~~ include/surface.hpp:55:9: warning: 'angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , angle(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; 54 | 55 | angle = 0.0; | ^~~~~~~~~~~~ include/surface.hpp:56:9: warning: 'tv_pos' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , tv_pos(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; 54 | 55 | angle = 0.0; 56 | tv_pos = 0.0; | ^~~~~~~~~~~~~ include/surface.hpp:73:9: warning: 'mid_point' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | : mid_point(0) 72 | { 73 | mid_point = 0; | ^~~~~~~~~~~~~~ include/surface.hpp:74:9: warning: 'length' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | , length(0.0) 72 | { 73 | mid_point = 0; 74 | length = 0.0; | ^~~~~~~~~~~~~ include/surface.hpp:75:9: warning: 'edge_3d_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | , edge_3d_angle(0.0) 72 | { 73 | mid_point = 0; 74 | length = 0.0; 75 | edge_3d_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~ include/system.hpp:14:7: warning: class 'System' 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] 14 | class System | ^ include/system.hpp:70:12: warning: method 'identity' can be made static [readability-convert-member-functions-to-static] 70 | double identity(double i) { return i; } | ^ | static include/system.hpp:115:21: warning: redundant void argument list in function declaration [modernize-redundant-void-arg] 115 | void next_event(void); | ^~~~ include/system.hpp:138:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 138 | double binomial_table[MAXBINOM][MAXBINOM]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/system.hpp:139:30: warning: redundant void argument list in function declaration [modernize-redundant-void-arg] 139 | void make_binomial_table(void); | ^~~~ include/trajectory.hpp:16:5: warning: constructor does not initialize these fields: cdir [cppcoreguidelines-pro-type-member-init] 16 | TrajectoryVector(double p, Direction d, Trajectory* t): | ^ include/trajectory.hpp:23:5: warning: constructor does not initialize these fields: pos, dir, cdir, trajectory [cppcoreguidelines-pro-type-member-init] 12 | double pos; | | {} 13 | Direction dir, cdir; 14 | Trajectory* trajectory; | | {} 15 | 16 | TrajectoryVector(double p, Direction d, Trajectory* t): 17 | pos(p), 18 | dir(d), 19 | trajectory(t) 20 | { 21 | } 22 | 23 | TrajectoryVector() {} | ^ include/trajectory.hpp:23:5: warning: use '= default' to define a trivial default constructor [modernize-use-equals-default] 23 | TrajectoryVector() {} | ^ ~~ | = default; include/trajectory.hpp:25:22: warning: method 'flipped' can be made const [readability-make-member-function-const] 25 | TrajectoryVector flipped() | ^ | const include/trajectory.hpp:27:16: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] 27 | return TrajectoryVector(pos, dir == Direction::FORWARD ? Direction::BACKWARD : Direction::FORWARD, trajectory); | ^~~~~~~~~~~~~~~~~ ~ | { } include/trajectory.hpp:31:7: warning: class 'Trajectory' 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] 31 | class Trajectory: public DLBaseItem | ^ include/trajectory.hpp:40:25: warning: member 'base' of type 'const SurfaceVector' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 40 | const SurfaceVector base; | ^ include/trajectory.hpp:41:18: warning: member 'length' of type 'const double' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 41 | const double length; | ^ include/trajectory.hpp:54:12: warning: use default member initializer for 'prev_tr_cos_angle' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 54 | double prev_tr_cos_angle; | ^ | {1.0} include/trajectory.hpp:57:12: warning: use default member initializer for 'next_tr_cos_angle' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 57 | double next_tr_cos_angle; | ^ | {1.0} include/trajectory.hpp:81:38: warning: all parameters should be named in a function [readability-named-parameter] 81 | explicit Trajectory(SurfaceVector, std::vector, double); | ^ | /*base_vec*/ /*end_p*/ /*l*/ include/trajectory.hpp:82:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 82 | ~Trajectory(); | ^ | override include/trajectory.hpp:88:47: warning: all parameters should be named in a function [readability-named-parameter] 88 | TrajectoryVector next_trajectory(Direction); | ^ | /*dir*/ include/trajectory.hpp:97:42: warning: all parameters should be named in a function [readability-named-parameter] 97 | TrjSegmentTag insert_segment(Segment*); | ^ | /*s*/ include/trajectory.hpp:100:38: warning: all parameters should be named in a function [readability-named-parameter] 100 | void remove_segment(TrjSegmentTag); | ^ | /*s*/ include/trajectory.hpp:106:50: warning: all parameters should be named in a function [readability-named-parameter] 106 | TrjMTTipTag register_for_notifications(MTTip*); | ^ | /*p_tip*/ include/trajectory.hpp:109:50: warning: all parameters should be named in a function [readability-named-parameter] 109 | void unregister_for_notifications(TrjMTTipTag); | ^ | /*tag*/ include/trajectory.hpp:112:50: warning: all parameters should be named in a function [readability-named-parameter] 112 | void invalidate_intersection(IntersectionItr&); | ^ | /*old_is*/ include/trajectory.hpp:115:43: warning: all parameters should be named in a function [readability-named-parameter] 115 | void new_intersection(IntersectionItr&); | ^ | /*new_is*/ include/trajectory.hpp:131:5: warning: use '= delete' to prohibit calling of a special member function [modernize-use-equals-delete] 131 | Trajectory(const Trajectory&); | ^ | = delete include/trajectory.hpp:132:17: warning: use '= delete' to prohibit calling of a special member function [modernize-use-equals-delete] 132 | Trajectory& operator=(const Trajectory&); | ^ | = delete include/types.hpp:40:9: warning: macro 'PROGRAM_VERSION' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] 40 | #define PROGRAM_VERSION "BC.2018" | ^ include/types.hpp:88:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 88 | extern std::string direction_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:132:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 132 | extern std::string nucleation_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:141:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 141 | extern std::string interaction_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:153:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 153 | extern std::string bundle_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:7:1: warning: constructor does not initialize these fields: prev_trp_cat, next_trp_cat [cppcoreguidelines-pro-type-member-init] 7 | Trajectory::Trajectory(SurfaceVector base_vec, std::vector end_p, double l): | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:7:24: warning: no header providing "SurfaceVector" is directly included [misc-include-cleaner] 5 | #include "system.hpp" 6 | 7 | Trajectory::Trajectory(SurfaceVector base_vec, std::vector end_p, double l): | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:7:53: warning: no header providing "std::vector" is directly included [misc-include-cleaner] 6 | 7 | Trajectory::Trajectory(SurfaceVector base_vec, std::vector end_p, double l): | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:7:60: warning: no header providing "PointAtEdge" is directly included [misc-include-cleaner] 2 | #include "region.hpp" 3 | #include "microtubule.hpp" 4 | #include "segment.hpp" 5 | #include "system.hpp" 6 | 7 | Trajectory::Trajectory(SurfaceVector base_vec, std::vector end_p, double l): | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:10:16: warning: no header providing "Direction" is directly included [misc-include-cleaner] 6 | 7 | Trajectory::Trajectory(SurfaceVector base_vec, std::vector end_p, double l): 8 | base(base_vec), 9 | length(l), 10 | prev_tr(0, Direction::FORWARD, nullptr), | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:29:31: warning: no header providing "std::pair" is directly included [misc-include-cleaner] 6 | intersections.insert(std::pair(-1.0, Intersection())); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:29:44: warning: no header providing "Intersection" is directly included [misc-include-cleaner] 29 | intersections.insert(std::pair(-1.0, Intersection())); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:31:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 31 | return; | ^~~~~~~ 32 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:38:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 38 | return; | ^~~~~~~ 39 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:41:18: warning: function 'integrity_check' has cognitive complexity of 47 (threshold 25) [readability-function-cognitive-complexity] 41 | bool Trajectory::integrity_check() | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:45:5: note: +1, including nesting penalty of 0, nesting level increased to 1 45 | if (prev_tr.trajectory != nullptr) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:47:9: note: +2, including nesting penalty of 1, nesting level increased to 2 47 | if (prev_tr.dir == Direction::BACKWARD) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:49:13: note: +3, including nesting penalty of 2, nesting level increased to 3 49 | if (prev_tr.trajectory->next_tr.trajectory != this) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:55:9: note: +1, nesting level increased to 2 55 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:57:13: note: +3, including nesting penalty of 2, nesting level increased to 3 57 | if (prev_tr.trajectory->prev_tr.trajectory != this) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:64:5: note: +1, including nesting penalty of 0, nesting level increased to 1 64 | if (next_tr.trajectory != nullptr) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:66:9: note: +2, including nesting penalty of 1, nesting level increased to 2 66 | if (next_tr.dir == Direction::FORWARD) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:68:13: note: +3, including nesting penalty of 2, nesting level increased to 3 68 | if (next_tr.trajectory->prev_tr.trajectory != this) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:74:9: note: +1, nesting level increased to 2 74 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:76:13: note: +3, including nesting penalty of 2, nesting level increased to 3 76 | if (next_tr.trajectory->next_tr.trajectory != this) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:86:5: note: +1, including nesting penalty of 0, nesting level increased to 1 86 | for (size_t is_count = 1; is_count < intersections.size(); is_count++) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:89:9: note: +2, including nesting penalty of 1, nesting level increased to 2 89 | if (is->second.mirror->second.mirror != is) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:98:5: note: +1, including nesting penalty of 0, nesting level increased to 1 98 | while (seg_itr != segments.end()) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:101:9: note: +2, including nesting penalty of 1, nesting level increased to 2 101 | if ((**seg_itr).dir == Direction::FORWARD) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:103:13: note: +3, including nesting penalty of 2, nesting level increased to 3 103 | while (++is != (**seg_itr).end_itr) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:108:9: note: +1, nesting level increased to 2 108 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:110:13: note: +3, including nesting penalty of 2, nesting level increased to 3 110 | while (--is != (**seg_itr).end_itr) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:119:5: note: +1, including nesting penalty of 0, nesting level increased to 1 119 | while (++is != intersections.end()) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:121:9: note: +2, including nesting penalty of 1, nesting level increased to 2 121 | if (is->second.occupancy != 0) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:129:5: note: +1, including nesting penalty of 0, nesting level increased to 1 129 | while (seg_itr != segments.end()) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:132:9: note: +2, including nesting penalty of 1, nesting level increased to 2 132 | if ((**seg_itr).dir == Direction::FORWARD) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:134:13: note: +3, including nesting penalty of 2, nesting level increased to 3 134 | while (++is != (**seg_itr).end_itr) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:139:9: note: +1, nesting level increased to 2 139 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:141:13: note: +3, including nesting penalty of 2, nesting level increased to 3 141 | while (--is != (**seg_itr).end_itr) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:149:5: note: +1, including nesting penalty of 0, nesting level increased to 1 149 | if (!valid) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:52:22: warning: no header providing "std::cout" is directly included [misc-include-cleaner] 6 | std::cout << "Integrity: trajectory dependency chain broken.\n"; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:84:5: warning: no header providing "IntersectionItr" is directly included [misc-include-cleaner] 84 | IntersectionItr is(wall_begin()); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:84:5: warning: use auto when declaring iterators [modernize-use-auto] 84 | IntersectionItr is(wall_begin()); | ^~~~~~~~~~~~~~~ | auto /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:86:10: warning: no header providing "size_t" is directly included [misc-include-cleaner] 6 | for (size_t is_count = 1; is_count < intersections.size(); is_count++) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:96:5: warning: use auto when declaring iterators [modernize-use-auto] 96 | std::list::iterator seg_itr(segments.begin()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | auto /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:96:10: warning: no header providing "std::list" is directly included [misc-include-cleaner] 6 | std::list::iterator seg_itr(segments.begin()); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:123:18: warning: no header providing "std::cerr" is directly included [misc-include-cleaner] 123 | std::cerr << "Detected occupancy " << is->second.occupancy << " (should be zero).\n"; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:160:5: warning: use auto when declaring iterators [modernize-use-auto] 160 | std::list::iterator seg(segments.begin()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | auto /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:173:5: warning: use auto when declaring iterators [modernize-use-auto] 173 | std::list::iterator seg(segments.begin()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | auto /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:180:37: warning: no header providing "std::min" is directly included [misc-include-cleaner] 6 | start_points.push_back(std::min((**seg).start, (**seg).end)); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:181:35: warning: no header providing "std::max" is directly included [misc-include-cleaner] 181 | end_points.push_back(std::max((**seg).start, (**seg).end)); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:186:28: warning: no header providing "VERY_LARGE" is directly included [misc-include-cleaner] 2 | start_points.push_back(VERY_LARGE); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:196:5: warning: use auto when declaring iterators [modernize-use-auto] 196 | std::list::iterator stepup(start_points.begin()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | auto /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:197:5: warning: use auto when declaring iterators [modernize-use-auto] 197 | std::list::iterator stepdown(end_points.begin()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | auto /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:231:5: warning: use auto when declaring iterators [modernize-use-auto] 231 | std::list::iterator tip(notification_list.begin()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | auto /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:231:15: warning: no header providing "MTTip" is directly included [misc-include-cleaner] 2 | std::list::iterator tip(notification_list.begin()); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:240:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 240 | return; | ^~~~~~~ 241 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:249:5: warning: use auto when declaring iterators [modernize-use-auto] 249 | std::list::iterator seg(segments.begin()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | auto /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:270:5: warning: use auto when declaring iterators [modernize-use-auto] 270 | std::list::iterator tip(notification_list.begin()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | auto /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:277:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 277 | return; | ^~~~~~~ 278 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:284:23: warning: no header providing "ZERO_CUTOFF" is directly included [misc-include-cleaner] 284 | if (pos1 - pos2 > ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:289:5: warning: do not use 'else' after 'return' [readability-else-after-return] 289 | else if (pos1 - pos2 < -ZERO_CUTOFF) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 290 | { | ~ 291 | return -1; | ~~~~~~~~~~ 292 | } | ~ 293 | 294 | else | ~~~~ 295 | { | ~ 296 | if (itr1 == itr2) | ~~~~~~~~~~~~~~~~~ 297 | { | ~ 298 | return 0; | ~~~~~~~~~ 299 | } | ~ 300 | if (itr1 == wall_end()) | ~~~~~~~~~~~~~~~~~~~~~~~ 301 | { | ~ 302 | return 1; | ~~~~~~~~~ 303 | } | ~ 304 | /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:305:9: warning: avoid do-while loops [cppcoreguidelines-avoid-do-while] 305 | do | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:314:9: warning: do not use 'else' after 'return' [readability-else-after-return] note: this fix will not be applied because it overlaps with another fix 314 | else | ^~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:321:1: warning: no header providing "TrjSegmentTag" is directly included [misc-include-cleaner] 321 | TrjSegmentTag Trajectory::insert_segment(Segment* s) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:349:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 349 | return; | ^~~~~~~ 350 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:352:1: warning: no header providing "TrjMTTipTag" is directly included [misc-include-cleaner] 352 | TrjMTTipTag Trajectory::register_for_notifications(MTTip* p_tip) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:365:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 365 | return; | ^~~~~~~ 366 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:407:30: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] 407 | if (segments.empty() && (notification_list.size() == 0)) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | notification_list.empty() /../lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/stl_list.h:1578:7: note: method 'list'::empty() defined here 1578 | empty() const _GLIBCXX_NOEXCEPT | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/trajectory.cpp:412:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 412 | return; | ^~~~~~~ 413 | } 35320 warnings generated. Suppressed 35052 warnings (35052 in non-user code). Use -header-filter=.* or leave it as default to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. [ 6/13][24.3s] clang-tidy-22 -p=/home/runner/work/corticalsim/corticalsim/build/debug --config-file=/home/runner/work/corticalsim/corticalsim/.clang-tidy /home/runner/work/corticalsim/corticalsim/src/microtubule.cpp include/CompactList_impl.hpp:12:7: warning: class 'CompactList' 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] 12 | class CompactList | ^ include/CompactList_impl.hpp:26:19: warning: all parameters should be named in a function [readability-named-parameter] 26 | void remove(T*); | ^ | /*element*/ include/CompactList_impl.hpp:49:16: warning: all parameters should be named in a function [readability-named-parameter] 49 | T* create(Q); | ^ | /*par1*/ include/CompactList_impl.hpp:51:16: warning: all parameters should be named in a function [readability-named-parameter] 51 | T* create(Q, R); | ^ | /*par1*/ /*par2*/ include/CompactList_impl.hpp:53:16: warning: all parameters should be named in a function [readability-named-parameter] 53 | T* create(Q, R, S); | ^ | /*par1*/ /*par2*/ /*par3*/ include/CompactList_impl.hpp:80:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 80 | return; | ^~~~~~~ 81 | } include/CompactList_impl.hpp:86:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 86 | T* new_element = new (MemPool::malloc()) T(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:94:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 94 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:102:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 102 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:110:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 110 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:145:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 145 | return; | ^~~~~~~ 146 | } include/CompactList_impl.hpp:149:7: warning: class 'CompactListItem' 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] 149 | class CompactListItem | ^ include/CompactList_impl.hpp:149:7: warning: destructor of 'CompactListItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] include/CompactList_impl.hpp:149:7: note: make it protected and non-virtual 149 | class CompactListItem | ^ 150 | { 151 | public: 152 | 153 | CompactListItem(): 154 | index(0) {}; 155 | int index; 156 | 157 | protected: 158 | 159 | virtual ~CompactListItem() {}; | ~~~~~~~ include/CompactList_impl.hpp:153:5: warning: public constructor allows the CRTP to be constructed as a regular template class; consider making it private and declaring the derived class as friend [bugprone-crtp-constructor-accessibility] 153 | CompactListItem(): | ^ 154 | index(0) {}; | 155 | int index; 156 | 157 | protected: 158 | 159 | virtual ~CompactListItem() {}; 160 | template 161 | friend class CompactList; 162 | }; include/CompactList_impl.hpp:155:9: warning: use default member initializer for 'index' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 154 | index(0) {}; | ~~~~~~~~ 155 | int index; | ^ | {0} include/CompactList_impl.hpp:159:13: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] 159 | virtual ~CompactListItem() {}; | ^ ~~ | = default include/DLList_impl.hpp:32:7: warning: class 'DLList' 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] 32 | class DLList | ^ include/DLList_impl.hpp:36:9: warning: use default member initializer for 'num_elements' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 36 | int num_elements; | ^ | { 0 } include/DLList_impl.hpp:42:8: warning: use default member initializer for 'first_element' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 42 | T* first_element; | ^ | { nullptr } 43 | T* last_element; 44 | 45 | using MemPool = crts::SingletonPool; 46 | 47 | void unlink_element(T*); 48 | T* link_element(T*); 49 | 50 | public: 51 | 52 | DLList(): 53 | num_elements{ 0 }, 54 | first_element{ nullptr }, | ~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:43:8: warning: use default member initializer for 'last_element' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 43 | T* last_element; | ^ | { nullptr } 44 | 45 | using MemPool = crts::SingletonPool; 46 | 47 | void unlink_element(T*); 48 | T* link_element(T*); 49 | 50 | public: 51 | 52 | DLList(): 53 | num_elements{ 0 }, 54 | first_element{ nullptr }, 55 | last_element{ nullptr } {}; | ~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:47:27: warning: all parameters should be named in a function [readability-named-parameter] 47 | void unlink_element(T*); | ^ | /*element*/ include/DLList_impl.hpp:48:23: warning: all parameters should be named in a function [readability-named-parameter] 48 | T* link_element(T*); | ^ | /*new_element*/ include/DLList_impl.hpp:70:16: warning: all parameters should be named in a function [readability-named-parameter] 70 | T* create(Q); | ^ | /*par1*/ include/DLList_impl.hpp:72:16: warning: all parameters should be named in a function [readability-named-parameter] 72 | T* create(Q, R); | ^ | /*par1*/ /*par2*/ include/DLList_impl.hpp:74:16: warning: all parameters should be named in a function [readability-named-parameter] 74 | T* create(Q, R, S); | ^ | /*par1*/ /*par2*/ /*par3*/ include/DLList_impl.hpp:75:19: warning: all parameters should be named in a function [readability-named-parameter] 75 | void remove(T*); | ^ | /*element*/ include/DLList_impl.hpp:77:49: warning: all parameters should be named in a function [readability-named-parameter] 77 | void import(DLList&, T*); | ^ | /*old_list*/ /*element*/ include/DLList_impl.hpp:78:53: warning: all parameters should be named in a function [readability-named-parameter] 78 | void import_set(DLList&, T*, T*); | ^ | /*old_list*/ /*first_element*/ /*last_element*/ include/DLList_impl.hpp:137:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 137 | return; | ^~~~~~~ 138 | } include/DLList_impl.hpp:154:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 154 | T* new_element = new (MemPool::malloc()) T(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:162:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 162 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:170:5: warning: initializing non-owner 'Segment *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 170 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:170:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 170 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:178:5: warning: initializing non-owner 'Microtubule *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 178 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:178:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 178 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:196:8: warning: variable 'temp' is not initialized [cppcoreguidelines-init-variables] 196 | T* temp; | ^ | = nullptr include/DLList_impl.hpp:211:7: warning: class 'DLBaseItem' 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] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: warning: constructor does not initialize these fields: next_element, previous_element [cppcoreguidelines-pro-type-member-init] 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; | | {} 221 | T* previous_element; | | {} include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: the implicit default constructor of the CRTP is publicly accessible; consider making it private and declaring the derived class as friend [bugprone-crtp-constructor-accessibility] 211 | class DLBaseItem | ^ 212 | { | include/DLList_impl.hpp:226:13: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] 226 | virtual ~DLBaseItem() {}; | ^ ~~ | = default include/det_queue.hpp:14:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 14 | System* const system; // pointer to containing system | ^ include/det_queue.hpp:14:19: warning: member variable 'system' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes] include/det_queue.hpp:17:12: warning: method 'current_pos' can be made const [readability-make-member-function-const] 17 | double current_pos() | ^ | const include/det_queue.hpp:25:63: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 25 | double progression(int cache_pos) { return current_base - value_cache[cache_pos]; } | ^ include/det_queue.hpp:48:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 48 | double value_cache[POSITION_CACHE_SIZE]; // cache of previous 'distance' values | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/det_queue.hpp:49:29: warning: member 'distance_time_conversion_function' of type 'double (System::*const)(double)' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 49 | double (System::* const distance_time_conversion_function)(double); | ^ include/det_queue.hpp:51:29: warning: member 'time_distance_conversion_function' of type 'double (System::*const)(double)' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 51 | double (System::* const time_distance_conversion_function)(double); | ^ include/edge.hpp:31:9: warning: 'exclude_point' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | : exclude_point(0) 30 | { 31 | exclude_point = 0; | ^~~~~~~~~~~~~~~~~~ include/edge.hpp:33:9: warning: 'p_cat' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , p_cat(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; | ^~~~~~~~~~~~ include/edge.hpp:34:9: warning: 'edg_ang_norm' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , edg_ang_norm(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; | ^~~~~~~~~~~~~~~~~~~ include/edge.hpp:35:9: warning: 'xy_rotation_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , xy_rotation_angle(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; 35 | xy_rotation_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~~~~~ include/edge.hpp:36:9: warning: 'edg_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , edg_angle(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; 35 | xy_rotation_angle = 0.0; 36 | edg_angle = 0.0; | ^~~~~~~~~~~~~~~~ include/edge.hpp:37:9: warning: 'edg_bend_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , edg_bend_angle(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; 35 | xy_rotation_angle = 0.0; 36 | edg_angle = 0.0; 37 | edg_bend_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~~ include/event.hpp:7:7: warning: class 'EventDescriptor' 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] 7 | class EventDescriptor | ^ include/event.hpp:20:24: warning: member 'mt' of type 'Microtubule *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | Microtubule* const mt; | ^ include/geometry.hpp:10:7: warning: class 'Geometry' 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] 10 | class Geometry | ^ include/geometry.hpp:20:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | System* const system; | ^ include/geometry.hpp:28:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 28 | double patch_area[3]; | ^~~~~~~~~~~~~~~~~~~~ include/geometry.hpp:29:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 29 | std::vector regions_index[3]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/geometry.hpp:35:5: warning: constructor does not initialize these fields: areain_mesh, area_ppb, patch_area, element_max [cppcoreguidelines-pro-type-member-init] 19 | double area_ppb; | | {} 20 | std::vector ppb; 21 | 22 | double patch_area[3]; | | {} 23 | std::vector regions_index[3]; 24 | 25 | int element_max; | | {} 26 | Eigen::Vector3d object_cm, object_pa, nucleous_position; 27 | std::vector regions; 28 | 29 | Geometry(System* s, double a): | ^ include/geometry.hpp:39:9: warning: use range-based for loop instead [modernize-loop-convert] 39 | for (int i = 0; i < 3; i++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~ | (double & i : patch_area) 40 | { 41 | patch_area[i] = 0.0; | ~~~~~~~~~~~~~ | i include/geometry.hpp:41:13: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 41 | patch_area[i] = 0.0; | ^ include/geometry.hpp:46:27: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 46 | virtual ~Geometry() { return; }; | ^~~~~~~ include/geometry.hpp:77:22: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 77 | TrajectoryVector extend_trajectory(Trajectory*, Direction); | ^ | override include/geometry.hpp:77:22: warning: visibility of function 'extend_trajectory' is changed from private in class 'Geometry' to public [misc-override-with-different-visibility] include/geometry.hpp:69:30: note: function declared here as private 69 | virtual TrajectoryVector extend_trajectory(Trajectory*, Direction) = 0; | ^ include/geometry.hpp:77:51: warning: all parameters should be named in a function [readability-named-parameter] 77 | TrajectoryVector extend_trajectory(Trajectory*, Direction); | ^ | /*unused*/ /*unused*/ include/geometry.hpp:78:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 78 | void get_order_parameters(OrderParameters&); | ^ | override include/geometry.hpp:78:47: warning: all parameters should be named in a function [readability-named-parameter] 78 | void get_order_parameters(OrderParameters&); | ^ | /*unused*/ include/geometry.hpp:79:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 79 | void output_snapshot(std::ostream&); | ^ | override include/geometry.hpp:79:39: warning: all parameters should be named in a function [readability-named-parameter] 79 | void output_snapshot(std::ostream&); | ^ | /*unused*/ include/geometry.hpp:80:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 80 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | override include/geometry.hpp:80:45: warning: all parameters should be named in a function [readability-named-parameter] 80 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | /*unused*/ /*unused*/ /*unused*/ include/intersection.hpp:33:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | : x(x1) 32 | { 33 | x = x1; | ^~~~~~~ include/intersection.hpp:34:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , y(y1) 32 | { 33 | x = x1; 34 | y = y1; | ^~~~~~~ include/intersection.hpp:35:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , z(z1) 32 | { 33 | x = x1; 34 | y = y1; 35 | z = z1; | ^~~~~~~ include/intersection.hpp:36:9: warning: 'next_element' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , next_element(n1) 32 | { 33 | x = x1; 34 | y = y1; 35 | z = z1; 36 | next_element = n1; | ^~~~~~~~~~~~~~~~~~ include/measurement.hpp:34:41: warning: parameter 2 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 | std::ostream& operator<<(std::ostream&, const Measurement); | ^~~~~ include/microtubule.hpp:10:7: warning: class 'Microtubule' 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] 10 | class Microtubule: public DLBaseItem | ^ include/microtubule.hpp:14:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 14 | System* const system; | ^ include/microtubule.hpp:22:12: warning: use default member initializer for 'type' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 22 | MTType type; | ^ | {MTType::GROWING} include/microtubule.hpp:30:24: warning: all parameters should be named in a function [readability-named-parameter] 30 | Microtubule(System*, TrajectoryVector, bool = true); | ^ | /*s*/ /*tv*/ /*initialize*/ include/microtubule.hpp:31:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 31 | ~Microtubule(); | ^ | override include/microtubule.hpp:38:45: warning: all parameters should be named in a function [readability-named-parameter] 38 | void handle_event(const EventDescriptor*); | ^ | /*ei*/ include/microtubule.hpp:50:26: warning: all parameters should be named in a function [readability-named-parameter] 50 | void backtrack(MTTip*); | ^ | /*tip*/ include/microtubule.hpp:51:31: warning: all parameters should be named in a function [readability-named-parameter] 51 | void end_of_segment(MTTip*); | ^ | /*tip*/ include/microtubule.hpp:52:24: warning: all parameters should be named in a function [readability-named-parameter] 52 | void sever(Segment*, double); | ^ | /*cut_seg*/ /*cut_pos*/ include/microtubule.hpp:63:5: warning: use '= delete' to prohibit calling of a special member function [modernize-use-equals-delete] 63 | Microtubule(const Microtubule&); | ^ | = delete include/microtubule.hpp:64:18: warning: use '= delete' to prohibit calling of a special member function [modernize-use-equals-delete] 64 | Microtubule& operator=(const Microtubule&); | ^ | = delete include/mt_tip.hpp:7:7: warning: class 'MTTip' 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] 7 | class MTTip | ^ include/parameters.hpp:105:3: warning: redundant access specifier has the same accessibility as the previous access specifier [readability-redundant-access-specifiers] 105 | public: | ^~~~~~~ include/parameters.hpp:42:3: note: previously declared here 42 | public: | ^ include/parameters.hpp:119:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 119 | double rdirector[3]; | ^~~~~~~~~~~~~~~~~~~ include/parameters.hpp:139:5: warning: constructor does not initialize these fields: local_order [cppcoreguidelines-pro-type-member-init] 136 | double local_order; | | {} 137 | Eigen::Vector3d sv; 138 | 139 | OrderParametersRaw(void) | ^ include/parameters.hpp:139:24: warning: redundant void argument list in function definition [modernize-redundant-void-arg] 139 | OrderParametersRaw(void) | ^~~~ include/parameters.hpp:141:9: warning: 'local_l' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | : local_l(0.) 140 | { 141 | local_l = 0.; | ^~~~~~~~~~~~~ include/parameters.hpp:142:9: warning: 'local_l_opt' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , local_l_opt(0.) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; | ^~~~~~~~~~~~~~~~~ include/parameters.hpp:143:9: warning: 'qxx' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxx(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; | ^~~~~~~~ include/parameters.hpp:144:9: warning: 'qxy' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxy(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; | ^~~~~~~~ include/parameters.hpp:145:9: warning: 'qxz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; | ^~~~~~~~ include/parameters.hpp:146:9: warning: 'qyy' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qyy(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; | ^~~~~~~~ include/parameters.hpp:147:9: warning: 'qyz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qyz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; 147 | qyz = 0; | ^~~~~~~~ include/parameters.hpp:148:9: warning: 'qzz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qzz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; 147 | qyz = 0; 148 | qzz = 0; | ^~~~~~~~ include/parameters.hpp:152:9: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 152 | return; | ^~~~~~~ 153 | } include/parameters.hpp:155:22: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 155 | double extract_r(double director[3], std::string geometry) | ^~~~~~~~~~~~~~~~~~ include/parameters.hpp:155:54: warning: the parameter 'geometry' of type 'std::string' (aka 'basic_string') is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 155 | double extract_r(double director[3], std::string geometry) | ^ | const & include/parameters.hpp:178:40: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 178 | director[i] = evec_mat(i, max_pos); | ^ include/parameters.hpp:195:40: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 195 | director[i] = evec_mat(i, min_pos); | ^ include/parameters.hpp:199:16: warning: redundant parentheses around expression [readability-redundant-parentheses] 199 | return (sel_eigen_val); | ^ ~ include/region.hpp:9:7: warning: class 'Region' 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] 9 | class Region | ^ include/region.hpp:20:21: warning: member 'geometry' of type 'Geometry *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | Geometry* const geometry; | ^ include/region.hpp:24:12: warning: use default member initializer for 'total_length' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 24 | double total_length; | ^ | {0} include/region.hpp:26:9: warning: use default member initializer for 'previous_update_tag' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 26 | int previous_update_tag; | ^ | {0} include/region.hpp:27:9: warning: use default member initializer for 'region_id' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 27 | int region_id; | ^ | {0} include/region.hpp:28:12: warning: use default member initializer for 'z_offset' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 28 | double z_offset; | ^ | {0.0} include/region.hpp:29:12: warning: use default member initializer for 'rot_angle' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 29 | double rot_angle; | ^ | {0.0} include/region.hpp:30:12: warning: use default member initializer for 'peri_meter' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 30 | double peri_meter; | ^ | {0.0} include/region.hpp:55:5: warning: constructor does not initialize these fields: face_tag, poly_intersect_mark [cppcoreguidelines-pro-type-member-init] 38 | Region(Geometry* g, double a): | ^ include/region.hpp:68:22: warning: use emplace_back instead of push_back [modernize-use-emplace] 68 | vertices.push_back(Eigen::Vector2d(0, 0)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~ | emplace_back( include/region.hpp:69:18: warning: use emplace_back instead of push_back [modernize-use-emplace] 69 | side.push_back(Edge()); | ^~~~~~~~~~~~~~~~ | emplace_back( include/region.hpp:73:25: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 73 | virtual ~Region() { return; }; | ^~~~~~~ include/region.hpp:78:51: warning: parameter 2 is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls] 78 | virtual void translate_vector(SurfaceVector&, const double) = 0; | ^~~~~ include/region.hpp:106:27: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 106 | virtual SurfaceVector random_surface_vector() = 0; | ~~~~~~~ ^ | override include/region.hpp:106:27: warning: visibility of function 'random_surface_vector' is changed from protected in class 'Region' to public [misc-override-with-different-visibility] include/region.hpp:90:27: note: function declared here as protected 90 | virtual SurfaceVector random_surface_vector() = 0; | ^ include/region.hpp:107:18: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 107 | virtual void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&) = 0; | ~~~~~~~ ^ | override include/region.hpp:107:59: warning: all parameters should be named in a function [readability-named-parameter] 107 | virtual void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&) = 0; | ^ | /*unused*/ /*unused*/ /*unused*/ /*unused*/ include/region.hpp:108:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 108 | void make_intersection_list(Trajectory*); | ^ | override include/region.hpp:108:10: warning: visibility of function 'make_intersection_list' is changed from protected in class 'Region' to public [misc-override-with-different-visibility] include/region.hpp:89:18: note: function declared here as protected 89 | virtual void make_intersection_list(Trajectory*) = 0; | ^ include/region.hpp:108:44: warning: all parameters should be named in a function [readability-named-parameter] 108 | void make_intersection_list(Trajectory*); | ^ | /*unused*/ include/region.hpp:109:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 109 | void translate_vector(SurfaceVector&, const double); | ^ | override include/region.hpp:109:41: warning: all parameters should be named in a function [readability-named-parameter] 109 | void translate_vector(SurfaceVector&, const double); | ^ | /*unused*/ /*unused*/ include/region.hpp:109:43: warning: parameter 2 is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls] 109 | void translate_vector(SurfaceVector&, const double); | ^~~~~ include/region.hpp:110:12: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 110 | double intersection_angle(Trajectory*, Trajectory*); | ^ | override include/region.hpp:110:42: warning: all parameters should be named in a function [readability-named-parameter] 110 | double intersection_angle(Trajectory*, Trajectory*); | ^ | /*unused*/ /*unused*/ include/region.hpp:116:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 116 | void output_snapshot(std::ostream&); | ^ | override include/region.hpp:116:39: warning: all parameters should be named in a function [readability-named-parameter] 116 | void output_snapshot(std::ostream&); | ^ | /*unused*/ include/region.hpp:119:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 119 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | override include/region.hpp:119:45: warning: all parameters should be named in a function [readability-named-parameter] 119 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | /*unused*/ /*unused*/ /*unused*/ include/region.hpp:128:19: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 128 | SurfaceVector random_surface_vector(); | ^ | override include/region.hpp:129:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 129 | void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&); | ^ | override include/region.hpp:129:51: warning: all parameters should be named in a function [readability-named-parameter] 129 | void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&); | ^ | /*unused*/ /*unused*/ /*unused*/ /*unused*/ include/segment.hpp:7:7: warning: class 'Segment' 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] 7 | class Segment: public DLBaseItem | ^ include/segment.hpp:12:23: warning: member 'trajectory' of type 'Trajectory *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 12 | Trajectory* const trajectory; | ^ include/segment.hpp:27:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 27 | ~Segment(); | ^ | override include/segment.hpp:29:12: warning: method 'length' can be made const [readability-make-member-function-const] 29 | double length() { return std::abs(end - start); } | ^ | const include/surface.hpp:16:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | : x(x1) 15 | { 16 | x = x1; | ^~~~~~~ include/surface.hpp:17:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | , y(y1) 15 | { 16 | x = x1; 17 | y = y1; | ^~~~~~~ include/surface.hpp:18:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | , z(z1) 15 | { 16 | x = x1; 17 | y = y1; 18 | z = z1; | ^~~~~~~ include/surface.hpp:32:9: warning: 'cos_theta' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 30 | BendingOperator() | | : cos_theta(0.0) 31 | { 32 | cos_theta = 0.0; | ^~~~~~~~~~~~~~~~ include/surface.hpp:33:9: warning: 'sin_theta' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 30 | BendingOperator() | | , sin_theta(0.0) 31 | { 32 | cos_theta = 0.0; 33 | sin_theta = 0.0; | ^~~~~~~~~~~~~~~~ include/surface.hpp:49:5: warning: constructor does not initialize these fields: region [cppcoreguidelines-pro-type-member-init] 47 | Region* region; | | {} 48 | 49 | SurfaceVector() | ^ include/surface.hpp:51:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | : x(0.0) 50 | { 51 | x = 0.0; | ^~~~~~~~ include/surface.hpp:52:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , y(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; | ^~~~~~~~ include/surface.hpp:53:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , z(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; | ^~~~~~~~ include/surface.hpp:55:9: warning: 'angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , angle(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; 54 | 55 | angle = 0.0; | ^~~~~~~~~~~~ include/surface.hpp:56:9: warning: 'tv_pos' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , tv_pos(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; 54 | 55 | angle = 0.0; 56 | tv_pos = 0.0; | ^~~~~~~~~~~~~ include/surface.hpp:73:9: warning: 'mid_point' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | : mid_point(0) 72 | { 73 | mid_point = 0; | ^~~~~~~~~~~~~~ include/surface.hpp:74:9: warning: 'length' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | , length(0.0) 72 | { 73 | mid_point = 0; 74 | length = 0.0; | ^~~~~~~~~~~~~ include/surface.hpp:75:9: warning: 'edge_3d_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | , edge_3d_angle(0.0) 72 | { 73 | mid_point = 0; 74 | length = 0.0; 75 | edge_3d_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~ include/system.hpp:14:7: warning: class 'System' 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] 14 | class System | ^ include/system.hpp:70:12: warning: method 'identity' can be made static [readability-convert-member-functions-to-static] 70 | double identity(double i) { return i; } | ^ | static include/system.hpp:115:21: warning: redundant void argument list in function declaration [modernize-redundant-void-arg] 115 | void next_event(void); | ^~~~ include/system.hpp:138:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 138 | double binomial_table[MAXBINOM][MAXBINOM]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/system.hpp:139:30: warning: redundant void argument list in function declaration [modernize-redundant-void-arg] 139 | void make_binomial_table(void); | ^~~~ include/trajectory.hpp:16:5: warning: constructor does not initialize these fields: cdir [cppcoreguidelines-pro-type-member-init] 16 | TrajectoryVector(double p, Direction d, Trajectory* t): | ^ include/trajectory.hpp:19:20: warning: 1 uninitialized field at the end of the constructor call [clang-analyzer-optin.cplusplus.UninitializedObject] 19 | trajectory(t) | ^ include/trajectory.hpp:13:20: note: uninitialized field 'this->cdir' 13 | Direction dir, cdir; | ^~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:150:5: note: Control jumps to 'case COLLISION:' at line 158 150 | switch (ei->type) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:159:13: note: Calling 'Microtubule::collision' 159 | collision(); | ^~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:569:9: note: Assuming field 'occupancy' is not equal to 0 569 | if (plus.next_collision->second.mirror->second.occupancy == 0) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:569:5: note: Taking false branch 569 | if (plus.next_collision->second.mirror->second.occupancy == 0) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:580:13: note: Assuming the condition is false 580 | if (diff_angle > 0.5 * PI) | ^~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:580:9: note: Taking false branch 580 | if (diff_angle > 0.5 * PI) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:595:5: note: Control jumps to 'case ZIPPER:' at line 598 595 | switch (type) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:600:13: note: Calling 'Microtubule::zipper' 600 | zipper(dir); | ^~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:637:22: note: Calling constructor for 'TrajectoryVector' 637 | TrajectoryVector tv(plus.next_collision->second.mirror->first, dir, plus.next_collision->second.other_trajectory); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/trajectory.hpp:19:20: note: 1 uninitialized field at the end of the constructor call 19 | trajectory(t) | ^ include/trajectory.hpp:23:5: warning: constructor does not initialize these fields: pos, dir, cdir, trajectory [cppcoreguidelines-pro-type-member-init] 12 | double pos; | | {} 13 | Direction dir, cdir; 14 | Trajectory* trajectory; | | {} 15 | 16 | TrajectoryVector(double p, Direction d, Trajectory* t): 17 | pos(p), 18 | dir(d), 19 | trajectory(t) 20 | { 21 | } 22 | 23 | TrajectoryVector() {} | ^ include/trajectory.hpp:23:5: warning: use '= default' to define a trivial default constructor [modernize-use-equals-default] 23 | TrajectoryVector() {} | ^ ~~ | = default; include/trajectory.hpp:25:22: warning: method 'flipped' can be made const [readability-make-member-function-const] 25 | TrajectoryVector flipped() | ^ | const include/trajectory.hpp:27:16: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] 27 | return TrajectoryVector(pos, dir == Direction::FORWARD ? Direction::BACKWARD : Direction::FORWARD, trajectory); | ^~~~~~~~~~~~~~~~~ ~ | { } include/trajectory.hpp:31:7: warning: class 'Trajectory' 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] 31 | class Trajectory: public DLBaseItem | ^ include/trajectory.hpp:40:25: warning: member 'base' of type 'const SurfaceVector' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 40 | const SurfaceVector base; | ^ include/trajectory.hpp:41:18: warning: member 'length' of type 'const double' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 41 | const double length; | ^ include/trajectory.hpp:82:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 82 | ~Trajectory(); | ^ | override include/types.hpp:40:9: warning: macro 'PROGRAM_VERSION' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] 40 | #define PROGRAM_VERSION "BC.2018" | ^ include/types.hpp:88:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 88 | extern std::string direction_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:132:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 132 | extern std::string nucleation_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:141:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 141 | extern std::string interaction_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:153:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 153 | extern std::string bundle_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:8:5: warning: no header providing "Segment" is directly included [misc-include-cleaner] 3 | #include "system.hpp" 4 | 5 | double Microtubule::length() 6 | { 7 | double temp = 0.0; 8 | Segment* seg = segments.first(); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:65:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 65 | return; | ^~~~~~~ 66 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:68:37: warning: no header providing "TrajectoryVector" is directly included [misc-include-cleaner] 4 | Microtubule::Microtubule(System* s, TrajectoryVector tv, bool initialize): | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:75:10: warning: no header providing "MTType" is directly included [misc-include-cleaner] 4 | type(MTType::GROWING), | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:97:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 97 | return; | ^~~~~~~ 98 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:118:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 118 | return; | ^~~~~~~ 119 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:126:67: warning: no header providing "DeterministicEventType" is directly included [misc-include-cleaner] 126 | disappear_event.push_on_queue(segments.first()->length(), DeterministicEventType::DISAPPEAR); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:134:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 134 | return; | ^~~~~~~ 135 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:203:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 203 | return; | ^~~~~~~ 204 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:224:75: warning: no header providing "TipType" is directly included [misc-include-cleaner] 224 | plus.trajectory->base.region->unregister_from_region(plus.region_tag, TipType::PLUS, MTType::GROWING); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:253:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 253 | return; | ^~~~~~~ 254 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:301:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 301 | return; | ^~~~~~~ 302 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:309:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 309 | return; | ^~~~~~~ 310 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:312:34: warning: no header providing "IntersectionItr" is directly included [misc-include-cleaner] 312 | void Microtubule::sever_at_cross(IntersectionItr is, Segment* cut_seg) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:321:25: warning: no header providing "Direction" is directly included [misc-include-cleaner] 321 | if (cut_seg->dir == Direction::FORWARD) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:323:22: warning: no header providing "ZERO_CUTOFF" is directly included [misc-include-cleaner] 2 | split_pos += ZERO_CUTOFF; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:336:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 336 | return; | ^~~~~~~ 337 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:430:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 430 | return; | ^~~~~~~ 431 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:441:19: warning: Called C++ object pointer is null [clang-analyzer-core.CallAndMessage] 441 | if (cut_pos > cut_seg->length()) | ^~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:435:5: note: Assigning value 435 | cut_seg = segments.first(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:436:13: note: Assuming pointer value is null 436 | while ((cut_seg != nullptr) && (cut_pos > cut_seg->length())) | ^~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:436:33: note: Left side of '&&' is false 436 | while ((cut_seg != nullptr) && (cut_pos > cut_seg->length())) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:441:19: note: Called C++ object pointer is null 441 | if (cut_pos > cut_seg->length()) | ^~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:449:18: warning: no header providing "std::cerr" is directly included [misc-include-cleaner] 4 | std::cerr << "ERROR: position beyond the end of the microtubule.\n"; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:450:13: warning: no header providing "exit" is directly included [misc-include-cleaner] 4 | exit(-1); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:454:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 454 | return; | ^~~~~~~ 455 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:457:19: warning: function 'wall' has cognitive complexity of 33 (threshold 25) [readability-function-cognitive-complexity] 457 | void Microtubule::wall() | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:468:5: note: +1, including nesting penalty of 0, nesting level increased to 1 468 | if (tv.trajectory->base.region->face_tag == -1) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:478:5: note: +1, including nesting penalty of 0, nesting level increased to 1 478 | if (system->p.edge_catastrophe_enabled) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:481:44: note: +2, including nesting penalty of 1, nesting level increased to 2 481 | = (plus.dir == Direction::FORWARD) ? plus.trajectory->next_tr_cos_angle : plus.trajectory->prev_tr_cos_angle; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:484:9: note: +2, including nesting penalty of 1, nesting level increased to 2 484 | if ((1.0 - cos_angle) > ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:489:13: note: +3, including nesting penalty of 2, nesting level increased to 3 489 | if (system->p.geometry == "cubeReal") | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:491:17: note: +4, including nesting penalty of 3, nesting level increased to 4 491 | if (std::abs(plus.trajectory->base.region->face_tag - tv.trajectory->base.region->face_tag) > 0) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:493:21: note: +5, including nesting penalty of 4, nesting level increased to 5 493 | if (std::abs(plus.trajectory->base.region->face_tag - tv.trajectory->base.region->face_tag) > 1) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:498:21: note: +1, nesting level increased to 5 498 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:506:13: note: +1, nesting level increased to 3 506 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:509:52: note: +4, including nesting penalty of 3, nesting level increased to 4 509 | = (plus.dir == Direction::FORWARD) ? plus.trajectory->next_trp_cat : plus.trajectory->prev_trp_cat; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:513:13: note: +3, including nesting penalty of 2, nesting level increased to 3 513 | if (system->p.edge_catastrophe_smooth) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:519:13: note: +3, including nesting penalty of 2, nesting level increased to 3 519 | if (system->random_gen.rand() <= p_cat) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:545:63: note: +1, including nesting penalty of 0, nesting level increased to 1 545 | segments.last()->start_itr = tv.dir == Direction::FORWARD ? tv.trajectory->wall_begin() : tv.trajectory->wall_end(); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:549:57: note: +1, including nesting penalty of 0, nesting level increased to 1 549 | tv.trajectory, tv.dir, tv.dir == Direction::FORWARD ? tv.trajectory->wall_begin() : tv.trajectory->wall_end()); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:551:5: note: +1, including nesting penalty of 0, nesting level increased to 1 551 | if (segments.size() == 2) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:478:9: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 478 | if (system->p.edge_catastrophe_enabled) | ^ | != 0 /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:480:9: warning: variable 'cos_angle' of type 'double' can be declared 'const' [misc-const-correctness] 480 | double cos_angle | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:491:26: warning: no header providing "std::abs" is directly included [misc-include-cleaner] 491 | if (std::abs(plus.trajectory->base.region->face_tag - tv.trajectory->base.region->face_tag) > 0) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:513:17: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 513 | if (system->p.edge_catastrophe_smooth) | ^ | != 0 /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:558:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 558 | return; | ^~~~~~~ 559 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:565:5: warning: no header providing "CollisionType" is directly included [misc-include-cleaner] 565 | CollisionType type; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:565:19: warning: variable 'type' is not initialized [cppcoreguidelines-init-variables] 565 | CollisionType type; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:566:15: warning: variable 'dir' is not initialized [cppcoreguidelines-init-variables] 566 | Direction dir; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:580:32: warning: no header providing "PI" is directly included [misc-include-cleaner] 580 | if (diff_angle > 0.5 * PI) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:622:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 622 | return; | ^~~~~~~ 623 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:637:5: warning: variable 'tv' of type 'TrajectoryVector' can be declared 'const' [misc-const-correctness] 637 | TrajectoryVector tv(plus.next_collision->second.mirror->first, dir, plus.next_collision->second.other_trajectory); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:658:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 658 | return; | ^~~~~~~ 659 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:671:15: warning: variable 'new_dir' is not initialized [cppcoreguidelines-init-variables] 671 | Direction new_dir; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:745:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 745 | return; | ^~~~~~~ 746 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:808:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 808 | return; | ^~~~~~~ 809 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:833:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 833 | return; | ^~~~~~~ 834 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:848:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 848 | return; | ^~~~~~~ 849 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:851:19: warning: function 'integrity_check' has cognitive complexity of 131 (threshold 25) [readability-function-cognitive-complexity] 851 | bool Microtubule::integrity_check() | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:861:5: note: +1, including nesting penalty of 0, nesting level increased to 1 861 | if (segments.size() == 0) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:868:10: note: +1, nesting level increased to 1 868 | else if (segments.size() != 1) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:870:9: note: +2, including nesting penalty of 1, nesting level increased to 2 870 | if (segments.size() == 0) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:878:9: note: +2, including nesting penalty of 1, nesting level increased to 2 878 | if (seg == nullptr) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:886:9: note: +2, including nesting penalty of 1, nesting level increased to 2 886 | if ((seg->end_itr != seg->trajectory->wall_end()) && (seg->end_itr != seg->trajectory->wall_begin())) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:886:59: note: +1 886 | if ((seg->end_itr != seg->trajectory->wall_end()) && (seg->end_itr != seg->trajectory->wall_begin())) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:888:13: note: +3, including nesting penalty of 2, nesting level increased to 3 888 | if (seg->end_itr->second.mirror != seg->next()->start_itr) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:895:13: note: +3, including nesting penalty of 2, nesting level increased to 3 895 | if (std::abs(seg->end - seg->end_itr->first) > ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:904:13: note: +3, including nesting penalty of 2, nesting level increased to 3 904 | if (std::abs(seg->next()->start - seg->next()->start_itr->first) > ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:914:9: note: +1, nesting level increased to 2 914 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:917:13: note: +3, including nesting penalty of 2, nesting level increased to 3 917 | if (seg->end_itr == seg->trajectory->wall_end()) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:919:17: note: +4, including nesting penalty of 3, nesting level increased to 4 919 | if (std::abs(seg->end - seg->trajectory->length) > ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:929:13: note: +1, nesting level increased to 3 929 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:931:17: note: +4, including nesting penalty of 3, nesting level increased to 4 931 | if (std::abs(seg->end - 0) > ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:940:13: note: +3, including nesting penalty of 2, nesting level increased to 3 940 | if (seg->next()->start_itr == seg->next()->trajectory->wall_end()) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:942:17: note: +4, including nesting penalty of 3, nesting level increased to 4 942 | if (std::abs(seg->next()->start - seg->next()->trajectory->length) > ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:951:13: note: +1, nesting level increased to 3 951 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:953:17: note: +4, including nesting penalty of 3, nesting level increased to 4 953 | if (std::abs(seg->next()->start - 0) > ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:966:5: note: +1, including nesting penalty of 0, nesting level increased to 1 966 | if (!valid) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:972:5: note: +1, including nesting penalty of 0, nesting level increased to 1 972 | if (static_cast(plus.dir) * plus.velocity > 0) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:974:9: note: +2, including nesting penalty of 1, nesting level increased to 2 974 | if (plus.next_collision == plus.trajectory->wall_end()) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:977:13: note: +3, including nesting penalty of 2, nesting level increased to 3 977 | if (segments.last()->end - plus.trajectory->length > ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:983:9: note: +1, nesting level increased to 2 983 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:986:13: note: +3, including nesting penalty of 2, nesting level increased to 3 986 | if (segments.last()->end - plus.next_collision->first > ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:993:5: note: +1, nesting level increased to 1 993 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:995:9: note: +2, including nesting penalty of 1, nesting level increased to 2 995 | if (plus.next_collision == plus.trajectory->wall_begin()) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:998:13: note: +3, including nesting penalty of 2, nesting level increased to 3 998 | if (segments.last()->end < -ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1003:9: note: +1, nesting level increased to 2 1003 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1006:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1006 | if (segments.last()->end - plus.next_collision->first < -ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1013:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1013 | if (!valid) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1020:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1020 | if (static_cast(minus.dir) * minus.velocity > ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1022:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1022 | if (minus.next_collision == minus.trajectory->wall_end()) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1024:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1024 | if (segments.first()->start - minus.trajectory->length > ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1029:9: note: +1, nesting level increased to 2 1029 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1031:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1031 | if (segments.first()->start - minus.next_collision->first > ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1037:10: note: +1, nesting level increased to 1 1037 | else if (static_cast(minus.dir) * minus.velocity < -ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1039:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1039 | if (minus.next_collision == minus.trajectory->wall_begin()) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1041:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1041 | if (segments.first()->start < -ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1046:9: note: +1, nesting level increased to 2 1046 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1048:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1048 | if (segments.first()->start - minus.next_collision->first < -ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1055:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1055 | if (!valid) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1062:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1062 | while (seg != nullptr) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1066:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1066 | while ((is != seg->trajectory->wall_end()) && (count != seg->trajectory->intersections.size())) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1066:52: note: +1 1066 | while ((is != seg->trajectory->wall_end()) && (count != seg->trajectory->intersections.size())) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1071:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1071 | if (is != seg->trajectory->wall_end()) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1079:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1079 | while ((is != seg->trajectory->wall_end()) && (count != seg->trajectory->intersections.size())) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1079:52: note: +1 1079 | while ((is != seg->trajectory->wall_end()) && (count != seg->trajectory->intersections.size())) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1084:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1084 | if (is != seg->trajectory->wall_end()) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1094:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1094 | if (system->get_event_descriptor(plus.event.index) != &plus.event) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1098:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1098 | if (system->get_event_descriptor(minus.event.index) != &minus.event) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1102:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1102 | if (system->get_event_descriptor(disappear_event.index) != &disappear_event) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1109:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1109 | while (seg != nullptr) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1111:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1111 | if (*(seg->trajectory_tag) != seg) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1120:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1120 | if (*(plus.notification_tag) != &plus) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1124:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1124 | if (*(minus.notification_tag) != &minus) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1130:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1130 | if (segments.first()->dir == minus.dir) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1134:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1134 | if (segments.last()->dir != plus.dir) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1140:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1140 | while (seg != nullptr) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1142:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1142 | if (seg->dir == Direction::FORWARD) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1144:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1144 | if (seg->end - seg->start < -ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1151:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1151 | while ((is != seg->end_itr) && (count != seg->trajectory->intersections.size())) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1151:41: note: +1 1151 | while ((is != seg->end_itr) && (count != seg->trajectory->intersections.size())) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1156:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1156 | if (is != seg->end_itr) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1162:9: note: +1, nesting level increased to 2 1162 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1164:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1164 | if (seg->end - seg->start > ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1171:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1171 | while ((is != seg->end_itr) && (count != seg->trajectory->intersections.size())) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1171:41: note: +1 1171 | while ((is != seg->end_itr) && (count != seg->trajectory->intersections.size())) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:1176:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1176 | if (is != seg->end_itr) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:858:5: warning: no header providing "size_t" is directly included [misc-include-cleaner] 4 | size_t count(0); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:895:22: warning: no header providing "std::abs" is directly included [misc-include-cleaner] 895 | if (std::abs(seg->end - seg->end_itr->first) > ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:902:34: warning: no header providing "std::max" is directly included [misc-include-cleaner] 4 | max_deviation = std::max(max_deviation, std::abs(seg->end - seg->end_itr->first)); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:910:13: warning: Value stored to 'max_deviation' is never read [clang-analyzer-deadcode.DeadStores] 910 | max_deviation = std::max(max_deviation, std::abs(seg->next()->start - seg->next()->start_itr->first)); | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:910:13: note: Value stored to 'max_deviation' is never read 910 | max_deviation = std::max(max_deviation, std::abs(seg->next()->start - seg->next()->start_itr->first)); | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:949:17: warning: Value stored to 'max_deviation' is never read [clang-analyzer-deadcode.DeadStores] 949 | max_deviation = std::max(max_deviation, std::abs(seg->next()->start - seg->next()->trajectory->length)); | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:949:17: note: Value stored to 'max_deviation' is never read 949 | max_deviation = std::max(max_deviation, std::abs(seg->next()->start - seg->next()->trajectory->length)); | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:960:17: warning: Value stored to 'max_deviation' is never read [clang-analyzer-deadcode.DeadStores] 960 | max_deviation = std::max(max_deviation, std::abs(seg->next()->start - 0)); | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:960:17: note: Value stored to 'max_deviation' is never read 960 | max_deviation = std::max(max_deviation, std::abs(seg->next()->start - 0)); | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:963:9: warning: Value stored to 'seg' is never read [clang-analyzer-deadcode.DeadStores] 963 | seg = seg->next(); | ^ ~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:963:9: note: Value stored to 'seg' is never read 963 | seg = seg->next(); | ^ ~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/microtubule.cpp:968:14: warning: no header providing "std::cout" is directly included [misc-include-cleaner] 968 | std::cout << "Broken segment connections\n"; | ^ 35286 warnings generated. Suppressed 35014 warnings (35014 in non-user code). Use -header-filter=.* or leave it as default to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. [ 7/13][17.0s] clang-tidy-22 -p=/home/runner/work/corticalsim/corticalsim/build/debug --config-file=/home/runner/work/corticalsim/corticalsim/.clang-tidy /home/runner/work/corticalsim/corticalsim/src/mt_tip.cpp include/CompactList_impl.hpp:12:7: warning: class 'CompactList' 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] 12 | class CompactList | ^ include/CompactList_impl.hpp:26:19: warning: all parameters should be named in a function [readability-named-parameter] 26 | void remove(T*); | ^ | /*element*/ include/CompactList_impl.hpp:49:16: warning: all parameters should be named in a function [readability-named-parameter] 49 | T* create(Q); | ^ | /*par1*/ include/CompactList_impl.hpp:51:16: warning: all parameters should be named in a function [readability-named-parameter] 51 | T* create(Q, R); | ^ | /*par1*/ /*par2*/ include/CompactList_impl.hpp:53:16: warning: all parameters should be named in a function [readability-named-parameter] 53 | T* create(Q, R, S); | ^ | /*par1*/ /*par2*/ /*par3*/ include/CompactList_impl.hpp:80:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 80 | return; | ^~~~~~~ 81 | } include/CompactList_impl.hpp:86:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 86 | T* new_element = new (MemPool::malloc()) T(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:94:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 94 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:102:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 102 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:110:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 110 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:145:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 145 | return; | ^~~~~~~ 146 | } include/CompactList_impl.hpp:149:7: warning: class 'CompactListItem' 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] 149 | class CompactListItem | ^ include/CompactList_impl.hpp:149:7: warning: destructor of 'CompactListItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] include/CompactList_impl.hpp:149:7: note: make it protected and non-virtual 149 | class CompactListItem | ^ 150 | { 151 | public: 152 | 153 | CompactListItem(): 154 | index(0) {}; 155 | int index; 156 | 157 | protected: 158 | 159 | virtual ~CompactListItem() {}; | ~~~~~~~ include/CompactList_impl.hpp:153:5: warning: public constructor allows the CRTP to be constructed as a regular template class; consider making it private and declaring the derived class as friend [bugprone-crtp-constructor-accessibility] 153 | CompactListItem(): | ^ 154 | index(0) {}; | 155 | int index; 156 | 157 | protected: 158 | 159 | virtual ~CompactListItem() {}; 160 | template 161 | friend class CompactList; 162 | }; include/CompactList_impl.hpp:155:9: warning: use default member initializer for 'index' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 154 | index(0) {}; | ~~~~~~~~ 155 | int index; | ^ | {0} include/CompactList_impl.hpp:159:13: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] 159 | virtual ~CompactListItem() {}; | ^ ~~ | = default include/DLList_impl.hpp:32:7: warning: class 'DLList' 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] 32 | class DLList | ^ include/DLList_impl.hpp:36:9: warning: use default member initializer for 'num_elements' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 36 | int num_elements; | ^ | { 0 } include/DLList_impl.hpp:42:8: warning: use default member initializer for 'first_element' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 42 | T* first_element; | ^ | { nullptr } 43 | T* last_element; 44 | 45 | using MemPool = crts::SingletonPool; 46 | 47 | void unlink_element(T*); 48 | T* link_element(T*); 49 | 50 | public: 51 | 52 | DLList(): 53 | num_elements{ 0 }, 54 | first_element{ nullptr }, | ~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:43:8: warning: use default member initializer for 'last_element' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 43 | T* last_element; | ^ | { nullptr } 44 | 45 | using MemPool = crts::SingletonPool; 46 | 47 | void unlink_element(T*); 48 | T* link_element(T*); 49 | 50 | public: 51 | 52 | DLList(): 53 | num_elements{ 0 }, 54 | first_element{ nullptr }, 55 | last_element{ nullptr } {}; | ~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:47:27: warning: all parameters should be named in a function [readability-named-parameter] 47 | void unlink_element(T*); | ^ | /*element*/ include/DLList_impl.hpp:48:23: warning: all parameters should be named in a function [readability-named-parameter] 48 | T* link_element(T*); | ^ | /*new_element*/ include/DLList_impl.hpp:70:16: warning: all parameters should be named in a function [readability-named-parameter] 70 | T* create(Q); | ^ | /*par1*/ include/DLList_impl.hpp:72:16: warning: all parameters should be named in a function [readability-named-parameter] 72 | T* create(Q, R); | ^ | /*par1*/ /*par2*/ include/DLList_impl.hpp:74:16: warning: all parameters should be named in a function [readability-named-parameter] 74 | T* create(Q, R, S); | ^ | /*par1*/ /*par2*/ /*par3*/ include/DLList_impl.hpp:75:19: warning: all parameters should be named in a function [readability-named-parameter] 75 | void remove(T*); | ^ | /*element*/ include/DLList_impl.hpp:77:49: warning: all parameters should be named in a function [readability-named-parameter] 77 | void import(DLList&, T*); | ^ | /*old_list*/ /*element*/ include/DLList_impl.hpp:78:53: warning: all parameters should be named in a function [readability-named-parameter] 78 | void import_set(DLList&, T*, T*); | ^ | /*old_list*/ /*first_element*/ /*last_element*/ include/DLList_impl.hpp:137:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 137 | return; | ^~~~~~~ 138 | } include/DLList_impl.hpp:154:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 154 | T* new_element = new (MemPool::malloc()) T(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:162:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 162 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:170:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 170 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:178:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 178 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:196:8: warning: variable 'temp' is not initialized [cppcoreguidelines-init-variables] 196 | T* temp; | ^ | = nullptr include/DLList_impl.hpp:211:7: warning: class 'DLBaseItem' 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] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: the implicit default constructor of the CRTP is publicly accessible; consider making it private and declaring the derived class as friend [bugprone-crtp-constructor-accessibility] 211 | class DLBaseItem | ^ 212 | { | include/DLList_impl.hpp:226:13: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] 226 | virtual ~DLBaseItem() {}; | ^ ~~ | = default include/det_queue.hpp:14:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 14 | System* const system; // pointer to containing system | ^ include/det_queue.hpp:14:19: warning: member variable 'system' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes] include/det_queue.hpp:17:12: warning: method 'current_pos' can be made const [readability-make-member-function-const] 17 | double current_pos() | ^ | const include/det_queue.hpp:25:63: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 25 | double progression(int cache_pos) { return current_base - value_cache[cache_pos]; } | ^ include/det_queue.hpp:48:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 48 | double value_cache[POSITION_CACHE_SIZE]; // cache of previous 'distance' values | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/det_queue.hpp:49:29: warning: member 'distance_time_conversion_function' of type 'double (System::*const)(double)' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 49 | double (System::* const distance_time_conversion_function)(double); | ^ include/det_queue.hpp:51:29: warning: member 'time_distance_conversion_function' of type 'double (System::*const)(double)' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 51 | double (System::* const time_distance_conversion_function)(double); | ^ include/edge.hpp:31:9: warning: 'exclude_point' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | : exclude_point(0) 30 | { 31 | exclude_point = 0; | ^~~~~~~~~~~~~~~~~~ include/edge.hpp:33:9: warning: 'p_cat' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , p_cat(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; | ^~~~~~~~~~~~ include/edge.hpp:34:9: warning: 'edg_ang_norm' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , edg_ang_norm(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; | ^~~~~~~~~~~~~~~~~~~ include/edge.hpp:35:9: warning: 'xy_rotation_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , xy_rotation_angle(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; 35 | xy_rotation_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~~~~~ include/edge.hpp:36:9: warning: 'edg_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , edg_angle(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; 35 | xy_rotation_angle = 0.0; 36 | edg_angle = 0.0; | ^~~~~~~~~~~~~~~~ include/edge.hpp:37:9: warning: 'edg_bend_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , edg_bend_angle(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; 35 | xy_rotation_angle = 0.0; 36 | edg_angle = 0.0; 37 | edg_bend_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~~ include/event.hpp:7:7: warning: class 'EventDescriptor' 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] 7 | class EventDescriptor | ^ include/event.hpp:20:24: warning: member 'mt' of type 'Microtubule *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | Microtubule* const mt; | ^ include/geometry.hpp:10:7: warning: class 'Geometry' 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] 10 | class Geometry | ^ include/geometry.hpp:20:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | System* const system; | ^ include/geometry.hpp:28:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 28 | double patch_area[3]; | ^~~~~~~~~~~~~~~~~~~~ include/geometry.hpp:29:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 29 | std::vector regions_index[3]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/geometry.hpp:35:5: warning: constructor does not initialize these fields: areain_mesh, area_ppb, patch_area, element_max [cppcoreguidelines-pro-type-member-init] 19 | double area_ppb; | | {} 20 | std::vector ppb; 21 | 22 | double patch_area[3]; | | {} 23 | std::vector regions_index[3]; 24 | 25 | int element_max; | | {} 26 | Eigen::Vector3d object_cm, object_pa, nucleous_position; 27 | std::vector regions; 28 | 29 | Geometry(System* s, double a): | ^ include/geometry.hpp:39:9: warning: use range-based for loop instead [modernize-loop-convert] 39 | for (int i = 0; i < 3; i++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~ | (double & i : patch_area) 40 | { 41 | patch_area[i] = 0.0; | ~~~~~~~~~~~~~ | i include/geometry.hpp:41:13: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 41 | patch_area[i] = 0.0; | ^ include/geometry.hpp:46:27: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 46 | virtual ~Geometry() { return; }; | ^~~~~~~ include/geometry.hpp:77:22: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 77 | TrajectoryVector extend_trajectory(Trajectory*, Direction); | ^ | override include/geometry.hpp:77:22: warning: visibility of function 'extend_trajectory' is changed from private in class 'Geometry' to public [misc-override-with-different-visibility] include/geometry.hpp:69:30: note: function declared here as private 69 | virtual TrajectoryVector extend_trajectory(Trajectory*, Direction) = 0; | ^ include/geometry.hpp:77:51: warning: all parameters should be named in a function [readability-named-parameter] 77 | TrajectoryVector extend_trajectory(Trajectory*, Direction); | ^ | /*unused*/ /*unused*/ include/geometry.hpp:78:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 78 | void get_order_parameters(OrderParameters&); | ^ | override include/geometry.hpp:78:47: warning: all parameters should be named in a function [readability-named-parameter] 78 | void get_order_parameters(OrderParameters&); | ^ | /*unused*/ include/geometry.hpp:79:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 79 | void output_snapshot(std::ostream&); | ^ | override include/geometry.hpp:79:39: warning: all parameters should be named in a function [readability-named-parameter] 79 | void output_snapshot(std::ostream&); | ^ | /*unused*/ include/geometry.hpp:80:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 80 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | override include/geometry.hpp:80:45: warning: all parameters should be named in a function [readability-named-parameter] 80 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | /*unused*/ /*unused*/ /*unused*/ include/intersection.hpp:33:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | : x(x1) 32 | { 33 | x = x1; | ^~~~~~~ include/intersection.hpp:34:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , y(y1) 32 | { 33 | x = x1; 34 | y = y1; | ^~~~~~~ include/intersection.hpp:35:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , z(z1) 32 | { 33 | x = x1; 34 | y = y1; 35 | z = z1; | ^~~~~~~ include/intersection.hpp:36:9: warning: 'next_element' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , next_element(n1) 32 | { 33 | x = x1; 34 | y = y1; 35 | z = z1; 36 | next_element = n1; | ^~~~~~~~~~~~~~~~~~ include/microtubule.hpp:10:7: warning: class 'Microtubule' 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] 10 | class Microtubule: public DLBaseItem | ^ include/microtubule.hpp:14:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 14 | System* const system; | ^ include/microtubule.hpp:31:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 31 | ~Microtubule(); | ^ | override include/mt_tip.hpp:7:7: warning: class 'MTTip' 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] 7 | class MTTip | ^ include/mt_tip.hpp:21:23: warning: all parameters should be named in a function [readability-named-parameter] 21 | MTTip(Microtubule*, TrajectoryVector, double, DeterministicQueue*, double); | ^ | /*m*/ /*tv*/ /*v*/ /*q*/ /*queue_v*/ include/mt_tip.hpp:29:39: warning: all parameters should be named in a function [readability-named-parameter] 29 | void switch_trajectory(Trajectory*, Direction, IntersectionItr, bool = true); | ^ | /*new_tr*/ /*d*/ /*intersect*/ /*advance*/ include/mt_tip.hpp:33:40: warning: all parameters should be named in a function [readability-named-parameter] 33 | void notify_insert(IntersectionItr&); | ^ | /*new_is*/ include/mt_tip.hpp:34:40: warning: all parameters should be named in a function [readability-named-parameter] 34 | void notify_remove(IntersectionItr&); | ^ | /*old_is*/ include/mt_tip.hpp:40:5: warning: use '= delete' to prohibit calling of a special member function [modernize-use-equals-delete] 40 | MTTip(const MTTip&); | ^ | = delete include/mt_tip.hpp:41:12: warning: use '= delete' to prohibit calling of a special member function [modernize-use-equals-delete] 41 | MTTip& operator=(const MTTip&); | ^ | = delete include/parameters.hpp:105:3: warning: redundant access specifier has the same accessibility as the previous access specifier [readability-redundant-access-specifiers] 105 | public: | ^~~~~~~ include/parameters.hpp:42:3: note: previously declared here 42 | public: | ^ include/parameters.hpp:119:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 119 | double rdirector[3]; | ^~~~~~~~~~~~~~~~~~~ include/parameters.hpp:139:5: warning: constructor does not initialize these fields: local_order [cppcoreguidelines-pro-type-member-init] 136 | double local_order; | | {} 137 | Eigen::Vector3d sv; 138 | 139 | OrderParametersRaw(void) | ^ include/parameters.hpp:139:24: warning: redundant void argument list in function definition [modernize-redundant-void-arg] 139 | OrderParametersRaw(void) | ^~~~ include/parameters.hpp:141:9: warning: 'local_l' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | : local_l(0.) 140 | { 141 | local_l = 0.; | ^~~~~~~~~~~~~ include/parameters.hpp:142:9: warning: 'local_l_opt' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , local_l_opt(0.) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; | ^~~~~~~~~~~~~~~~~ include/parameters.hpp:143:9: warning: 'qxx' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxx(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; | ^~~~~~~~ include/parameters.hpp:144:9: warning: 'qxy' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxy(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; | ^~~~~~~~ include/parameters.hpp:145:9: warning: 'qxz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; | ^~~~~~~~ include/parameters.hpp:146:9: warning: 'qyy' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qyy(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; | ^~~~~~~~ include/parameters.hpp:147:9: warning: 'qyz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qyz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; 147 | qyz = 0; | ^~~~~~~~ include/parameters.hpp:148:9: warning: 'qzz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qzz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; 147 | qyz = 0; 148 | qzz = 0; | ^~~~~~~~ include/parameters.hpp:152:9: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 152 | return; | ^~~~~~~ 153 | } include/parameters.hpp:155:22: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 155 | double extract_r(double director[3], std::string geometry) | ^~~~~~~~~~~~~~~~~~ include/parameters.hpp:155:54: warning: the parameter 'geometry' of type 'std::string' (aka 'basic_string') is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 155 | double extract_r(double director[3], std::string geometry) | ^ | const & include/parameters.hpp:178:40: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 178 | director[i] = evec_mat(i, max_pos); | ^ include/parameters.hpp:195:40: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 195 | director[i] = evec_mat(i, min_pos); | ^ include/parameters.hpp:199:16: warning: redundant parentheses around expression [readability-redundant-parentheses] 199 | return (sel_eigen_val); | ^ ~ include/region.hpp:9:7: warning: class 'Region' 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] 9 | class Region | ^ include/region.hpp:20:21: warning: member 'geometry' of type 'Geometry *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | Geometry* const geometry; | ^ include/region.hpp:24:12: warning: use default member initializer for 'total_length' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 24 | double total_length; | ^ | {0} include/region.hpp:26:9: warning: use default member initializer for 'previous_update_tag' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 26 | int previous_update_tag; | ^ | {0} include/region.hpp:27:9: warning: use default member initializer for 'region_id' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 27 | int region_id; | ^ | {0} include/region.hpp:28:12: warning: use default member initializer for 'z_offset' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 28 | double z_offset; | ^ | {0.0} include/region.hpp:29:12: warning: use default member initializer for 'rot_angle' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 29 | double rot_angle; | ^ | {0.0} include/region.hpp:30:12: warning: use default member initializer for 'peri_meter' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 30 | double peri_meter; | ^ | {0.0} include/region.hpp:55:5: warning: constructor does not initialize these fields: face_tag, poly_intersect_mark [cppcoreguidelines-pro-type-member-init] 38 | Region(Geometry* g, double a): | ^ include/region.hpp:68:22: warning: use emplace_back instead of push_back [modernize-use-emplace] 68 | vertices.push_back(Eigen::Vector2d(0, 0)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~ | emplace_back( include/region.hpp:69:18: warning: use emplace_back instead of push_back [modernize-use-emplace] 69 | side.push_back(Edge()); | ^~~~~~~~~~~~~~~~ | emplace_back( include/region.hpp:73:25: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 73 | virtual ~Region() { return; }; | ^~~~~~~ include/region.hpp:78:51: warning: parameter 2 is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls] 78 | virtual void translate_vector(SurfaceVector&, const double) = 0; | ^~~~~ include/region.hpp:106:27: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 106 | virtual SurfaceVector random_surface_vector() = 0; | ~~~~~~~ ^ | override include/region.hpp:106:27: warning: visibility of function 'random_surface_vector' is changed from protected in class 'Region' to public [misc-override-with-different-visibility] include/region.hpp:90:27: note: function declared here as protected 90 | virtual SurfaceVector random_surface_vector() = 0; | ^ include/region.hpp:107:18: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 107 | virtual void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&) = 0; | ~~~~~~~ ^ | override include/region.hpp:107:59: warning: all parameters should be named in a function [readability-named-parameter] 107 | virtual void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&) = 0; | ^ | /*unused*/ /*unused*/ /*unused*/ /*unused*/ include/region.hpp:108:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 108 | void make_intersection_list(Trajectory*); | ^ | override include/region.hpp:108:10: warning: visibility of function 'make_intersection_list' is changed from protected in class 'Region' to public [misc-override-with-different-visibility] include/region.hpp:89:18: note: function declared here as protected 89 | virtual void make_intersection_list(Trajectory*) = 0; | ^ include/region.hpp:108:44: warning: all parameters should be named in a function [readability-named-parameter] 108 | void make_intersection_list(Trajectory*); | ^ | /*unused*/ include/region.hpp:109:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 109 | void translate_vector(SurfaceVector&, const double); | ^ | override include/region.hpp:109:41: warning: all parameters should be named in a function [readability-named-parameter] 109 | void translate_vector(SurfaceVector&, const double); | ^ | /*unused*/ /*unused*/ include/region.hpp:109:43: warning: parameter 2 is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls] 109 | void translate_vector(SurfaceVector&, const double); | ^~~~~ include/region.hpp:110:12: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 110 | double intersection_angle(Trajectory*, Trajectory*); | ^ | override include/region.hpp:110:42: warning: all parameters should be named in a function [readability-named-parameter] 110 | double intersection_angle(Trajectory*, Trajectory*); | ^ | /*unused*/ /*unused*/ include/region.hpp:116:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 116 | void output_snapshot(std::ostream&); | ^ | override include/region.hpp:116:39: warning: all parameters should be named in a function [readability-named-parameter] 116 | void output_snapshot(std::ostream&); | ^ | /*unused*/ include/region.hpp:119:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 119 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | override include/region.hpp:119:45: warning: all parameters should be named in a function [readability-named-parameter] 119 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | /*unused*/ /*unused*/ /*unused*/ include/region.hpp:128:19: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 128 | SurfaceVector random_surface_vector(); | ^ | override include/region.hpp:129:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 129 | void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&); | ^ | override include/region.hpp:129:51: warning: all parameters should be named in a function [readability-named-parameter] 129 | void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&); | ^ | /*unused*/ /*unused*/ /*unused*/ /*unused*/ include/segment.hpp:7:7: warning: class 'Segment' 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] 7 | class Segment: public DLBaseItem | ^ include/segment.hpp:12:23: warning: member 'trajectory' of type 'Trajectory *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 12 | Trajectory* const trajectory; | ^ include/segment.hpp:27:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 27 | ~Segment(); | ^ | override include/segment.hpp:29:12: warning: method 'length' can be made const [readability-make-member-function-const] 29 | double length() { return std::abs(end - start); } | ^ | const include/surface.hpp:16:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | : x(x1) 15 | { 16 | x = x1; | ^~~~~~~ include/surface.hpp:17:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | , y(y1) 15 | { 16 | x = x1; 17 | y = y1; | ^~~~~~~ include/surface.hpp:18:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | , z(z1) 15 | { 16 | x = x1; 17 | y = y1; 18 | z = z1; | ^~~~~~~ include/surface.hpp:32:9: warning: 'cos_theta' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 30 | BendingOperator() | | : cos_theta(0.0) 31 | { 32 | cos_theta = 0.0; | ^~~~~~~~~~~~~~~~ include/surface.hpp:33:9: warning: 'sin_theta' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 30 | BendingOperator() | | , sin_theta(0.0) 31 | { 32 | cos_theta = 0.0; 33 | sin_theta = 0.0; | ^~~~~~~~~~~~~~~~ include/surface.hpp:49:5: warning: constructor does not initialize these fields: region [cppcoreguidelines-pro-type-member-init] 47 | Region* region; | | {} 48 | 49 | SurfaceVector() | ^ include/surface.hpp:51:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | : x(0.0) 50 | { 51 | x = 0.0; | ^~~~~~~~ include/surface.hpp:52:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , y(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; | ^~~~~~~~ include/surface.hpp:53:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , z(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; | ^~~~~~~~ include/surface.hpp:55:9: warning: 'angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , angle(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; 54 | 55 | angle = 0.0; | ^~~~~~~~~~~~ include/surface.hpp:56:9: warning: 'tv_pos' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , tv_pos(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; 54 | 55 | angle = 0.0; 56 | tv_pos = 0.0; | ^~~~~~~~~~~~~ include/surface.hpp:73:9: warning: 'mid_point' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | : mid_point(0) 72 | { 73 | mid_point = 0; | ^~~~~~~~~~~~~~ include/surface.hpp:74:9: warning: 'length' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | , length(0.0) 72 | { 73 | mid_point = 0; 74 | length = 0.0; | ^~~~~~~~~~~~~ include/surface.hpp:75:9: warning: 'edge_3d_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | , edge_3d_angle(0.0) 72 | { 73 | mid_point = 0; 74 | length = 0.0; 75 | edge_3d_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~ include/trajectory.hpp:16:5: warning: constructor does not initialize these fields: cdir [cppcoreguidelines-pro-type-member-init] 16 | TrajectoryVector(double p, Direction d, Trajectory* t): | ^ include/trajectory.hpp:23:5: warning: constructor does not initialize these fields: pos, dir, cdir, trajectory [cppcoreguidelines-pro-type-member-init] 12 | double pos; | | {} 13 | Direction dir, cdir; 14 | Trajectory* trajectory; | | {} 15 | 16 | TrajectoryVector(double p, Direction d, Trajectory* t): 17 | pos(p), 18 | dir(d), 19 | trajectory(t) 20 | { 21 | } 22 | 23 | TrajectoryVector() {} | ^ include/trajectory.hpp:23:5: warning: use '= default' to define a trivial default constructor [modernize-use-equals-default] 23 | TrajectoryVector() {} | ^ ~~ | = default; include/trajectory.hpp:25:22: warning: method 'flipped' can be made const [readability-make-member-function-const] 25 | TrajectoryVector flipped() | ^ | const include/trajectory.hpp:27:16: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] 27 | return TrajectoryVector(pos, dir == Direction::FORWARD ? Direction::BACKWARD : Direction::FORWARD, trajectory); | ^~~~~~~~~~~~~~~~~ ~ | { } include/trajectory.hpp:31:7: warning: class 'Trajectory' 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] 31 | class Trajectory: public DLBaseItem | ^ include/trajectory.hpp:40:25: warning: member 'base' of type 'const SurfaceVector' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 40 | const SurfaceVector base; | ^ include/trajectory.hpp:41:18: warning: member 'length' of type 'const double' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 41 | const double length; | ^ include/trajectory.hpp:82:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 82 | ~Trajectory(); | ^ | override include/types.hpp:40:9: warning: macro 'PROGRAM_VERSION' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] 40 | #define PROGRAM_VERSION "BC.2018" | ^ include/types.hpp:88:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 88 | extern std::string direction_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:132:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 132 | extern std::string nucleation_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:141:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 141 | extern std::string interaction_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:153:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 153 | extern std::string bundle_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mt_tip.cpp:6:1: warning: constructor does not initialize these fields: next_event_pos [cppcoreguidelines-pro-type-member-init] 6 | MTTip::MTTip(Microtubule* m, TrajectoryVector tv, double v, DeterministicQueue* q, double queue_v): | ^ src/mt_tip.cpp:6:61: warning: no header providing "DeterministicQueue" is directly included [misc-include-cleaner] 2 | #include "trajectory.hpp" 3 | #include "microtubule.hpp" 4 | #include "region.hpp" 5 | 6 | MTTip::MTTip(Microtubule* m, TrajectoryVector tv, double v, DeterministicQueue* q, double queue_v): | ^ src/mt_tip.cpp:19:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 19 | return; | ^~~~~~~ 20 | } src/mt_tip.cpp:28:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 28 | return; | ^~~~~~~ 29 | } src/mt_tip.cpp:45:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 45 | return; | ^~~~~~~ 46 | } src/mt_tip.cpp:55:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 55 | return; | ^~~~~~~ 56 | } src/mt_tip.cpp:68:5: warning: use auto when declaring iterators [modernize-use-auto] 68 | IntersectionItr temp = next_collision; | ^~~~~~~~~~~~~~~ | auto src/mt_tip.cpp:71:84: warning: no header providing "Direction" is directly included [misc-include-cleaner] 5 | if (((static_cast(dir) * velocity) < 0) || ((velocity == 0) && (dir == Direction::FORWARD))) | ^ src/mt_tip.cpp:83:19: warning: no header providing "TipType" is directly included [misc-include-cleaner] 83 | if (type() == TipType::PLUS) | ^ src/mt_tip.cpp:94:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 94 | return; | ^~~~~~~ 95 | } src/mt_tip.cpp:127:5: warning: use auto when declaring iterators [modernize-use-auto] 127 | IntersectionItr temp = next_collision; | ^~~~~~~~~~~~~~~ | auto src/mt_tip.cpp:154:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 154 | return; | ^~~~~~~ 155 | } src/mt_tip.cpp:160:5: warning: no header providing "DeterministicEventType" is directly included [misc-include-cleaner] 160 | DeterministicEventType event_type; | ^ src/mt_tip.cpp:160:28: warning: variable 'event_type' is not initialized [cppcoreguidelines-init-variables] 160 | DeterministicEventType event_type; | ^ src/mt_tip.cpp:163:5: warning: variable 'pos' of type 'double' can be declared 'const' [misc-const-correctness] 163 | double pos = position(); | ^ | const src/mt_tip.cpp:254:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 254 | return; | ^~~~~~~ 255 | } src/mt_tip.cpp:285:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 285 | return; | ^~~~~~~ 286 | } src/mt_tip.cpp:294:5: warning: use auto when declaring iterators [modernize-use-auto] 294 | IntersectionItr temp = new_is; | ^~~~~~~~~~~~~~~ | auto src/mt_tip.cpp:327:5: warning: variable 'ref_pos' of type 'double &' can be declared 'const' [misc-const-correctness] 327 | double& ref_pos = (type() == TipType::PLUS) ? mt->segments.last()->end : mt->segments.first()->start; | ^ | const src/mt_tip.cpp:346:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 346 | return; | ^~~~~~~ 347 | } src/mt_tip.cpp:356:5: warning: do not use 'else' after 'return' [readability-else-after-return] 356 | else | ^~~~ 357 | { | ~ 358 | return TipType::MINUS; | ~~~~~~~~~~~~~~~~~~~~~~ 359 | } | ~ src/mt_tip.cpp:369:5: warning: do not use 'else' after 'return' [readability-else-after-return] 369 | else | ^~~~ 370 | { | ~ 371 | return mt->segments.last()->end; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 372 | } | ~ src/mt_tip.cpp:382:5: warning: do not use 'else' after 'return' [readability-else-after-return] 382 | else | ^~~~ 383 | { | ~ 384 | return mt->segments.last()->start; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 385 | } | ~ src/mt_tip.cpp:395:5: warning: do not use 'else' after 'return' [readability-else-after-return] 395 | else | ^~~~ 396 | { | ~ 397 | return *(mt->segments.last()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 398 | } | ~ src/mt_tip.cpp:430:5: warning: use auto when declaring iterators [modernize-use-auto] 430 | TrjMTTipTag temp_tag = notification_tag; | ^~~~~~~~~~~ | auto src/mt_tip.cpp:430:5: warning: variable 'temp_tag' of type 'TrjMTTipTag' (aka 'std::_List_iterator') can be declared 'const' [misc-const-correctness] 430 | TrjMTTipTag temp_tag = notification_tag; | ^ | const src/mt_tip.cpp:438:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 438 | return; | ^~~~~~~ 439 | } 35248 warnings generated. Suppressed 35014 warnings (35014 in non-user code). Use -header-filter=.* or leave it as default to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. [ 8/13][70.7s] clang-tidy-22 -p=/home/runner/work/corticalsim/corticalsim/build/debug --config-file=/home/runner/work/corticalsim/corticalsim/.clang-tidy /home/runner/work/corticalsim/corticalsim/src/geometry.cpp include/CompactList_impl.hpp:12:7: warning: class 'CompactList' 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] 12 | class CompactList | ^ include/CompactList_impl.hpp:26:19: warning: all parameters should be named in a function [readability-named-parameter] 26 | void remove(T*); | ^ | /*element*/ include/CompactList_impl.hpp:49:16: warning: all parameters should be named in a function [readability-named-parameter] 49 | T* create(Q); | ^ | /*par1*/ include/CompactList_impl.hpp:51:16: warning: all parameters should be named in a function [readability-named-parameter] 51 | T* create(Q, R); | ^ | /*par1*/ /*par2*/ include/CompactList_impl.hpp:53:16: warning: all parameters should be named in a function [readability-named-parameter] 53 | T* create(Q, R, S); | ^ | /*par1*/ /*par2*/ /*par3*/ include/CompactList_impl.hpp:80:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 80 | return; | ^~~~~~~ 81 | } include/CompactList_impl.hpp:86:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 86 | T* new_element = new (MemPool::malloc()) T(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:94:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 94 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:102:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 102 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:110:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 110 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:145:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 145 | return; | ^~~~~~~ 146 | } include/CompactList_impl.hpp:149:7: warning: class 'CompactListItem' 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] 149 | class CompactListItem | ^ include/CompactList_impl.hpp:149:7: warning: destructor of 'CompactListItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] include/CompactList_impl.hpp:149:7: note: make it protected and non-virtual 149 | class CompactListItem | ^ 150 | { 151 | public: 152 | 153 | CompactListItem(): 154 | index(0) {}; 155 | int index; 156 | 157 | protected: 158 | 159 | virtual ~CompactListItem() {}; | ~~~~~~~ include/CompactList_impl.hpp:153:5: warning: public constructor allows the CRTP to be constructed as a regular template class; consider making it private and declaring the derived class as friend [bugprone-crtp-constructor-accessibility] 153 | CompactListItem(): | ^ 154 | index(0) {}; | 155 | int index; 156 | 157 | protected: 158 | 159 | virtual ~CompactListItem() {}; 160 | template 161 | friend class CompactList; 162 | }; include/CompactList_impl.hpp:155:9: warning: use default member initializer for 'index' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 154 | index(0) {}; | ~~~~~~~~ 155 | int index; | ^ | {0} include/CompactList_impl.hpp:159:13: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] 159 | virtual ~CompactListItem() {}; | ^ ~~ | = default include/DLList_impl.hpp:32:7: warning: class 'DLList' 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] 32 | class DLList | ^ include/DLList_impl.hpp:36:9: warning: use default member initializer for 'num_elements' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 36 | int num_elements; | ^ | { 0 } include/DLList_impl.hpp:42:8: warning: use default member initializer for 'first_element' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 42 | T* first_element; | ^ | { nullptr } 43 | T* last_element; 44 | 45 | using MemPool = crts::SingletonPool; 46 | 47 | void unlink_element(T*); 48 | T* link_element(T*); 49 | 50 | public: 51 | 52 | DLList(): 53 | num_elements{ 0 }, 54 | first_element{ nullptr }, | ~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:43:8: warning: use default member initializer for 'last_element' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 43 | T* last_element; | ^ | { nullptr } 44 | 45 | using MemPool = crts::SingletonPool; 46 | 47 | void unlink_element(T*); 48 | T* link_element(T*); 49 | 50 | public: 51 | 52 | DLList(): 53 | num_elements{ 0 }, 54 | first_element{ nullptr }, 55 | last_element{ nullptr } {}; | ~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:47:27: warning: all parameters should be named in a function [readability-named-parameter] 47 | void unlink_element(T*); | ^ | /*element*/ include/DLList_impl.hpp:48:23: warning: all parameters should be named in a function [readability-named-parameter] 48 | T* link_element(T*); | ^ | /*new_element*/ include/DLList_impl.hpp:70:16: warning: all parameters should be named in a function [readability-named-parameter] 70 | T* create(Q); | ^ | /*par1*/ include/DLList_impl.hpp:72:16: warning: all parameters should be named in a function [readability-named-parameter] 72 | T* create(Q, R); | ^ | /*par1*/ /*par2*/ include/DLList_impl.hpp:74:16: warning: all parameters should be named in a function [readability-named-parameter] 74 | T* create(Q, R, S); | ^ | /*par1*/ /*par2*/ /*par3*/ include/DLList_impl.hpp:75:19: warning: all parameters should be named in a function [readability-named-parameter] 75 | void remove(T*); | ^ | /*element*/ include/DLList_impl.hpp:77:49: warning: all parameters should be named in a function [readability-named-parameter] 77 | void import(DLList&, T*); | ^ | /*old_list*/ /*element*/ include/DLList_impl.hpp:78:53: warning: all parameters should be named in a function [readability-named-parameter] 78 | void import_set(DLList&, T*, T*); | ^ | /*old_list*/ /*first_element*/ /*last_element*/ include/DLList_impl.hpp:137:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 137 | return; | ^~~~~~~ 138 | } include/DLList_impl.hpp:154:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 154 | T* new_element = new (MemPool::malloc()) T(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:162:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 162 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:170:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 170 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:178:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 178 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:196:8: warning: variable 'temp' is not initialized [cppcoreguidelines-init-variables] 196 | T* temp; | ^ | = nullptr include/DLList_impl.hpp:211:7: warning: class 'DLBaseItem' 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] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: the implicit default constructor of the CRTP is publicly accessible; consider making it private and declaring the derived class as friend [bugprone-crtp-constructor-accessibility] 211 | class DLBaseItem | ^ 212 | { | include/DLList_impl.hpp:226:13: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] 226 | virtual ~DLBaseItem() {}; | ^ ~~ | = default include/det_queue.hpp:14:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 14 | System* const system; // pointer to containing system | ^ include/det_queue.hpp:14:19: warning: member variable 'system' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes] include/det_queue.hpp:17:12: warning: method 'current_pos' can be made const [readability-make-member-function-const] 17 | double current_pos() | ^ | const include/det_queue.hpp:25:63: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 25 | double progression(int cache_pos) { return current_base - value_cache[cache_pos]; } | ^ include/det_queue.hpp:48:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 48 | double value_cache[POSITION_CACHE_SIZE]; // cache of previous 'distance' values | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/det_queue.hpp:49:29: warning: member 'distance_time_conversion_function' of type 'double (System::*const)(double)' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 49 | double (System::* const distance_time_conversion_function)(double); | ^ include/det_queue.hpp:51:29: warning: member 'time_distance_conversion_function' of type 'double (System::*const)(double)' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 51 | double (System::* const time_distance_conversion_function)(double); | ^ include/edge.hpp:31:9: warning: 'exclude_point' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | : exclude_point(0) 30 | { 31 | exclude_point = 0; | ^~~~~~~~~~~~~~~~~~ include/edge.hpp:33:9: warning: 'p_cat' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , p_cat(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; | ^~~~~~~~~~~~ include/edge.hpp:34:9: warning: 'edg_ang_norm' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , edg_ang_norm(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; | ^~~~~~~~~~~~~~~~~~~ include/edge.hpp:35:9: warning: 'xy_rotation_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , xy_rotation_angle(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; 35 | xy_rotation_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~~~~~ include/edge.hpp:36:9: warning: 'edg_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , edg_angle(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; 35 | xy_rotation_angle = 0.0; 36 | edg_angle = 0.0; | ^~~~~~~~~~~~~~~~ include/edge.hpp:37:9: warning: 'edg_bend_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , edg_bend_angle(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; 35 | xy_rotation_angle = 0.0; 36 | edg_angle = 0.0; 37 | edg_bend_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~~ include/event.hpp:7:7: warning: class 'EventDescriptor' 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] 7 | class EventDescriptor | ^ include/event.hpp:20:24: warning: member 'mt' of type 'Microtubule *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | Microtubule* const mt; | ^ include/geometry.hpp:10:7: warning: class 'Geometry' 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] 10 | class Geometry | ^ include/geometry.hpp:20:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | System* const system; | ^ include/geometry.hpp:28:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 28 | double patch_area[3]; | ^~~~~~~~~~~~~~~~~~~~ include/geometry.hpp:29:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 29 | std::vector regions_index[3]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/geometry.hpp:35:5: warning: constructor does not initialize these fields: areain_mesh, area_ppb, patch_area, element_max [cppcoreguidelines-pro-type-member-init] 19 | double area_ppb; | | {} 20 | std::vector ppb; 21 | 22 | double patch_area[3]; | | {} 23 | std::vector regions_index[3]; 24 | 25 | int element_max; | | {} 26 | Eigen::Vector3d object_cm, object_pa, nucleous_position; 27 | std::vector regions; 28 | 29 | Geometry(System* s, double a): | ^ include/geometry.hpp:39:9: warning: use range-based for loop instead [modernize-loop-convert] 39 | for (int i = 0; i < 3; i++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~ | (double & i : patch_area) 40 | { 41 | patch_area[i] = 0.0; | ~~~~~~~~~~~~~ | i include/geometry.hpp:41:13: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 41 | patch_area[i] = 0.0; | ^ include/geometry.hpp:46:27: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 46 | virtual ~Geometry() { return; }; | ^~~~~~~ include/geometry.hpp:51:40: warning: all parameters should be named in a function [readability-named-parameter] 51 | void call_translator(SurfaceVector&, int, int); | ^ | /*s_vec*/ /*region_index*/ /*region_index_neigh*/ include/geometry.hpp:58:60: warning: all parameters should be named in a function [readability-named-parameter] 58 | TrajectoryVector create_trajectory(const SurfaceVector&); | ^ | /*s_vec*/ include/geometry.hpp:62:69: warning: all parameters should be named in a function [readability-named-parameter] 62 | TrajectoryVector create_and_link_trajectory(const SurfaceVector&, Trajectory*, Direction, double, double); | ^ | /*new_base*/ /*oldtr*/ /*olddir*/ /*cos_angle*/ /*p_cat*/ include/geometry.hpp:76:28: warning: all parameters should be named in a function [readability-named-parameter] 76 | TriMeshGeometry(System*); | ^ | /*s*/ include/geometry.hpp:77:22: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 77 | TrajectoryVector extend_trajectory(Trajectory*, Direction); | ^ | override include/geometry.hpp:77:22: warning: visibility of function 'extend_trajectory' is changed from private in class 'Geometry' to public [misc-override-with-different-visibility] include/geometry.hpp:69:30: note: function declared here as private 69 | virtual TrajectoryVector extend_trajectory(Trajectory*, Direction) = 0; | ^ include/geometry.hpp:77:51: warning: all parameters should be named in a function [readability-named-parameter] 77 | TrajectoryVector extend_trajectory(Trajectory*, Direction); | ^ | /*oldtr*/ /*dir*/ include/geometry.hpp:78:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 78 | void get_order_parameters(OrderParameters&); | ^ | override include/geometry.hpp:78:47: warning: all parameters should be named in a function [readability-named-parameter] 78 | void get_order_parameters(OrderParameters&); | ^ | /*op*/ include/geometry.hpp:79:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 79 | void output_snapshot(std::ostream&); | ^ | override include/geometry.hpp:79:39: warning: all parameters should be named in a function [readability-named-parameter] 79 | void output_snapshot(std::ostream&); | ^ | /*out*/ include/geometry.hpp:80:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 80 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | override include/geometry.hpp:80:45: warning: all parameters should be named in a function [readability-named-parameter] 80 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | /*out*/ /*local_order*/ /*sv*/ include/intersection.hpp:6:7: warning: constructor does not initialize these fields: occupancy, other_trajectory, occupied_list_ptr [cppcoreguidelines-pro-type-member-init] 6 | class Intersection | ^ 7 | // this object describes the intersection of one trajectory with another, from 8 | // one side. since it is created twice for every intersection, it is by far the 9 | // most memory-intensive object and should be kept as small as possible 10 | { 11 | public: 12 | 13 | int occupancy; | | {} 14 | Trajectory* other_trajectory; | | {} 15 | IntersectionItr mirror; 16 | #ifdef CROSS_SEV 17 | OccupiedIntersection* occupied_list_ptr; | | {} include/intersection.hpp:33:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | : x(x1) 32 | { 33 | x = x1; | ^~~~~~~ include/intersection.hpp:34:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , y(y1) 32 | { 33 | x = x1; 34 | y = y1; | ^~~~~~~ include/intersection.hpp:35:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , z(z1) 32 | { 33 | x = x1; 34 | y = y1; 35 | z = z1; | ^~~~~~~ include/intersection.hpp:36:9: warning: 'next_element' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , next_element(n1) 32 | { 33 | x = x1; 34 | y = y1; 35 | z = z1; 36 | next_element = n1; | ^~~~~~~~~~~~~~~~~~ include/measurement.hpp:34:41: warning: parameter 2 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 | std::ostream& operator<<(std::ostream&, const Measurement); | ^~~~~ include/mesh.hpp:37:9: warning: 'element_id' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | : element_id(0) 36 | { 37 | element_id = 0; | ^~~~~~~~~~~~~~~ include/mesh.hpp:38:9: warning: 'edge_tag' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | , edge_tag(0) 36 | { 37 | element_id = 0; 38 | edge_tag = 0; | ^~~~~~~~~~~~~ include/mesh.hpp:39:9: warning: 'face_tag' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | , face_tag(1) 36 | { 37 | element_id = 0; 38 | edge_tag = 0; 39 | face_tag = 1; | ^~~~~~~~~~~~~ include/mesh.hpp:40:9: warning: 'poly_intersect_mark' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | , poly_intersect_mark(0) 36 | { 37 | element_id = 0; 38 | edge_tag = 0; 39 | face_tag = 1; 40 | poly_intersect_mark = 0; | ^~~~~~~~~~~~~~~~~~~~~~~~ include/mesh.hpp:41:9: warning: 'periodic_tag' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | , periodic_tag(0) 36 | { 37 | element_id = 0; 38 | edge_tag = 0; 39 | face_tag = 1; 40 | poly_intersect_mark = 0; 41 | periodic_tag = 0; | ^~~~~~~~~~~~~~~~~ include/mesh.hpp:43:9: warning: 'area' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | , area(0.000001) 36 | { 37 | element_id = 0; 38 | edge_tag = 0; 39 | face_tag = 1; 40 | poly_intersect_mark = 0; 41 | periodic_tag = 0; 42 | 43 | area = 0.000001; | ^~~~~~~~~~~~~~~~ include/mesh.hpp:44:9: warning: 'peri_meter' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | , peri_meter(0.000001) 36 | { 37 | element_id = 0; 38 | edge_tag = 0; 39 | face_tag = 1; 40 | poly_intersect_mark = 0; 41 | periodic_tag = 0; 42 | 43 | area = 0.000001; 44 | peri_meter = 0.000001; | ^~~~~~~~~~~~~~~~~~~~~~ include/mesh.hpp:45:9: warning: 'edg_ang_norm' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | , edg_ang_norm(0.000001) 36 | { 37 | element_id = 0; 38 | edge_tag = 0; 39 | face_tag = 1; 40 | poly_intersect_mark = 0; 41 | periodic_tag = 0; 42 | 43 | area = 0.000001; 44 | peri_meter = 0.000001; 45 | edg_ang_norm = 0.000001; | ^~~~~~~~~~~~~~~~~~~~~~~~ include/mesh.hpp:46:9: warning: 'pcat_edge_weight' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | , pcat_edge_weight(0.000001) 36 | { 37 | element_id = 0; 38 | edge_tag = 0; 39 | face_tag = 1; 40 | poly_intersect_mark = 0; 41 | periodic_tag = 0; 42 | 43 | area = 0.000001; 44 | peri_meter = 0.000001; 45 | edg_ang_norm = 0.000001; 46 | pcat_edge_weight = 0.000001; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/mesh.hpp:52:18: warning: use emplace_back instead of push_back [modernize-use-emplace] 52 | side.push_back(Edge()); | ^~~~~~~~~~~~~~~~ | emplace_back( include/mesh.hpp:54:20: warning: use emplace_back instead of push_back [modernize-use-emplace] 54 | vertex.push_back(Eigen::Vector3d(0, 0, 0)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~ | emplace_back( include/mesh.hpp:79:9: warning: 'cur' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 77 | EdgeOfficer(int c) | | : cur(c) 78 | { 79 | cur = c; | ^~~~~~~~ include/mesh.hpp:80:9: warning: 'mean_edg_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 77 | EdgeOfficer(int c) | | , mean_edg_angle(0.0) 78 | { 79 | cur = c; 80 | mean_edg_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~~ include/mesh.hpp:83:28: warning: use emplace_back instead of push_back [modernize-use-emplace] 83 | edgeface_store.push_back(std::vector()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | emplace_back( include/mesh.hpp:98:71: warning: do not declare C-style arrays, use 'std::span' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 98 | void image_3d_to_2d(std::vector&, std::vector&, double[]); | ^~~~~~~~ include/microtubule.hpp:10:7: warning: class 'Microtubule' 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] 10 | class Microtubule: public DLBaseItem | ^ include/microtubule.hpp:14:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 14 | System* const system; | ^ include/microtubule.hpp:31:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 31 | ~Microtubule(); | ^ | override include/mt_tip.hpp:7:7: warning: class 'MTTip' 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] 7 | class MTTip | ^ include/parameters.hpp:105:3: warning: redundant access specifier has the same accessibility as the previous access specifier [readability-redundant-access-specifiers] 105 | public: | ^~~~~~~ include/parameters.hpp:42:3: note: previously declared here 42 | public: | ^ include/parameters.hpp:119:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 119 | double rdirector[3]; | ^~~~~~~~~~~~~~~~~~~ include/parameters.hpp:139:5: warning: constructor does not initialize these fields: local_order [cppcoreguidelines-pro-type-member-init] 136 | double local_order; | | {} 137 | Eigen::Vector3d sv; 138 | 139 | OrderParametersRaw(void) | ^ include/parameters.hpp:139:24: warning: redundant void argument list in function definition [modernize-redundant-void-arg] 139 | OrderParametersRaw(void) | ^~~~ include/parameters.hpp:141:9: warning: 'local_l' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | : local_l(0.) 140 | { 141 | local_l = 0.; | ^~~~~~~~~~~~~ include/parameters.hpp:142:9: warning: 'local_l_opt' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , local_l_opt(0.) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; | ^~~~~~~~~~~~~~~~~ include/parameters.hpp:143:9: warning: 'qxx' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxx(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; | ^~~~~~~~ include/parameters.hpp:144:9: warning: 'qxy' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxy(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; | ^~~~~~~~ include/parameters.hpp:145:9: warning: 'qxz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; | ^~~~~~~~ include/parameters.hpp:146:9: warning: 'qyy' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qyy(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; | ^~~~~~~~ include/parameters.hpp:147:9: warning: 'qyz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qyz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; 147 | qyz = 0; | ^~~~~~~~ include/parameters.hpp:148:9: warning: 'qzz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qzz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; 147 | qyz = 0; 148 | qzz = 0; | ^~~~~~~~ include/parameters.hpp:152:9: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 152 | return; | ^~~~~~~ 153 | } include/parameters.hpp:155:22: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 155 | double extract_r(double director[3], std::string geometry) | ^~~~~~~~~~~~~~~~~~ include/parameters.hpp:155:54: warning: the parameter 'geometry' of type 'std::string' (aka 'basic_string') is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 155 | double extract_r(double director[3], std::string geometry) | ^ | const & include/parameters.hpp:178:40: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 178 | director[i] = evec_mat(i, max_pos); | ^ include/parameters.hpp:195:40: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 195 | director[i] = evec_mat(i, min_pos); | ^ include/parameters.hpp:199:16: warning: redundant parentheses around expression [readability-redundant-parentheses] 199 | return (sel_eigen_val); | ^ ~ include/region.hpp:9:7: warning: class 'Region' 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] 9 | class Region | ^ include/region.hpp:20:21: warning: member 'geometry' of type 'Geometry *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | Geometry* const geometry; | ^ include/region.hpp:24:12: warning: use default member initializer for 'total_length' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 24 | double total_length; | ^ | {0} include/region.hpp:26:9: warning: use default member initializer for 'previous_update_tag' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 26 | int previous_update_tag; | ^ | {0} include/region.hpp:27:9: warning: use default member initializer for 'region_id' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 27 | int region_id; | ^ | {0} include/region.hpp:28:12: warning: use default member initializer for 'z_offset' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 28 | double z_offset; | ^ | {0.0} include/region.hpp:29:12: warning: use default member initializer for 'rot_angle' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 29 | double rot_angle; | ^ | {0.0} include/region.hpp:30:12: warning: use default member initializer for 'peri_meter' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 30 | double peri_meter; | ^ | {0.0} include/region.hpp:55:5: warning: constructor does not initialize these fields: face_tag, poly_intersect_mark [cppcoreguidelines-pro-type-member-init] 38 | Region(Geometry* g, double a): | ^ include/region.hpp:68:22: warning: use emplace_back instead of push_back [modernize-use-emplace] 68 | vertices.push_back(Eigen::Vector2d(0, 0)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~ | emplace_back( include/region.hpp:69:18: warning: use emplace_back instead of push_back [modernize-use-emplace] 69 | side.push_back(Edge()); | ^~~~~~~~~~~~~~~~ | emplace_back( include/region.hpp:73:25: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 73 | virtual ~Region() { return; }; | ^~~~~~~ include/region.hpp:78:51: warning: parameter 2 is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls] 78 | virtual void translate_vector(SurfaceVector&, const double) = 0; | ^~~~~ include/region.hpp:104:24: warning: all parameters should be named in a function [readability-named-parameter] 104 | Cartesian(Geometry*, double); | ^ | /*g*/ /*a*/ include/region.hpp:106:27: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 106 | virtual SurfaceVector random_surface_vector() = 0; | ~~~~~~~ ^ | override include/region.hpp:106:27: warning: visibility of function 'random_surface_vector' is changed from protected in class 'Region' to public [misc-override-with-different-visibility] include/region.hpp:90:27: note: function declared here as protected 90 | virtual SurfaceVector random_surface_vector() = 0; | ^ include/region.hpp:107:18: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 107 | virtual void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&) = 0; | ~~~~~~~ ^ | override include/region.hpp:107:59: warning: all parameters should be named in a function [readability-named-parameter] 107 | virtual void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&) = 0; | ^ | /*unused*/ /*unused*/ /*unused*/ /*unused*/ include/region.hpp:108:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 108 | void make_intersection_list(Trajectory*); | ^ | override include/region.hpp:108:10: warning: visibility of function 'make_intersection_list' is changed from protected in class 'Region' to public [misc-override-with-different-visibility] include/region.hpp:89:18: note: function declared here as protected 89 | virtual void make_intersection_list(Trajectory*) = 0; | ^ include/region.hpp:108:44: warning: all parameters should be named in a function [readability-named-parameter] 108 | void make_intersection_list(Trajectory*); | ^ | /*tr1*/ include/region.hpp:109:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 109 | void translate_vector(SurfaceVector&, const double); | ^ | override include/region.hpp:109:41: warning: all parameters should be named in a function [readability-named-parameter] 109 | void translate_vector(SurfaceVector&, const double); | ^ | /*s_vec*/ /*dist*/ include/region.hpp:109:43: warning: parameter 2 is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls] 109 | void translate_vector(SurfaceVector&, const double); | ^~~~~ include/region.hpp:110:12: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 110 | double intersection_angle(Trajectory*, Trajectory*); | ^ | override include/region.hpp:110:42: warning: all parameters should be named in a function [readability-named-parameter] 110 | double intersection_angle(Trajectory*, Trajectory*); | ^ | /*t1*/ /*t2*/ include/region.hpp:113:59: warning: all parameters should be named in a function [readability-named-parameter] 113 | void get_order_parameters_raw_flat(OrderParametersRaw&, std::vector&, double); | ^ | /*op_r*/ /*orientation*/ /*area*/ include/region.hpp:116:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 116 | void output_snapshot(std::ostream&); | ^ | override include/region.hpp:116:39: warning: all parameters should be named in a function [readability-named-parameter] 116 | void output_snapshot(std::ostream&); | ^ | /*out*/ include/region.hpp:117:46: warning: all parameters should be named in a function [readability-named-parameter] 117 | void output_snapshot_offset(std::ostream&, double, double); | ^ | /*out*/ /*x_offset*/ /*y_offset*/ include/region.hpp:119:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 119 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | override include/region.hpp:119:45: warning: all parameters should be named in a function [readability-named-parameter] 119 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | /*out*/ /*local_order*/ /*sv*/ include/region.hpp:126:20: warning: all parameters should be named in a function [readability-named-parameter] 126 | Triangle(double, Geometry*); | ^ | /*element_area*/ /*g*/ include/region.hpp:128:19: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 128 | SurfaceVector random_surface_vector(); | ^ | override include/region.hpp:129:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 129 | void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&); | ^ | override include/region.hpp:129:51: warning: all parameters should be named in a function [readability-named-parameter] 129 | void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&); | ^ | /*s_vec*/ /*total_length*/ /*end_point*/ /*t_vec*/ include/segment.hpp:7:7: warning: class 'Segment' 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] 7 | class Segment: public DLBaseItem | ^ include/segment.hpp:12:23: warning: member 'trajectory' of type 'Trajectory *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 12 | Trajectory* const trajectory; | ^ include/segment.hpp:27:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 27 | ~Segment(); | ^ | override include/segment.hpp:29:12: warning: method 'length' can be made const [readability-make-member-function-const] 29 | double length() { return std::abs(end - start); } | ^ | const include/surface.hpp:16:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | : x(x1) 15 | { 16 | x = x1; | ^~~~~~~ include/surface.hpp:17:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | , y(y1) 15 | { 16 | x = x1; 17 | y = y1; | ^~~~~~~ include/surface.hpp:18:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | , z(z1) 15 | { 16 | x = x1; 17 | y = y1; 18 | z = z1; | ^~~~~~~ include/surface.hpp:32:9: warning: 'cos_theta' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 30 | BendingOperator() | | : cos_theta(0.0) 31 | { 32 | cos_theta = 0.0; | ^~~~~~~~~~~~~~~~ include/surface.hpp:33:9: warning: 'sin_theta' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 30 | BendingOperator() | | , sin_theta(0.0) 31 | { 32 | cos_theta = 0.0; 33 | sin_theta = 0.0; | ^~~~~~~~~~~~~~~~ include/surface.hpp:49:5: warning: constructor does not initialize these fields: region [cppcoreguidelines-pro-type-member-init] 47 | Region* region; | | {} 48 | 49 | SurfaceVector() | ^ include/surface.hpp:51:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | : x(0.0) 50 | { 51 | x = 0.0; | ^~~~~~~~ include/surface.hpp:52:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , y(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; | ^~~~~~~~ include/surface.hpp:53:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , z(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; | ^~~~~~~~ include/surface.hpp:55:9: warning: 'angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , angle(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; 54 | 55 | angle = 0.0; | ^~~~~~~~~~~~ include/surface.hpp:56:9: warning: 'tv_pos' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , tv_pos(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; 54 | 55 | angle = 0.0; 56 | tv_pos = 0.0; | ^~~~~~~~~~~~~ include/surface.hpp:56:16: warning: 1 uninitialized field at the end of the constructor call [clang-analyzer-optin.cplusplus.UninitializedObject] 56 | tv_pos = 0.0; | ^ include/surface.hpp:47:13: note: uninitialized pointer 'this->region' 47 | Region* region; | ^~~~~~ src/geometry.cpp:606:5: note: Calling 'Cartesian::output_snapshot_offset' 606 | Cartesian::output_snapshot_offset(out, 0.0, 0.0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/geometry.cpp:628:19: note: Calling default constructor for 'SurfaceVector' 628 | SurfaceVector svec; | ^~~~ include/surface.hpp:56:16: note: 1 uninitialized field at the end of the constructor call 56 | tv_pos = 0.0; | ^ include/surface.hpp:73:9: warning: 'mid_point' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | : mid_point(0) 72 | { 73 | mid_point = 0; | ^~~~~~~~~~~~~~ include/surface.hpp:74:9: warning: 'length' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | , length(0.0) 72 | { 73 | mid_point = 0; 74 | length = 0.0; | ^~~~~~~~~~~~~ include/surface.hpp:75:9: warning: 'edge_3d_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | , edge_3d_angle(0.0) 72 | { 73 | mid_point = 0; 74 | length = 0.0; 75 | edge_3d_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~ include/system.hpp:14:7: warning: class 'System' 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] 14 | class System | ^ include/system.hpp:70:12: warning: method 'identity' can be made static [readability-convert-member-functions-to-static] 70 | double identity(double i) { return i; } | ^ | static include/system.hpp:115:21: warning: redundant void argument list in function declaration [modernize-redundant-void-arg] 115 | void next_event(void); | ^~~~ include/system.hpp:138:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 138 | double binomial_table[MAXBINOM][MAXBINOM]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/system.hpp:139:30: warning: redundant void argument list in function declaration [modernize-redundant-void-arg] 139 | void make_binomial_table(void); | ^~~~ include/trajectory.hpp:16:5: warning: constructor does not initialize these fields: cdir [cppcoreguidelines-pro-type-member-init] 16 | TrajectoryVector(double p, Direction d, Trajectory* t): | ^ include/trajectory.hpp:23:5: warning: constructor does not initialize these fields: pos, dir, cdir, trajectory [cppcoreguidelines-pro-type-member-init] 12 | double pos; | | {} 13 | Direction dir, cdir; 14 | Trajectory* trajectory; | | {} 15 | 16 | TrajectoryVector(double p, Direction d, Trajectory* t): 17 | pos(p), 18 | dir(d), 19 | trajectory(t) 20 | { 21 | } 22 | 23 | TrajectoryVector() {} | ^ include/trajectory.hpp:23:5: warning: use '= default' to define a trivial default constructor [modernize-use-equals-default] 23 | TrajectoryVector() {} | ^ ~~ | = default; include/trajectory.hpp:25:22: warning: method 'flipped' can be made const [readability-make-member-function-const] 25 | TrajectoryVector flipped() | ^ | const include/trajectory.hpp:27:16: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] 27 | return TrajectoryVector(pos, dir == Direction::FORWARD ? Direction::BACKWARD : Direction::FORWARD, trajectory); | ^~~~~~~~~~~~~~~~~ ~ | { } include/trajectory.hpp:31:7: warning: class 'Trajectory' 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] 31 | class Trajectory: public DLBaseItem | ^ include/trajectory.hpp:40:25: warning: member 'base' of type 'const SurfaceVector' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 40 | const SurfaceVector base; | ^ include/trajectory.hpp:41:18: warning: member 'length' of type 'const double' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 41 | const double length; | ^ include/trajectory.hpp:82:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 82 | ~Trajectory(); | ^ | override include/types.hpp:40:9: warning: macro 'PROGRAM_VERSION' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] 40 | #define PROGRAM_VERSION "BC.2018" | ^ include/types.hpp:88:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 88 | extern std::string direction_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:132:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 132 | extern std::string nucleation_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:141:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 141 | extern std::string interaction_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:153:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 153 | extern std::string bundle_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/geometry.cpp:6:1: warning: included header mt_tip.hpp is not used directly [misc-include-cleaner] 6 | #include "mt_tip.hpp" | ^~~~~~~~~~~~~~~~~~~~~ 7 | #include "parameters.hpp" src/geometry.cpp:10:32: warning: no header providing "SurfaceVector" is directly included [misc-include-cleaner] 3 | #include "trajectory.hpp" 4 | #include "region.hpp" 5 | #include "system.hpp" 6 | #include "mt_tip.hpp" 7 | #include "parameters.hpp" 8 | #include "linalg.hpp" 9 | 10 | void Geometry::call_translator(SurfaceVector& s_vec, int region_index, int region_index_neigh) | ^ src/geometry.cpp:12:5: warning: variable 'index1' of type 'int' can be declared 'const' [misc-const-correctness] 12 | int index1(regions[region_index]->side_rev_map[region_index_neigh]); | ^ | const src/geometry.cpp:15:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 15 | Eigen::Vector2d v1(s_vec.x, s_vec.y), v2; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/geometry.cpp:15:5: warning: variable 'v1' of type 'Eigen::Vector2d' (aka 'Matrix') can be declared 'const' [misc-const-correctness] src/geometry.cpp:15:12: warning: no header providing "Eigen::Vector2d" is directly included [misc-include-cleaner] 1 | #include "mesh.hpp" 2 | #include "geometry.hpp" 3 | #include "trajectory.hpp" 4 | #include "region.hpp" 5 | #include "system.hpp" 6 | #include "mt_tip.hpp" 7 | #include "parameters.hpp" 8 | #include "linalg.hpp" 9 | 10 | void Geometry::call_translator(SurfaceVector& s_vec, int region_index, int region_index_neigh) 11 | { 12 | int index1(regions[region_index]->side_rev_map[region_index_neigh]); 13 | 14 | // use affine transformation of triangle to map a point from one region to other region 15 | Eigen::Vector2d v1(s_vec.x, s_vec.y), v2; | ^ src/geometry.cpp:22:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 22 | return; | ^~~~~~~ 23 | } src/geometry.cpp:25:28: warning: method 'create_trajectory' can be made static [readability-convert-member-functions-to-static] 25 | TrajectoryVector Geometry::create_trajectory(const SurfaceVector& s_vec) | ^ src/geometry.cpp:32:51: warning: no header providing "Direction" is directly included [misc-include-cleaner] 9 | const SurfaceVector& new_base, Trajectory* oldtr, Direction olddir, double cos_angle, double p_cat) | ^ src/geometry.cpp:97:13: warning: variable 'rand_gen' of type 'double' can be declared 'const' [misc-const-correctness] 97 | double rand_gen = system->random_gen.rand(); | ^ | const src/geometry.cpp:108:50: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 108 | r_area = system->random_gen.rand_dbl_exc(patch_area[domain_type]); | ^ src/geometry.cpp:110:28: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 110 | if (r_area < 0.5 * patch_area[domain_type]) | ^ src/geometry.cpp:113:37: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 113 | while (r_area > regions[regions_index[domain_type][region_selector]]->area) | ^ src/geometry.cpp:115:35: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 115 | r_area -= regions[regions_index[domain_type][region_selector++]]->area; | ^ src/geometry.cpp:129:31: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 129 | region_selector = regions_index[domain_type].size() - 1; | ^ src/geometry.cpp:129:31: warning: narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] src/geometry.cpp:130:22: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 130 | r_area = patch_area[domain_type] - r_area; | ^ src/geometry.cpp:131:37: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 131 | while (r_area > regions[regions_index[domain_type][region_selector]]->area) | ^ src/geometry.cpp:133:35: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 133 | r_area -= regions[regions_index[domain_type][region_selector--]]->area; | ^ src/geometry.cpp:146:20: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 146 | return regions[regions_index[domain_type][region_selector]]->random_surface_vector(); | ^ src/geometry.cpp:157:5: warning: use range-based for loop instead [modernize-loop-convert] 157 | for (size_t ridx = 0; ridx < regions.size(); ridx++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (auto & region : regions) 158 | { 159 | plus_grow_count += regions[ridx]->growing_plus_tip_list.size(); | ~~~~~~~~~~~~~ | region 160 | plus_shrink_count += regions[ridx]->shrinking_plus_tip_list.size(); | ~~~~~~~~~~~~~ | region 161 | minus_count += regions[ridx]->minus_tip_list.size(); | ~~~~~~~~~~~~~ | region 162 | tptr = regions[ridx]->trajectories.first(); | ~~~~~~~~~~~~~ | region src/geometry.cpp:157:10: warning: no header providing "size_t" is directly included [misc-include-cleaner] 9 | for (size_t ridx = 0; ridx < regions.size(); ridx++) | ^ src/geometry.cpp:159:28: warning: narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 159 | plus_grow_count += regions[ridx]->growing_plus_tip_list.size(); | ^ src/geometry.cpp:160:30: warning: narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 160 | plus_shrink_count += regions[ridx]->shrinking_plus_tip_list.size(); | ^ src/geometry.cpp:161:24: warning: narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 161 | minus_count += regions[ridx]->minus_tip_list.size(); | ^ src/geometry.cpp:176:14: warning: no header providing "std::cerr" is directly included [misc-include-cleaner] 9 | std::cerr << "Integrity check failed: unequal number of plus and minus ends registered on regions\n"; | ^ src/geometry.cpp:215:5: warning: use range-based for loop instead [modernize-loop-convert] 215 | for (size_t ridx = 0; ridx < regions.size(); ridx++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (auto & region : regions) 216 | { 217 | sum += regions[ridx]->optical_length(); | ~~~~~~~~~~~~~ | region src/geometry.cpp:227:5: warning: use range-based for loop instead [modernize-loop-convert] 227 | for (size_t ridx = 0; ridx < regions.size(); ridx++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (auto & region : regions) 228 | { 229 | sum += regions[ridx]->trajectories.size(); | ~~~~~~~~~~~~~ | region src/geometry.cpp:241:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 241 | return; | ^~~~~~~ 242 | } src/geometry.cpp:251:9: warning: do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead [cppcoreguidelines-pro-type-static-cast-downcast] 251 | static_cast(regions[eno]) | ^~~~~~~~~~~ | dynamic_cast src/geometry.cpp:271: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] 271 | op.r = op_raw.extract_r(op.rdirector, system->p.geometry); | ^ src/geometry.cpp:274:12: warning: no header providing "Eigen::Vector3d" is directly included [misc-include-cleaner] 274 | Eigen::Vector3d rvec(op.rdirector[0], op.rdirector[1], op.rdirector[2]); | ^ src/geometry.cpp:281:17: warning: no header providing "std::fabs" is directly included [misc-include-cleaner] 9 | op.c = std::fabs(op.rdirector[2]) | ^ src/geometry.cpp:282:25: warning: no header providing "std::sqrt" is directly included [misc-include-cleaner] 282 | - 0.5 * std::sqrt(op.rdirector[0] * op.rdirector[0] + op.rdirector[1] * op.rdirector[1]); | ^ src/geometry.cpp:284:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 284 | return; | ^~~~~~~ 285 | } src/geometry.cpp:287:44: warning: no header providing "std::ostream" is directly included [misc-include-cleaner] 9 | void TriMeshGeometry::output_snapshot(std::ostream& out) | ^ src/geometry.cpp:295:17: warning: no header providing "std::endl" is directly included [misc-include-cleaner] 295 | out << std::endl; | ^ src/geometry.cpp:297:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 297 | return; | ^~~~~~~ 298 | } src/geometry.cpp:301:50: warning: no header providing "std::vector" is directly included [misc-include-cleaner] 9 | std::vector& local_order, | ^ src/geometry.cpp:309:9: warning: variable 'sv_length' of type 'double' can be declared 'const' [misc-const-correctness] 309 | double sv_length = (2.0 * regions[eno]->area * regions[eno]->area) / regions[eno]->peri_meter; | ^ | const src/geometry.cpp:312:9: warning: variable 'cross' of type 'Eigen::Vector3d' (aka 'Matrix') can be declared 'const' [misc-const-correctness] 312 | Eigen::Vector3d cross(regions[eno]->q.x(), regions[eno]->q.y(), regions[eno]->q.z()); | ^ | const src/geometry.cpp:313:9: warning: variable 'cross_magnitude' of type 'double' can be declared 'const' [misc-const-correctness] 313 | double cross_magnitude = cross.norm(); | ^ | const src/geometry.cpp:315:9: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 315 | Eigen::Quaternion qr_1(0.0, 0.0, 0.0, 0.0), qr_2(0.0, 0.0, 0.0, 0.0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/geometry.cpp:315:16: warning: no header providing "Eigen::Quaternion" is directly included [misc-include-cleaner] 1 | Eigen::Quaternion qr_1(0.0, 0.0, 0.0, 0.0), qr_2(0.0, 0.0, 0.0, 0.0); | ^ src/geometry.cpp:366:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 366 | return; | ^~~~~~~ 367 | } src/geometry.cpp:381:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 381 | int region_index(oldtr->base.region->region_id), region_index_neigh(0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/geometry.cpp:381:5: warning: variable 'region_index' of type 'int' can be declared 'const' [misc-const-correctness] src/geometry.cpp:390:9: warning: variable 't_dx' of type 'double' can be declared 'const' [misc-const-correctness] 390 | double t_dx = oldtr->end_point[1].x - oldtr->end_point[0].x; | ^ | const src/geometry.cpp:391:9: warning: variable 't_dy' of type 'double' can be declared 'const' [misc-const-correctness] 391 | double t_dy = oldtr->end_point[1].y - oldtr->end_point[0].y; | ^ | const src/geometry.cpp:402:9: warning: variable 't_dx' of type 'double' can be declared 'const' [misc-const-correctness] 402 | double t_dx = oldtr->end_point[0].x - oldtr->end_point[1].x; | ^ | const src/geometry.cpp:403:9: warning: variable 't_dy' of type 'double' can be declared 'const' [misc-const-correctness] 403 | double t_dy = oldtr->end_point[0].y - oldtr->end_point[1].y; | ^ | const src/geometry.cpp:425:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 425 | double cos_edge_angle(1.0), p_cat_reg(0.0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/geometry.cpp:426:5: warning: variable 's' of type 'int' can be declared 'const' [misc-const-correctness] 426 | int s(oldtr->base.region->side_rev_map[region_index_neigh]); | ^ | const src/geometry.cpp:429:5: warning: variable 'cos_bending_angle' of type 'double' can be declared 'const' [misc-const-correctness] 429 | double cos_bending_angle(t_director.dot(oldtr->base.region->side[s].dir_2d)); | ^ | const src/geometry.cpp:459:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 459 | return; | ^~~~~~~ 460 | } src/geometry.cpp:491:12: warning: redundant parentheses around expression [readability-redundant-parentheses] 491 | return (angle); | ^ ~ src/geometry.cpp:498:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 498 | double sin2(0.0), cos2(0.0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/geometry.cpp:500:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 500 | double angle(0.0), length(0.0), local_length(0.); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/geometry.cpp:501:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 501 | double qxx(0.0), qxy(0.0), qxz(0.0), qyy(0.0), qyz(0.0), qzz(0.0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/geometry.cpp:502:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 502 | double u1(0.0), u2(0.0), u3(0.0), order_local(0.0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/geometry.cpp:503:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 503 | Eigen::MatrixXd qf(3, 3), qc(3, 3), e(3, 3), o_l(2, 2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/geometry.cpp:503:12: warning: no header providing "Eigen::MatrixXd" is directly included [misc-include-cleaner] 503 | Eigen::MatrixXd qf(3, 3), qc(3, 3), e(3, 3), o_l(2, 2); | ^ src/geometry.cpp:521:31: warning: no header providing "std::sin" is directly included [misc-include-cleaner] 521 | sin2 += length * std::sin(2 * angle); | ^ src/geometry.cpp:522:31: warning: no header providing "std::cos" is directly included [misc-include-cleaner] 522 | cos2 += length * std::cos(2 * angle); | ^ src/geometry.cpp:554:16: warning: no header providing "Eigen::Matrix3d" is directly included [misc-include-cleaner] 554 | Eigen::Matrix3d matrix{ { qxx, qxy, qxz }, { qxy, qyy, qyz }, { qxz, qyz, qzz } }; | ^ src/geometry.cpp:573:16: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 573 | sv[i] = evec_mat(i, max_pos); | ^ src/geometry.cpp:573:30: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 573 | sv[i] = evec_mat(i, max_pos); | ^ src/geometry.cpp:601:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 601 | return; | ^~~~~~~ 602 | } src/geometry.cpp:607:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 607 | return; | ^~~~~~~ 608 | } src/geometry.cpp:610:53: warning: parameter 'out' is unused [misc-unused-parameters] 610 | void Cartesian::output_order_heat_map(std::ostream& out, | ^~~ | /*out*/ src/geometry.cpp:611:60: warning: parameter 'local_order' is unused [misc-unused-parameters] 611 | std::vector& local_order, | ^~~~~~~~~~~ | /*local_order*/ src/geometry.cpp:612:69: warning: parameter 'sv' is unused [misc-unused-parameters] 612 | std::vector& sv) | ^~ | /*sv*/ src/geometry.cpp:614:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 614 | return; | ^~~~~~~ 615 | } src/geometry.cpp:617:66: warning: parameter 'x_offset' is unused [misc-unused-parameters] 617 | void Cartesian::output_snapshot_offset(std::ostream& out, double x_offset, double y_offset) | ^~~~~~~~ | /*x_offset*/ src/geometry.cpp:617:83: warning: parameter 'y_offset' is unused [misc-unused-parameters] 617 | void Cartesian::output_snapshot_offset(std::ostream& out, double x_offset, double y_offset) | ^~~~~~~~ | /*y_offset*/ src/geometry.cpp:622:5: warning: variable 'cross' of type 'Eigen::Vector3d' (aka 'Matrix') can be declared 'const' [misc-const-correctness] 622 | Eigen::Vector3d cross(q.x(), q.y(), q.z()); | ^ | const src/geometry.cpp:623:5: warning: variable 'cross_magnitude' of type 'double' can be declared 'const' [misc-const-correctness] 623 | double cross_magnitude = cross.norm(); | ^ | const src/geometry.cpp:625:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 625 | Eigen::Quaternion qr_1(0.0, 0.0, 0.0, 0.0), qr_2(0.0, 0.0, 0.0, 0.0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/geometry.cpp:627:17: warning: variable 'tr' is not initialized [cppcoreguidelines-init-variables] 627 | Trajectory* tr; | ^ | = nullptr src/geometry.cpp:629:10: warning: no header providing "std::list" is directly included [misc-include-cleaner] 9 | std::list::iterator seg; | ^ src/geometry.cpp:629:15: warning: no header providing "Segment" is directly included [misc-include-cleaner] 3 | std::list::iterator seg; | ^ src/geometry.cpp:693:73: warning: no header providing "cos" is directly included [misc-include-cleaner] 693 | seg_3d << svec.x + mid_point(0, 0) + (**seg).length() * cos(svec.angle), | ^ src/geometry.cpp:704:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 704 | return; | ^~~~~~~ 705 | } src/geometry.cpp:712:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 712 | return; | ^~~~~~~ 713 | } src/geometry.cpp:723:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 723 | double temp1(0.0), temp2(0.0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/geometry.cpp:724:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 724 | double bp1(0.0), bp2(0.0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ src/geometry.cpp:725:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 725 | double cos1(0.0), cos2(0.0), sin1(0.0), sin2(0.0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/geometry.cpp:731:5: warning: no header providing "Intersection" is directly included [misc-include-cleaner] 1 | Intersection is_this; | ^ src/geometry.cpp:733:5: warning: no header providing "IntersectionItr" is directly included [misc-include-cleaner] 733 | IntersectionItr this_itr; | ^ src/geometry.cpp:765:21: warning: boolean expression can be simplified by DeMorgan's theorem [readability-simplify-boolean-expr] 765 | if (!((bp1 < 0) || (bp1 > tr1->length))) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | >= && <= src/geometry.cpp:781:63: warning: no header providing "std::pair" is directly included [misc-include-cleaner] 9 | that_itr = tr2->intersections.insert(std::pair(bp2, is_that)); | ^ src/geometry.cpp:801:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 801 | return; | ^~~~~~~ 802 | } src/geometry.cpp:808:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 808 | return; | ^~~~~~~ 809 | } src/geometry.cpp:814:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 814 | double r1(0.0), r2(0.0); | ^~~~~~~~~~~~~~~~~~~~~~~~ src/geometry.cpp:824:5: warning: variable 'sqr1' of type 'double' can be declared 'const' [misc-const-correctness] 824 | double sqr1 = std::sqrt(r1); | ^ | const src/geometry.cpp:840:55: warning: no header providing "PointAtEdge" is directly included [misc-include-cleaner] 840 | std::vector& end_point, | ^ src/geometry.cpp:844:5: warning: variable 'old_x' of type 'double' can be declared 'const' [misc-const-correctness] 844 | double old_x(s_vec.x); | ^ | const src/geometry.cpp:845:5: warning: variable 'old_y' of type 'double' can be declared 'const' [misc-const-correctness] 845 | double old_y(s_vec.y); | ^ | const src/geometry.cpp:849:5: warning: variable 'angle_cos' of type 'double' can be declared 'const' [misc-const-correctness] 849 | double angle_cos(std::cos(s_vec.angle)); | ^ | const src/geometry.cpp:850:5: warning: variable 'angle_sin' of type 'double' can be declared 'const' [misc-const-correctness] 850 | double angle_sin(std::sin(s_vec.angle)); | ^ | const src/geometry.cpp:853:14: warning: no header providing "std::abs" is directly included [misc-include-cleaner] 9 | if (std::abs(angle_cos) < ZERO_CUTOFF) | ^ src/geometry.cpp:882:5: warning: variable 'v1' of type 'Eigen::Vector2d' (aka 'Matrix') can be declared 'const' [misc-const-correctness] 882 | Eigen::Vector2d v1(s_vec.x + peri_meter * angle_cos, s_vec.y + peri_meter * angle_sin); | ^ | const src/geometry.cpp:883:5: warning: variable 'v2' of type 'Eigen::Vector2d' (aka 'Matrix') can be declared 'const' [misc-const-correctness] 883 | Eigen::Vector2d v2(s_vec.x - peri_meter * angle_cos, s_vec.y - peri_meter * angle_sin); | ^ | const src/geometry.cpp:886:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 886 | int encounter(0), neno(0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ src/geometry.cpp:918:23: warning: use emplace_back instead of push_back [modernize-use-emplace] 918 | end_point.push_back( | ^~~~~~~~~~ | emplace_back( 919 | PointAtEdge(u1(0, 0) + sval * (u2(0, 0) - u1(0, 0)), u1(1, 0) + sval * (u2(1, 0) - u1(1, 0)), 0.0, neno)); | ~~~~~~~~~~~~ ~ src/geometry.cpp:926:9: warning: no header providing "std::reverse" is directly included [misc-include-cleaner] 9 | reverse(end_point.begin(), end_point.end()); | ^ src/geometry.cpp:926:9: warning: use a ranges version of this algorithm [modernize-use-ranges] 3 | reverse(end_point.begin(), end_point.end()); | ^~~~~~~ ~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ | std::ranges::reverse end_point src/geometry.cpp:933:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 933 | double dx(s_vec.x - old_x), dy(s_vec.y - old_y); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/geometry.cpp:944:14: warning: no header providing "std::cout" is directly included [misc-include-cleaner] 944 | std::cout << "Problem with the number of trajectory-triangle intersections (should be == 2) ---> " << encounter | ^ src/geometry.cpp:946:9: warning: no header providing "exit" is directly included [misc-include-cleaner] 946 | exit(-1); | ^ src/geometry.cpp:949:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 949 | return; | ^~~~~~~ 950 | } 56857 warnings generated. Suppressed 56503 warnings (56503 in non-user code). Use -header-filter=.* or leave it as default to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. [ 9/13][72.3s] clang-tidy-22 -p=/home/runner/work/corticalsim/corticalsim/build/debug --config-file=/home/runner/work/corticalsim/corticalsim/.clang-tidy /home/runner/work/corticalsim/corticalsim/src/mesh.cpp include/CompactList_impl.hpp:12:7: warning: class 'CompactList' 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] 12 | class CompactList | ^ include/CompactList_impl.hpp:26:19: warning: all parameters should be named in a function [readability-named-parameter] 26 | void remove(T*); | ^ | /*element*/ include/CompactList_impl.hpp:49:16: warning: all parameters should be named in a function [readability-named-parameter] 49 | T* create(Q); | ^ | /*par1*/ include/CompactList_impl.hpp:51:16: warning: all parameters should be named in a function [readability-named-parameter] 51 | T* create(Q, R); | ^ | /*par1*/ /*par2*/ include/CompactList_impl.hpp:53:16: warning: all parameters should be named in a function [readability-named-parameter] 53 | T* create(Q, R, S); | ^ | /*par1*/ /*par2*/ /*par3*/ include/CompactList_impl.hpp:80:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 80 | return; | ^~~~~~~ 81 | } include/CompactList_impl.hpp:86:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 86 | T* new_element = new (MemPool::malloc()) T(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:94:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 94 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:102:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 102 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:110:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 110 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:145:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 145 | return; | ^~~~~~~ 146 | } include/CompactList_impl.hpp:149:7: warning: class 'CompactListItem' 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] 149 | class CompactListItem | ^ include/CompactList_impl.hpp:149:7: warning: destructor of 'CompactListItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] include/CompactList_impl.hpp:149:7: note: make it protected and non-virtual 149 | class CompactListItem | ^ 150 | { 151 | public: 152 | 153 | CompactListItem(): 154 | index(0) {}; 155 | int index; 156 | 157 | protected: 158 | 159 | virtual ~CompactListItem() {}; | ~~~~~~~ include/CompactList_impl.hpp:153:5: warning: public constructor allows the CRTP to be constructed as a regular template class; consider making it private and declaring the derived class as friend [bugprone-crtp-constructor-accessibility] 153 | CompactListItem(): | ^ 154 | index(0) {}; | 155 | int index; 156 | 157 | protected: 158 | 159 | virtual ~CompactListItem() {}; 160 | template 161 | friend class CompactList; 162 | }; include/CompactList_impl.hpp:155:9: warning: use default member initializer for 'index' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 154 | index(0) {}; | ~~~~~~~~ 155 | int index; | ^ | {0} include/CompactList_impl.hpp:159:13: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] 159 | virtual ~CompactListItem() {}; | ^ ~~ | = default include/DLList_impl.hpp:32:7: warning: class 'DLList' 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] 32 | class DLList | ^ include/DLList_impl.hpp:36:9: warning: use default member initializer for 'num_elements' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 36 | int num_elements; | ^ | { 0 } include/DLList_impl.hpp:42:8: warning: use default member initializer for 'first_element' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 42 | T* first_element; | ^ | { nullptr } 43 | T* last_element; 44 | 45 | using MemPool = crts::SingletonPool; 46 | 47 | void unlink_element(T*); 48 | T* link_element(T*); 49 | 50 | public: 51 | 52 | DLList(): 53 | num_elements{ 0 }, 54 | first_element{ nullptr }, | ~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:43:8: warning: use default member initializer for 'last_element' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 43 | T* last_element; | ^ | { nullptr } 44 | 45 | using MemPool = crts::SingletonPool; 46 | 47 | void unlink_element(T*); 48 | T* link_element(T*); 49 | 50 | public: 51 | 52 | DLList(): 53 | num_elements{ 0 }, 54 | first_element{ nullptr }, 55 | last_element{ nullptr } {}; | ~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:47:27: warning: all parameters should be named in a function [readability-named-parameter] 47 | void unlink_element(T*); | ^ | /*element*/ include/DLList_impl.hpp:48:23: warning: all parameters should be named in a function [readability-named-parameter] 48 | T* link_element(T*); | ^ | /*new_element*/ include/DLList_impl.hpp:70:16: warning: all parameters should be named in a function [readability-named-parameter] 70 | T* create(Q); | ^ | /*par1*/ include/DLList_impl.hpp:72:16: warning: all parameters should be named in a function [readability-named-parameter] 72 | T* create(Q, R); | ^ | /*par1*/ /*par2*/ include/DLList_impl.hpp:74:16: warning: all parameters should be named in a function [readability-named-parameter] 74 | T* create(Q, R, S); | ^ | /*par1*/ /*par2*/ /*par3*/ include/DLList_impl.hpp:75:19: warning: all parameters should be named in a function [readability-named-parameter] 75 | void remove(T*); | ^ | /*element*/ include/DLList_impl.hpp:77:49: warning: all parameters should be named in a function [readability-named-parameter] 77 | void import(DLList&, T*); | ^ | /*old_list*/ /*element*/ include/DLList_impl.hpp:78:53: warning: all parameters should be named in a function [readability-named-parameter] 78 | void import_set(DLList&, T*, T*); | ^ | /*old_list*/ /*first_element*/ /*last_element*/ include/DLList_impl.hpp:137:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 137 | return; | ^~~~~~~ 138 | } include/DLList_impl.hpp:154:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 154 | T* new_element = new (MemPool::malloc()) T(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:162:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 162 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:170:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 170 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:178:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 178 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:196:8: warning: variable 'temp' is not initialized [cppcoreguidelines-init-variables] 196 | T* temp; | ^ | = nullptr include/DLList_impl.hpp:211:7: warning: class 'DLBaseItem' 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] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: the implicit default constructor of the CRTP is publicly accessible; consider making it private and declaring the derived class as friend [bugprone-crtp-constructor-accessibility] 211 | class DLBaseItem | ^ 212 | { | include/DLList_impl.hpp:226:13: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] 226 | virtual ~DLBaseItem() {}; | ^ ~~ | = default include/det_queue.hpp:14:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 14 | System* const system; // pointer to containing system | ^ include/det_queue.hpp:14:19: warning: member variable 'system' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes] include/det_queue.hpp:17:12: warning: method 'current_pos' can be made const [readability-make-member-function-const] 17 | double current_pos() | ^ | const include/det_queue.hpp:25:63: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 25 | double progression(int cache_pos) { return current_base - value_cache[cache_pos]; } | ^ include/det_queue.hpp:48:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 48 | double value_cache[POSITION_CACHE_SIZE]; // cache of previous 'distance' values | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/det_queue.hpp:49:29: warning: member 'distance_time_conversion_function' of type 'double (System::*const)(double)' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 49 | double (System::* const distance_time_conversion_function)(double); | ^ include/det_queue.hpp:51:29: warning: member 'time_distance_conversion_function' of type 'double (System::*const)(double)' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 51 | double (System::* const time_distance_conversion_function)(double); | ^ include/edge.hpp:31:9: warning: 'exclude_point' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | : exclude_point(0) 30 | { 31 | exclude_point = 0; | ^~~~~~~~~~~~~~~~~~ include/edge.hpp:33:9: warning: 'p_cat' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , p_cat(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; | ^~~~~~~~~~~~ include/edge.hpp:34:9: warning: 'edg_ang_norm' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , edg_ang_norm(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; | ^~~~~~~~~~~~~~~~~~~ include/edge.hpp:35:9: warning: 'xy_rotation_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , xy_rotation_angle(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; 35 | xy_rotation_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~~~~~ include/edge.hpp:36:9: warning: 'edg_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , edg_angle(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; 35 | xy_rotation_angle = 0.0; 36 | edg_angle = 0.0; | ^~~~~~~~~~~~~~~~ include/edge.hpp:37:9: warning: 'edg_bend_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , edg_bend_angle(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; 35 | xy_rotation_angle = 0.0; 36 | edg_angle = 0.0; 37 | edg_bend_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~~ include/event.hpp:7:7: warning: class 'EventDescriptor' 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] 7 | class EventDescriptor | ^ include/event.hpp:20:24: warning: member 'mt' of type 'Microtubule *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | Microtubule* const mt; | ^ include/geometry.hpp:10:7: warning: class 'Geometry' 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] 10 | class Geometry | ^ include/geometry.hpp:20:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | System* const system; | ^ include/geometry.hpp:28:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 28 | double patch_area[3]; | ^~~~~~~~~~~~~~~~~~~~ include/geometry.hpp:29:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 29 | std::vector regions_index[3]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/geometry.hpp:35:5: warning: constructor does not initialize these fields: areain_mesh, area_ppb, patch_area, element_max [cppcoreguidelines-pro-type-member-init] 19 | double area_ppb; | | {} 20 | std::vector ppb; 21 | 22 | double patch_area[3]; | | {} 23 | std::vector regions_index[3]; 24 | 25 | int element_max; | | {} 26 | Eigen::Vector3d object_cm, object_pa, nucleous_position; 27 | std::vector regions; 28 | 29 | Geometry(System* s, double a): | ^ include/geometry.hpp:39:9: warning: use range-based for loop instead [modernize-loop-convert] 39 | for (int i = 0; i < 3; i++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~ | (double & i : patch_area) 40 | { 41 | patch_area[i] = 0.0; | ~~~~~~~~~~~~~ | i include/geometry.hpp:41:13: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 41 | patch_area[i] = 0.0; | ^ include/geometry.hpp:46:27: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 46 | virtual ~Geometry() { return; }; | ^~~~~~~ include/geometry.hpp:77:22: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 77 | TrajectoryVector extend_trajectory(Trajectory*, Direction); | ^ | override include/geometry.hpp:77:22: warning: visibility of function 'extend_trajectory' is changed from private in class 'Geometry' to public [misc-override-with-different-visibility] include/geometry.hpp:69:30: note: function declared here as private 69 | virtual TrajectoryVector extend_trajectory(Trajectory*, Direction) = 0; | ^ include/geometry.hpp:77:51: warning: all parameters should be named in a function [readability-named-parameter] 77 | TrajectoryVector extend_trajectory(Trajectory*, Direction); | ^ | /*unused*/ /*unused*/ include/geometry.hpp:78:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 78 | void get_order_parameters(OrderParameters&); | ^ | override include/geometry.hpp:78:47: warning: all parameters should be named in a function [readability-named-parameter] 78 | void get_order_parameters(OrderParameters&); | ^ | /*unused*/ include/geometry.hpp:79:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 79 | void output_snapshot(std::ostream&); | ^ | override include/geometry.hpp:79:39: warning: all parameters should be named in a function [readability-named-parameter] 79 | void output_snapshot(std::ostream&); | ^ | /*unused*/ include/geometry.hpp:80:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 80 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | override include/geometry.hpp:80:45: warning: all parameters should be named in a function [readability-named-parameter] 80 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | /*unused*/ /*unused*/ /*unused*/ include/intersection.hpp:6:7: warning: constructor does not initialize these fields: occupancy, other_trajectory, occupied_list_ptr [cppcoreguidelines-pro-type-member-init] 6 | class Intersection | ^ 7 | // this object describes the intersection of one trajectory with another, from 8 | // one side. since it is created twice for every intersection, it is by far the 9 | // most memory-intensive object and should be kept as small as possible 10 | { 11 | public: 12 | 13 | int occupancy; | | {} 14 | Trajectory* other_trajectory; | | {} 15 | IntersectionItr mirror; 16 | #ifdef CROSS_SEV 17 | OccupiedIntersection* occupied_list_ptr; | | {} include/intersection.hpp:33:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | : x(x1) 32 | { 33 | x = x1; | ^~~~~~~ include/intersection.hpp:34:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , y(y1) 32 | { 33 | x = x1; 34 | y = y1; | ^~~~~~~ include/intersection.hpp:35:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , z(z1) 32 | { 33 | x = x1; 34 | y = y1; 35 | z = z1; | ^~~~~~~ include/intersection.hpp:36:9: warning: 'next_element' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , next_element(n1) 32 | { 33 | x = x1; 34 | y = y1; 35 | z = z1; 36 | next_element = n1; | ^~~~~~~~~~~~~~~~~~ include/measurement.hpp:34:41: warning: parameter 2 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 | std::ostream& operator<<(std::ostream&, const Measurement); | ^~~~~ include/mesh.hpp:37:9: warning: 'element_id' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | : element_id(0) 36 | { 37 | element_id = 0; | ^~~~~~~~~~~~~~~ include/mesh.hpp:38:9: warning: 'edge_tag' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | , edge_tag(0) 36 | { 37 | element_id = 0; 38 | edge_tag = 0; | ^~~~~~~~~~~~~ include/mesh.hpp:39:9: warning: 'face_tag' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | , face_tag(1) 36 | { 37 | element_id = 0; 38 | edge_tag = 0; 39 | face_tag = 1; | ^~~~~~~~~~~~~ include/mesh.hpp:40:9: warning: 'poly_intersect_mark' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | , poly_intersect_mark(0) 36 | { 37 | element_id = 0; 38 | edge_tag = 0; 39 | face_tag = 1; 40 | poly_intersect_mark = 0; | ^~~~~~~~~~~~~~~~~~~~~~~~ include/mesh.hpp:41:9: warning: 'periodic_tag' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | , periodic_tag(0) 36 | { 37 | element_id = 0; 38 | edge_tag = 0; 39 | face_tag = 1; 40 | poly_intersect_mark = 0; 41 | periodic_tag = 0; | ^~~~~~~~~~~~~~~~~ include/mesh.hpp:43:9: warning: 'area' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | , area(0.000001) 36 | { 37 | element_id = 0; 38 | edge_tag = 0; 39 | face_tag = 1; 40 | poly_intersect_mark = 0; 41 | periodic_tag = 0; 42 | 43 | area = 0.000001; | ^~~~~~~~~~~~~~~~ include/mesh.hpp:44:9: warning: 'peri_meter' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | , peri_meter(0.000001) 36 | { 37 | element_id = 0; 38 | edge_tag = 0; 39 | face_tag = 1; 40 | poly_intersect_mark = 0; 41 | periodic_tag = 0; 42 | 43 | area = 0.000001; 44 | peri_meter = 0.000001; | ^~~~~~~~~~~~~~~~~~~~~~ include/mesh.hpp:45:9: warning: 'edg_ang_norm' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | , edg_ang_norm(0.000001) 36 | { 37 | element_id = 0; 38 | edge_tag = 0; 39 | face_tag = 1; 40 | poly_intersect_mark = 0; 41 | periodic_tag = 0; 42 | 43 | area = 0.000001; 44 | peri_meter = 0.000001; 45 | edg_ang_norm = 0.000001; | ^~~~~~~~~~~~~~~~~~~~~~~~ include/mesh.hpp:46:9: warning: 'pcat_edge_weight' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | , pcat_edge_weight(0.000001) 36 | { 37 | element_id = 0; 38 | edge_tag = 0; 39 | face_tag = 1; 40 | poly_intersect_mark = 0; 41 | periodic_tag = 0; 42 | 43 | area = 0.000001; 44 | peri_meter = 0.000001; 45 | edg_ang_norm = 0.000001; 46 | pcat_edge_weight = 0.000001; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/mesh.hpp:52:18: warning: use emplace_back instead of push_back [modernize-use-emplace] 52 | side.push_back(Edge()); | ^~~~~~~~~~~~~~~~ | emplace_back( include/mesh.hpp:54:20: warning: use emplace_back instead of push_back [modernize-use-emplace] 54 | vertex.push_back(Eigen::Vector3d(0, 0, 0)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~ | emplace_back( include/mesh.hpp:59:8: warning: constructor does not initialize these fields: cell_id, edge_index, next [cppcoreguidelines-pro-type-member-init] 59 | struct EdgeRecord | ^ 60 | { 61 | std::vector key; 62 | int cell_id; | | {} 63 | int edge_index; | | {} 64 | EdgeRecord* next; | | {} include/mesh.hpp:79:9: warning: 'cur' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 77 | EdgeOfficer(int c) | | : cur(c) 78 | { 79 | cur = c; | ^~~~~~~~ include/mesh.hpp:80:9: warning: 'mean_edg_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 77 | EdgeOfficer(int c) | | , mean_edg_angle(0.0) 78 | { 79 | cur = c; 80 | mean_edg_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~~ include/mesh.hpp:83:28: warning: use emplace_back instead of push_back [modernize-use-emplace] 83 | edgeface_store.push_back(std::vector()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | emplace_back( include/mesh.hpp:88:43: warning: all parameters should be named in a function [readability-named-parameter] 88 | std::vector split(std::string, char); | ^ | /*str*/ /*delimiter*/ include/mesh.hpp:92:21: warning: all parameters should be named in a function [readability-named-parameter] 92 | bool check_eular(int, int, int); | ^ | /*f*/ /*v*/ /*e*/ include/mesh.hpp:94:28: warning: all parameters should be named in a function [readability-named-parameter] 94 | void pickup_shape(Geometry*); | ^ | /*g*/ include/mesh.hpp:96:57: warning: all parameters should be named in a function [readability-named-parameter] 96 | bool check_surface_orientation(std::vector&); | ^ | /*element_3d*/ include/mesh.hpp:98:42: warning: all parameters should be named in a function [readability-named-parameter] 98 | void image_3d_to_2d(std::vector&, std::vector&, double[]); | ^ | /*regions*/ /*element_3d*/ /*p_cat_curv_list*/ include/mesh.hpp:98:71: warning: do not declare C-style arrays, use 'std::span' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 98 | void image_3d_to_2d(std::vector&, std::vector&, double[]); | ^~~~~~~~ include/mesh.hpp:100:44: warning: all parameters should be named in a function [readability-named-parameter] 100 | void orient_surface(std::vector&, std::vector&, std::vector&); | ^ | /*gvertex*/ /*element_3d*/ /*view_triangle*/ include/mesh.hpp:102:48: warning: all parameters should be named in a function [readability-named-parameter] 102 | void connect_with_globe(std::vector&, std::vector&); | ^ | /*gvertex*/ /*element_3d*/ include/mesh.hpp:104:20: warning: all parameters should be named in a function [readability-named-parameter] 104 | void make_graph(int, std::vector&, std::vector&); | ^ | /*gvertex*/ /*e_list*/ /*element_3d*/ include/mesh.hpp:106:46: warning: all parameters should be named in a function [readability-named-parameter] 106 | void edge_descriptors(std::vector&, std::vector&, std::vector&); | ^ | /*gvertex*/ /*e_list*/ /*element_3d*/ include/mesh.hpp:109:24: warning: all parameters should be named in a function [readability-named-parameter] 109 | std::vector&, std::vector&, std::vector&, std::vector&, double); | ^ | /*vertices*/ /*triangles*/ /*view_triangles*/ /*e_list*/ /*size_factor*/ include/mesh.hpp:111:51: warning: all parameters should be named in a function [readability-named-parameter] 111 | void rigid_body_properties(std::vector&, | ^ | /*gvertex*/ 112 | std::vector&, | | /*element_3d*/ 113 | Eigen::Vector3d&, | | /*cm*/ 114 | Eigen::Vector3d&, | | /*pax*/ 115 | Eigen::Vector3d&, | | /*pbx*/ 116 | Eigen::Vector3d&); | | /*pcx*/ include/mesh.hpp:118:40: warning: all parameters should be named in a function [readability-named-parameter] 118 | void view_graph(std::vector&, std::vector&, Eigen::Vector3d&, std::string); | ^ | /*gvertex*/ /*element_3d*/ /*centroid*/ /*output_dir*/ include/mesh.hpp:120:42: warning: all parameters should be named in a function [readability-named-parameter] 120 | bool line_plane_intersect(Eigen::Vector3d, Eigen::Vector3d, Eigen::Vector3d, Eigen::Vector3d, Eigen::Vector3d&); | ^ | /*n*/ /*p*/ /*a*/ /*b*/ /*i*/ include/mesh.hpp:122:46: warning: all parameters should be named in a function [readability-named-parameter] 122 | double area_polygon_3d(std::vector&, Eigen::Vector3d); | ^ | /*v*/ /*n*/ include/mesh.hpp:124:51: warning: all parameters should be named in a function [readability-named-parameter] 124 | double intersecting_polygon(std::vector&, | ^ | /*polygon*/ 125 | std::vector&, | | /*gvertex*/ 126 | std::vector&, | | /*regions*/ 127 | std::vector&, | | /*e_list*/ 128 | Eigen::Vector3d, | | /*np*/ 129 | Eigen::Vector3d, | | /*cp*/ 130 | std::string); | | /*shape_type*/ include/microtubule.hpp:10:7: warning: class 'Microtubule' 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] 10 | class Microtubule: public DLBaseItem | ^ include/microtubule.hpp:14:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 14 | System* const system; | ^ include/microtubule.hpp:31:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 31 | ~Microtubule(); | ^ | override include/mt_tip.hpp:7:7: warning: class 'MTTip' 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] 7 | class MTTip | ^ include/parameters.hpp:105:3: warning: redundant access specifier has the same accessibility as the previous access specifier [readability-redundant-access-specifiers] 105 | public: | ^~~~~~~ include/parameters.hpp:42:3: note: previously declared here 42 | public: | ^ include/parameters.hpp:119:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 119 | double rdirector[3]; | ^~~~~~~~~~~~~~~~~~~ include/parameters.hpp:139:5: warning: constructor does not initialize these fields: local_order [cppcoreguidelines-pro-type-member-init] 136 | double local_order; | | {} 137 | Eigen::Vector3d sv; 138 | 139 | OrderParametersRaw(void) | ^ include/parameters.hpp:139:24: warning: redundant void argument list in function definition [modernize-redundant-void-arg] 139 | OrderParametersRaw(void) | ^~~~ include/parameters.hpp:141:9: warning: 'local_l' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | : local_l(0.) 140 | { 141 | local_l = 0.; | ^~~~~~~~~~~~~ include/parameters.hpp:142:9: warning: 'local_l_opt' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , local_l_opt(0.) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; | ^~~~~~~~~~~~~~~~~ include/parameters.hpp:143:9: warning: 'qxx' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxx(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; | ^~~~~~~~ include/parameters.hpp:144:9: warning: 'qxy' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxy(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; | ^~~~~~~~ include/parameters.hpp:145:9: warning: 'qxz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; | ^~~~~~~~ include/parameters.hpp:146:9: warning: 'qyy' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qyy(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; | ^~~~~~~~ include/parameters.hpp:147:9: warning: 'qyz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qyz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; 147 | qyz = 0; | ^~~~~~~~ include/parameters.hpp:148:9: warning: 'qzz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qzz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; 147 | qyz = 0; 148 | qzz = 0; | ^~~~~~~~ include/parameters.hpp:152:9: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 152 | return; | ^~~~~~~ 153 | } include/parameters.hpp:155:22: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 155 | double extract_r(double director[3], std::string geometry) | ^~~~~~~~~~~~~~~~~~ include/parameters.hpp:155:54: warning: the parameter 'geometry' of type 'std::string' (aka 'basic_string') is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 155 | double extract_r(double director[3], std::string geometry) | ^ | const & include/parameters.hpp:178:40: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 178 | director[i] = evec_mat(i, max_pos); | ^ include/parameters.hpp:195:40: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 195 | director[i] = evec_mat(i, min_pos); | ^ include/parameters.hpp:199:16: warning: redundant parentheses around expression [readability-redundant-parentheses] 199 | return (sel_eigen_val); | ^ ~ include/region.hpp:9:7: warning: class 'Region' 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] 9 | class Region | ^ include/region.hpp:20:21: warning: member 'geometry' of type 'Geometry *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | Geometry* const geometry; | ^ include/region.hpp:24:12: warning: use default member initializer for 'total_length' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 24 | double total_length; | ^ | {0} include/region.hpp:26:9: warning: use default member initializer for 'previous_update_tag' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 26 | int previous_update_tag; | ^ | {0} include/region.hpp:27:9: warning: use default member initializer for 'region_id' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 27 | int region_id; | ^ | {0} include/region.hpp:28:12: warning: use default member initializer for 'z_offset' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 28 | double z_offset; | ^ | {0.0} include/region.hpp:29:12: warning: use default member initializer for 'rot_angle' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 29 | double rot_angle; | ^ | {0.0} include/region.hpp:30:12: warning: use default member initializer for 'peri_meter' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 30 | double peri_meter; | ^ | {0.0} include/region.hpp:55:5: warning: constructor does not initialize these fields: face_tag, poly_intersect_mark [cppcoreguidelines-pro-type-member-init] 38 | Region(Geometry* g, double a): | ^ include/region.hpp:68:22: warning: use emplace_back instead of push_back [modernize-use-emplace] 68 | vertices.push_back(Eigen::Vector2d(0, 0)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~ | emplace_back( include/region.hpp:69:18: warning: use emplace_back instead of push_back [modernize-use-emplace] 69 | side.push_back(Edge()); | ^~~~~~~~~~~~~~~~ | emplace_back( include/region.hpp:73:25: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 73 | virtual ~Region() { return; }; | ^~~~~~~ include/region.hpp:78:51: warning: parameter 2 is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls] 78 | virtual void translate_vector(SurfaceVector&, const double) = 0; | ^~~~~ include/region.hpp:106:27: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 106 | virtual SurfaceVector random_surface_vector() = 0; | ~~~~~~~ ^ | override include/region.hpp:106:27: warning: visibility of function 'random_surface_vector' is changed from protected in class 'Region' to public [misc-override-with-different-visibility] include/region.hpp:90:27: note: function declared here as protected 90 | virtual SurfaceVector random_surface_vector() = 0; | ^ include/region.hpp:107:18: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 107 | virtual void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&) = 0; | ~~~~~~~ ^ | override include/region.hpp:107:59: warning: all parameters should be named in a function [readability-named-parameter] 107 | virtual void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&) = 0; | ^ | /*unused*/ /*unused*/ /*unused*/ /*unused*/ include/region.hpp:108:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 108 | void make_intersection_list(Trajectory*); | ^ | override include/region.hpp:108:10: warning: visibility of function 'make_intersection_list' is changed from protected in class 'Region' to public [misc-override-with-different-visibility] include/region.hpp:89:18: note: function declared here as protected 89 | virtual void make_intersection_list(Trajectory*) = 0; | ^ include/region.hpp:108:44: warning: all parameters should be named in a function [readability-named-parameter] 108 | void make_intersection_list(Trajectory*); | ^ | /*unused*/ include/region.hpp:109:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 109 | void translate_vector(SurfaceVector&, const double); | ^ | override include/region.hpp:109:41: warning: all parameters should be named in a function [readability-named-parameter] 109 | void translate_vector(SurfaceVector&, const double); | ^ | /*unused*/ /*unused*/ include/region.hpp:109:43: warning: parameter 2 is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls] 109 | void translate_vector(SurfaceVector&, const double); | ^~~~~ include/region.hpp:110:12: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 110 | double intersection_angle(Trajectory*, Trajectory*); | ^ | override include/region.hpp:110:42: warning: all parameters should be named in a function [readability-named-parameter] 110 | double intersection_angle(Trajectory*, Trajectory*); | ^ | /*unused*/ /*unused*/ include/region.hpp:116:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 116 | void output_snapshot(std::ostream&); | ^ | override include/region.hpp:116:39: warning: all parameters should be named in a function [readability-named-parameter] 116 | void output_snapshot(std::ostream&); | ^ | /*unused*/ include/region.hpp:119:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 119 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | override include/region.hpp:119:45: warning: all parameters should be named in a function [readability-named-parameter] 119 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | /*unused*/ /*unused*/ /*unused*/ include/region.hpp:128:19: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 128 | SurfaceVector random_surface_vector(); | ^ | override include/region.hpp:129:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 129 | void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&); | ^ | override include/region.hpp:129:51: warning: all parameters should be named in a function [readability-named-parameter] 129 | void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&); | ^ | /*unused*/ /*unused*/ /*unused*/ /*unused*/ include/segment.hpp:7:7: warning: class 'Segment' 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] 7 | class Segment: public DLBaseItem | ^ include/segment.hpp:12:23: warning: member 'trajectory' of type 'Trajectory *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 12 | Trajectory* const trajectory; | ^ include/segment.hpp:27:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 27 | ~Segment(); | ^ | override include/segment.hpp:29:12: warning: method 'length' can be made const [readability-make-member-function-const] 29 | double length() { return std::abs(end - start); } | ^ | const include/surface.hpp:16:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | : x(x1) 15 | { 16 | x = x1; | ^~~~~~~ include/surface.hpp:17:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | , y(y1) 15 | { 16 | x = x1; 17 | y = y1; | ^~~~~~~ include/surface.hpp:18:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | , z(z1) 15 | { 16 | x = x1; 17 | y = y1; 18 | z = z1; | ^~~~~~~ include/surface.hpp:32:9: warning: 'cos_theta' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 30 | BendingOperator() | | : cos_theta(0.0) 31 | { 32 | cos_theta = 0.0; | ^~~~~~~~~~~~~~~~ include/surface.hpp:33:9: warning: 'sin_theta' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 30 | BendingOperator() | | , sin_theta(0.0) 31 | { 32 | cos_theta = 0.0; 33 | sin_theta = 0.0; | ^~~~~~~~~~~~~~~~ include/surface.hpp:49:5: warning: constructor does not initialize these fields: region [cppcoreguidelines-pro-type-member-init] 47 | Region* region; | | {} 48 | 49 | SurfaceVector() | ^ include/surface.hpp:51:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | : x(0.0) 50 | { 51 | x = 0.0; | ^~~~~~~~ include/surface.hpp:52:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , y(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; | ^~~~~~~~ include/surface.hpp:53:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , z(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; | ^~~~~~~~ include/surface.hpp:55:9: warning: 'angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , angle(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; 54 | 55 | angle = 0.0; | ^~~~~~~~~~~~ include/surface.hpp:56:9: warning: 'tv_pos' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , tv_pos(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; 54 | 55 | angle = 0.0; 56 | tv_pos = 0.0; | ^~~~~~~~~~~~~ include/surface.hpp:73:9: warning: 'mid_point' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | : mid_point(0) 72 | { 73 | mid_point = 0; | ^~~~~~~~~~~~~~ include/surface.hpp:74:9: warning: 'length' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | , length(0.0) 72 | { 73 | mid_point = 0; 74 | length = 0.0; | ^~~~~~~~~~~~~ include/surface.hpp:75:9: warning: 'edge_3d_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | , edge_3d_angle(0.0) 72 | { 73 | mid_point = 0; 74 | length = 0.0; 75 | edge_3d_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~ include/system.hpp:14:7: warning: class 'System' 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] 14 | class System | ^ include/system.hpp:70:12: warning: method 'identity' can be made static [readability-convert-member-functions-to-static] 70 | double identity(double i) { return i; } | ^ | static include/system.hpp:115:21: warning: redundant void argument list in function declaration [modernize-redundant-void-arg] 115 | void next_event(void); | ^~~~ include/system.hpp:138:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 138 | double binomial_table[MAXBINOM][MAXBINOM]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/system.hpp:139:30: warning: redundant void argument list in function declaration [modernize-redundant-void-arg] 139 | void make_binomial_table(void); | ^~~~ include/trajectory.hpp:16:5: warning: constructor does not initialize these fields: cdir [cppcoreguidelines-pro-type-member-init] 16 | TrajectoryVector(double p, Direction d, Trajectory* t): | ^ include/trajectory.hpp:23:5: warning: constructor does not initialize these fields: pos, dir, cdir, trajectory [cppcoreguidelines-pro-type-member-init] 12 | double pos; | | {} 13 | Direction dir, cdir; 14 | Trajectory* trajectory; | | {} 15 | 16 | TrajectoryVector(double p, Direction d, Trajectory* t): 17 | pos(p), 18 | dir(d), 19 | trajectory(t) 20 | { 21 | } 22 | 23 | TrajectoryVector() {} | ^ include/trajectory.hpp:23:5: warning: use '= default' to define a trivial default constructor [modernize-use-equals-default] 23 | TrajectoryVector() {} | ^ ~~ | = default; include/trajectory.hpp:25:22: warning: method 'flipped' can be made const [readability-make-member-function-const] 25 | TrajectoryVector flipped() | ^ | const include/trajectory.hpp:27:16: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] 27 | return TrajectoryVector(pos, dir == Direction::FORWARD ? Direction::BACKWARD : Direction::FORWARD, trajectory); | ^~~~~~~~~~~~~~~~~ ~ | { } include/trajectory.hpp:31:7: warning: class 'Trajectory' 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] 31 | class Trajectory: public DLBaseItem | ^ include/trajectory.hpp:40:25: warning: member 'base' of type 'const SurfaceVector' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 40 | const SurfaceVector base; | ^ include/trajectory.hpp:41:18: warning: member 'length' of type 'const double' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 41 | const double length; | ^ include/trajectory.hpp:82:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 82 | ~Trajectory(); | ^ | override include/types.hpp:40:9: warning: macro 'PROGRAM_VERSION' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] 40 | #define PROGRAM_VERSION "BC.2018" | ^ include/types.hpp:88:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 88 | extern std::string direction_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:132:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 132 | extern std::string nucleation_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:141:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 141 | extern std::string interaction_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:153:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 153 | extern std::string bundle_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:5:1: warning: included header mt_tip.hpp is not used directly [misc-include-cleaner] 5 | #include "mt_tip.hpp" | ^~~~~~~~~~~~~~~~~~~~~ 6 | #include "linalg.hpp" src/mesh.cpp:9:6: warning: function 'ini_edge_record' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage] 9 | void ini_edge_record(struct EdgeRecord* head, std::vector& v, int cid, int fid) | ^ | static src/mesh.cpp:9:52: warning: no header providing "std::vector" is directly included [misc-include-cleaner] 7 | 8 | // initialize edge 9 | void ini_edge_record(struct EdgeRecord* head, std::vector& v, int cid, int fid) | ^ src/mesh.cpp:23:6: warning: function 'add_edge_record' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage] 23 | void add_edge_record(struct EdgeRecord* head, std::vector& v, int cid, int fid) | ^ | static src/mesh.cpp:25:5: warning: initializing non-owner 'EdgeRecord *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 25 | EdgeRecord* newedge_record = new EdgeRecord; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:25:5: warning: use auto when initializing with new to avoid duplicating the type name [modernize-use-auto] 25 | EdgeRecord* newedge_record = new EdgeRecord; | ^~~~~~~~~~ | auto src/mesh.cpp:32:12: warning: implicit conversion 'EdgeRecord *' -> 'bool' [readability-implicit-bool-conversion] 32 | while (cur) | ^ | != nullptr src/mesh.cpp:44:6: warning: function 'delete_first' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage] 44 | void delete_first(struct EdgeRecord** head) | ^ | static src/mesh.cpp:46:5: warning: pointee of variable 'tmp' of type 'struct EdgeRecord *' can be declared 'const' [misc-const-correctness] 46 | struct EdgeRecord* tmp = *head; | ^ | const src/mesh.cpp:52:5: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory] 52 | delete tmp; | ^ ~~~ src/mesh.cpp:46:5: note: variable declared here 46 | struct EdgeRecord* tmp = *head; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:57:6: warning: function 'display' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage] 57 | void display(struct EdgeRecord* head) | ^ | static src/mesh.cpp:61:12: warning: implicit conversion 'EdgeRecord *' -> 'bool' [readability-implicit-bool-conversion] 61 | while (list) | ^ | != nullptr src/mesh.cpp:63:14: warning: no header providing "std::cout" is directly included [misc-include-cleaner] 7 | std::cout << "-----------------------------" << std::endl; | ^ src/mesh.cpp:63:62: warning: no header providing "std::endl" is directly included [misc-include-cleaner] 7 | std::cout << "-----------------------------" << std::endl; | ^ src/mesh.cpp:83:6: warning: function 'edge_sort' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage] 83 | void edge_sort(EdgeRecord** e_list, int node_max) | ^ | static src/mesh.cpp:88:9: warning: 'push_back' is called inside a loop; consider pre-allocating the container capacity before the loop [performance-inefficient-vector-operation] 86 | for (int i = 0; i < 2; i++) 87 | { 88 | v1.push_back(0); | ^ src/mesh.cpp:93:22: warning: variable 'bin' is not initialized [cppcoreguidelines-init-variables] 93 | EdgeRecord** bin; | ^ | = nullptr src/mesh.cpp:94:9: warning: assigning newly created 'gsl::owner<>' to non-owner 'EdgeRecord **' [cppcoreguidelines-owning-memory] 94 | bin = new EdgeRecord*[node_max]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:98:13: warning: assigning newly created 'gsl::owner<>' to non-owner 'EdgeRecord *' [cppcoreguidelines-owning-memory] 98 | bin[j] = new EdgeRecord; | ^~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:103:16: warning: implicit conversion 'EdgeRecord *' -> 'bool' [readability-implicit-bool-conversion] 103 | while (edge) | ^ | != nullptr src/mesh.cpp:107:13: warning: pointee of variable 'oldedge' of type 'EdgeRecord *' can be declared 'const' [misc-const-correctness] 107 | EdgeRecord* oldedge = edge; | ^ | const src/mesh.cpp:109:13: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory] 109 | delete oldedge; | ^ ~~~~~~~ src/mesh.cpp:107:13: note: variable declared here 107 | EdgeRecord* oldedge = edge; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:118:9: warning: assigning newly created 'gsl::owner<>' to non-owner 'EdgeRecord *' [cppcoreguidelines-owning-memory] 118 | *e_list = new EdgeRecord; | ^~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:124:20: warning: implicit conversion 'EdgeRecord *' -> 'bool' [readability-implicit-bool-conversion] 124 | while (binedge) | ^ | != nullptr src/mesh.cpp:131:9: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory] 131 | delete[] bin; | ^ ~~~ src/mesh.cpp:93:9: note: variable declared here 93 | EdgeRecord** bin; | ^~~~~~~~~~~~~~~~ src/mesh.cpp:137:6: warning: function 'find_connectivity' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage] 137 | void find_connectivity(EdgeRecord** f_list, std::vector& e_list) | ^ | static src/mesh.cpp:137:57: warning: no header providing "ElementList" is directly included [misc-include-cleaner] 4 | void find_connectivity(EdgeRecord** f_list, std::vector& e_list) | ^ src/mesh.cpp:143:9: warning: pointee of variable 'edgenext' of type 'EdgeRecord *' can be declared 'const' [misc-const-correctness] 143 | EdgeRecord* edgenext = edge->next; | ^ | const src/mesh.cpp:151:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'ElementList *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 151 | e_list.push_back(new ElementList()); | ^~~~~~~~~~~~~~~~~ src/mesh.cpp:152:22: warning: narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 152 | ecount = e_list.size() - 1; | ^ src/mesh.cpp:169:6: warning: function 'pickup_shape' has cognitive complexity of 31 (threshold 25) [readability-function-cognitive-complexity] 169 | void pickup_shape(Geometry* g) | ^ src/mesh.cpp:207:5: note: +1, including nesting penalty of 0, nesting level increased to 1 207 | if (in_file == "cubeReal") | ^ src/mesh.cpp:402:9: note: +2, including nesting penalty of 1, nesting level increased to 2 402 | for (size_t i = 0; i < element_3d.size(); i++) | ^ src/mesh.cpp:408:10: note: +1, nesting level increased to 1 408 | else if (in_file == "2D-plane") | ^ src/mesh.cpp:458:5: note: +1, nesting level increased to 1 458 | else | ^ src/mesh.cpp:470:9: note: +2, including nesting penalty of 1, nesting level increased to 2 470 | for (int i = 0; i < vmax; i++) | ^ src/mesh.cpp:487:9: note: +2, including nesting penalty of 1, nesting level increased to 2 487 | for (int i = 0; i < trimax; i++) | ^ src/mesh.cpp:523:5: note: +1, including nesting penalty of 0, nesting level increased to 1 523 | for (size_t i = 0; i < element_3d.size(); i++) | ^ src/mesh.cpp:550:5: note: +1, including nesting penalty of 0, nesting level increased to 1 550 | if (in_file == "2D-plane") | ^ src/mesh.cpp:562:5: note: +1, including nesting penalty of 0, nesting level increased to 1 562 | for (size_t eno = 0; eno < element_3d.size(); eno++) | ^ src/mesh.cpp:568:5: note: +1, including nesting penalty of 0, nesting level increased to 1 568 | if (show_mesh == 1) | ^ src/mesh.cpp:580:9: note: +2, including nesting penalty of 1, nesting level increased to 2 580 | if (!convex) | ^ src/mesh.cpp:586:9: note: +1, nesting level increased to 2 586 | else | ^ src/mesh.cpp:591:9: note: +2, including nesting penalty of 1, nesting level increased to 2 591 | if (surface_oriented) | ^ src/mesh.cpp:620:5: note: +1, including nesting penalty of 0, nesting level increased to 1 620 | for (int i = 0; i <= edg_number; i++) | ^ src/mesh.cpp:625:5: note: +1, including nesting penalty of 0, nesting level increased to 1 625 | for (it = g->system->p.edg_cat_map.begin(); it != g->system->p.edg_cat_map.end(); it++) | ^ src/mesh.cpp:635:5: note: +1, including nesting penalty of 0, nesting level increased to 1 635 | for (int i = 0; i <= face_number; i++) | ^ src/mesh.cpp:640:5: note: +1, including nesting penalty of 0, nesting level increased to 1 640 | for (it = g->system->p.face_cat_map.begin(); it != g->system->p.face_cat_map.end(); it++) | ^ src/mesh.cpp:660:5: note: +1, including nesting penalty of 0, nesting level increased to 1 660 | for (size_t eno = 0; eno < element_3d.size(); eno++) | ^ src/mesh.cpp:670:5: note: +1, including nesting penalty of 0, nesting level increased to 1 670 | for (size_t i = 0; i < gvertex.size(); i++) | ^ src/mesh.cpp:679:5: note: +1, including nesting penalty of 0, nesting level increased to 1 679 | for (size_t i = 0; i < e_list.size(); i++) | ^ src/mesh.cpp:683:9: note: +2, including nesting penalty of 1, nesting level increased to 2 683 | for (size_t j = 0; j < 2; j++) | ^ src/mesh.cpp:692:5: note: +1, including nesting penalty of 0, nesting level increased to 1 692 | for (size_t eno = 0; eno < element_3d.size(); eno++) | ^ src/mesh.cpp:702:5: note: +1, including nesting penalty of 0, nesting level increased to 1 702 | for (size_t eno = 0; eno < element_3d.size(); eno++) | ^ src/mesh.cpp:713:5: note: +1, including nesting penalty of 0, nesting level increased to 1 713 | for (size_t gno = 0; gno < gvertex.size(); gno++) | ^ src/mesh.cpp:721:5: note: +1, including nesting penalty of 0, nesting level increased to 1 721 | for (size_t el = 0; el < e_list.size(); el++) | ^ src/mesh.cpp:174:5: warning: variable 'cell_index' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness] 174 | std::string cell_index(g->system->p.geom_param); | ^ | const src/mesh.cpp:174:10: warning: no header providing "std::string" is directly included [misc-include-cleaner] 7 | std::string cell_index(g->system->p.geom_param); | ^ src/mesh.cpp:174:17: warning: unused local variable 'cell_index' of type 'std::string' (aka 'basic_string') [bugprone-unused-local-non-trivial-variable] 174 | std::string cell_index(g->system->p.geom_param); | ^ src/mesh.cpp:177:5: warning: variable 'show_mesh' of type 'int' can be declared 'const' [misc-const-correctness] 177 | int show_mesh(g->system->p.show_mesh); | ^ | const src/mesh.cpp:180:5: warning: variable 'in_file' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness] 180 | std::string in_file(g->system->p.geometry); | ^ | const src/mesh.cpp:183:5: warning: variable 'size_factor' of type 'double' can be declared 'const' [misc-const-correctness] 183 | double size_factor(g->system->p.geometry_scale_factor); | ^ | const src/mesh.cpp:186:17: warning: no header providing "Vertices" is directly included [misc-include-cleaner] 186 | std::vector gvertex; | ^ src/mesh.cpp:192:12: warning: no header providing "Eigen::Vector3d" is directly included [misc-include-cleaner] 2 | Eigen::Vector3d centroid(0.0, 0.0, 0.0); | ^ src/mesh.cpp:200:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 200 | int a0(0), a1(0), a2(0); | ^~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:201:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 201 | int vmax(0), trimax(0), spf(0), cur(0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:205:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 205 | double x(0), y(0), z(0), e_norm, e_ang(0.0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:205:30: warning: variable 'e_norm' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 205 | double x(0), y(0), z(0), e_norm, e_ang(0.0); | ^ src/mesh.cpp:209:27: warning: initializing non-owner argument of type 'value_type &&' (aka 'Vertices *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 209 | gvertex.push_back(new Vertices(0.5 * size_factor, 0.5 * size_factor, 1.0 * size_factor)); // 0 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:210:27: warning: initializing non-owner argument of type 'value_type &&' (aka 'Vertices *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 210 | gvertex.push_back(new Vertices(0.5 * size_factor, 0.5 * size_factor, 0.0)); // 1 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:212:27: warning: initializing non-owner argument of type 'value_type &&' (aka 'Vertices *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 212 | gvertex.push_back(new Vertices(0.5 * size_factor, 0.0, 0.5 * size_factor)); // 2 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:213:27: warning: initializing non-owner argument of type 'value_type &&' (aka 'Vertices *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 213 | gvertex.push_back(new Vertices(0.5 * size_factor, 1.0 * size_factor, 0.5 * size_factor)); // 3 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:215:27: warning: initializing non-owner argument of type 'value_type &&' (aka 'Vertices *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 215 | gvertex.push_back(new Vertices(1.0 * size_factor, 0.5 * size_factor, 0.5 * size_factor)); // 4 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:216:27: warning: initializing non-owner argument of type 'value_type &&' (aka 'Vertices *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 216 | gvertex.push_back(new Vertices(0.0, 0.5 * size_factor, 0.5 * size_factor)); // 5 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:218:27: warning: initializing non-owner argument of type 'value_type &&' (aka 'Vertices *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 218 | gvertex.push_back(new Vertices(0.0, 0.0, 1.0 * size_factor)); // 6 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:219:27: warning: initializing non-owner argument of type 'value_type &&' (aka 'Vertices *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 219 | gvertex.push_back(new Vertices(1.0 * size_factor, 0.0, 1.0 * size_factor)); // 7 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:220:27: warning: initializing non-owner argument of type 'value_type &&' (aka 'Vertices *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 220 | gvertex.push_back(new Vertices(1.0 * size_factor, 1.0 * size_factor, 1.0 * size_factor)); // 8 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:221:27: warning: initializing non-owner argument of type 'value_type &&' (aka 'Vertices *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 221 | gvertex.push_back(new Vertices(0.0, 1.0 * size_factor, 1.0 * size_factor)); // 9 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:223:27: warning: initializing non-owner argument of type 'value_type &&' (aka 'Vertices *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 223 | gvertex.push_back(new Vertices(0.0, 0.0, 0.0)); // 10 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:224:27: warning: initializing non-owner argument of type 'value_type &&' (aka 'Vertices *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 224 | gvertex.push_back(new Vertices(1.0 * size_factor, 0.0, 0.0)); // 11 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:225:27: warning: initializing non-owner argument of type 'value_type &&' (aka 'Vertices *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 225 | gvertex.push_back(new Vertices(1.0 * size_factor, 1.0 * size_factor, 0.0)); // 12 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:226:27: warning: initializing non-owner argument of type 'value_type &&' (aka 'Vertices *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 226 | gvertex.push_back(new Vertices(0.0, 1.0 * size_factor, 0.0)); // 13 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:230:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 230 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:237:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 237 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:244:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 244 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:251:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 251 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:259:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 259 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:266:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 266 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:273:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 273 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:280:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 280 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:288:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 288 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:295:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 295 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:302:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 302 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:309:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 309 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:317:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 317 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:324:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 324 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:331:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 331 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:338:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 338 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:346:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 346 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:353:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 353 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:360:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 360 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:367:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 367 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:375:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 375 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:382:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 382 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:389:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 389 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:396:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 396 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:402:14: warning: no header providing "size_t" is directly included [misc-include-cleaner] 7 | for (size_t i = 0; i < element_3d.size(); i++) | ^ src/mesh.cpp:404:41: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 404 | element_3d[i]->element_id = i; | ^ src/mesh.cpp:410:27: warning: initializing non-owner argument of type 'value_type &&' (aka 'Vertices *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 410 | gvertex.push_back(new Vertices(0.0, 0.0, 0.0)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:411:27: warning: initializing non-owner argument of type 'value_type &&' (aka 'Vertices *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 411 | gvertex.push_back(new Vertices(0.0, 1.0 * size_factor, 0.0)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:412:27: warning: initializing non-owner argument of type 'value_type &&' (aka 'Vertices *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 412 | gvertex.push_back(new Vertices(1.0 * size_factor, 1.0 * size_factor, 0.0)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:413:27: warning: initializing non-owner argument of type 'value_type &&' (aka 'Vertices *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 413 | gvertex.push_back(new Vertices(1.0 * size_factor, 0.0, 0.0)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:414:27: warning: initializing non-owner argument of type 'value_type &&' (aka 'Vertices *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 414 | gvertex.push_back(new Vertices(0.5 * size_factor, 0.5 * size_factor, 0.0)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:415:27: warning: initializing non-owner argument of type 'value_type &&' (aka 'Vertices *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 415 | gvertex.push_back(new Vertices(0.5 * size_factor, 0.5 * size_factor, -1.0)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:417:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 417 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:422:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 422 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:427:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 427 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:432:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 432 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:437:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 437 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:442:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 442 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:447:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 447 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:452:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 452 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:461:9: warning: variable 'input_mesh_file' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness] 461 | std::string input_mesh_file = g->system->p.input_dir + "/" + g->system->p.geometry + "/" + in_file + ".dat"; | ^ | const src/mesh.cpp:464:14: warning: no header providing "std::fstream" is directly included [misc-include-cleaner] 7 | std::fstream fp; | ^ src/mesh.cpp:465:47: warning: no header providing "std::ios" is directly included [misc-include-cleaner] 7 | fp.open(input_mesh_file.c_str(), std::ios::in); | ^ src/mesh.cpp:473:31: warning: initializing non-owner argument of type 'value_type &&' (aka 'Vertices *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 473 | gvertex.push_back(new Vertices(0.0, 0.0, 0.0)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:490:34: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 490 | element_3d.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:511:16: warning: narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 511 | make_graph(gvertex.size(), e_list, element_3d); | ^ src/mesh.cpp:514:5: warning: variable 'f' of type 'int' can be declared 'const' [misc-const-correctness] 514 | int f = element_3d.size(); | ^ | const src/mesh.cpp:514:13: warning: narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 514 | int f = element_3d.size(); | ^ src/mesh.cpp:515:5: warning: variable 'v' of type 'int' can be declared 'const' [misc-const-correctness] 515 | int v = gvertex.size(); | ^ | const src/mesh.cpp:515:13: warning: narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 515 | int v = gvertex.size(); | ^ src/mesh.cpp:516:5: warning: variable 'e' of type 'int' can be declared 'const' [misc-const-correctness] 516 | int e = e_list.size(); | ^ | const src/mesh.cpp:516:13: warning: narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 516 | int e = e_list.size(); | ^ src/mesh.cpp:519:5: warning: variable 'convex' of type 'bool' can be declared 'const' [misc-const-correctness] 519 | bool convex(check_eular(f, v, e)); | ^ | const src/mesh.cpp:525:33: warning: initializing non-owner argument of type 'value_type &&' (aka 'Triangle3D *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 525 | view_triangle.push_back(new Triangle3D()); | ^~~~~~~~~~~~~~~~ src/mesh.cpp:538:5: warning: variable 'surface_oriented' of type 'bool' can be declared 'const' [misc-const-correctness] 538 | bool surface_oriented(check_surface_orientation(element_3d)); | ^ | const src/mesh.cpp:562:5: warning: use range-based for loop instead [modernize-loop-convert] 562 | for (size_t eno = 0; eno < element_3d.size(); eno++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (auto & eno : element_3d) 563 | { 564 | total_area += element_3d[eno]->area; | ~~~~~~~~~~~~~~~ | eno src/mesh.cpp:615:10: warning: no header providing "std::map" is directly included [misc-include-cleaner] 7 | std::map::iterator it; | ^ src/mesh.cpp:618:5: warning: variable 'edg_number' of type 'int' can be declared 'const' [misc-const-correctness] 618 | int edg_number = g->system->p.edg_cat_map.size(); | ^ | const src/mesh.cpp:618:22: warning: narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 618 | int edg_number = g->system->p.edg_cat_map.size(); | ^ src/mesh.cpp:619:5: warning: do not declare C VLA arrays, use 'std::vector' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 619 | double p_cat_list[edg_number]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:628:9: warning: variable 'edg_idx' of type 'int' can be declared 'const' [misc-const-correctness] 628 | int edg_idx{ std::stoi(curr_edg[1]) }; | ^ | const src/mesh.cpp:628:27: warning: no header providing "std::stoi" is directly included [misc-include-cleaner] 628 | int edg_idx{ std::stoi(curr_edg[1]) }; | ^ src/mesh.cpp:629:9: warning: variable 'edg_cat_val' of type 'double' can be declared 'const' [misc-const-correctness] 629 | double edg_cat_val = it->second; | ^ | const src/mesh.cpp:634:5: warning: variable 'face_number' of type 'int' can be declared 'const' [misc-const-correctness] 634 | int face_number = g->system->p.face_cat_map.size(); | ^ | const src/mesh.cpp:634:23: warning: narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 634 | int face_number = g->system->p.face_cat_map.size(); | ^ src/mesh.cpp:643:9: warning: variable 'face_idx' of type 'int' can be declared 'const' [misc-const-correctness] 643 | int face_idx{ std::stoi(curr_face[1]) }; | ^ | const src/mesh.cpp:644:9: warning: variable 'face_cat_val' of type 'double' can be declared 'const' [misc-const-correctness] 644 | double face_cat_val = it->second; | ^ | const src/mesh.cpp:662:39: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'value_type' (aka 'int') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 662 | g->regions_index[0].push_back(eno); | ^ src/mesh.cpp:666:22: warning: narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 666 | g->element_max = element_3d.size(); | ^ src/mesh.cpp:672:26: warning: use emplace_back instead of push_back [modernize-use-emplace] 672 | g->global_vertex.push_back(Vertices(0.0, 0.0, 0.0)); | ^~~~~~~~~~~~~~~~~~~ ~ | emplace_back( src/mesh.cpp:681:26: warning: use emplace_back instead of push_back [modernize-use-emplace] 681 | g->ppb_edge_list.push_back(ElementList()); | ^~~~~~~~~~~~~~~~~~~~~~~ | emplace_back( src/mesh.cpp:692:5: warning: use range-based for loop instead [modernize-loop-convert] 692 | for (size_t eno = 0; eno < element_3d.size(); eno++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (auto & eno : element_3d) 693 | { 694 | g->regions.push_back(new Triangle(element_3d[eno]->area, g)); | ~~~~~~~~~~~~~~~ | eno src/mesh.cpp:694:30: warning: initializing non-owner argument of type 'value_type &&' (aka 'Region *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 694 | g->regions.push_back(new Triangle(element_3d[eno]->area, g)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:698: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] 698 | image_3d_to_2d(g->regions, element_3d, p_cat_list); | ^ src/mesh.cpp:702:5: warning: use range-based for loop instead [modernize-loop-convert] 702 | for (size_t eno = 0; eno < element_3d.size(); eno++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (auto & eno : element_3d) 703 | { 704 | delete element_3d[eno]; | ~~~~~~~~~~~~~~~ | eno 705 | // FOLLOW-UP 706 | // This used to be a comparison (element3D[eno] == NULL). 707 | // Check if the fix introduces any regressions. 708 | element_3d[eno] = nullptr; | ~~~~~~~~~~~~~~~ | eno src/mesh.cpp:704:9: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory] 704 | delete element_3d[eno]; | ^ ~~~~~~~~~~ src/mesh.cpp:189:5: note: variable declared here 189 | std::vector element_3d; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:713:5: warning: use range-based for loop instead [modernize-loop-convert] 713 | for (size_t gno = 0; gno < gvertex.size(); gno++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (auto & gno : gvertex) 714 | { 715 | delete gvertex[gno]; | ~~~~~~~~~~~~ | gno 716 | gvertex[gno] = nullptr; | ~~~~~~~~~~~~ | gno src/mesh.cpp:715:9: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory] 715 | delete gvertex[gno]; | ^ ~~~~~~~ src/mesh.cpp:186:5: note: variable declared here 186 | std::vector gvertex; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:721:5: warning: use range-based for loop instead [modernize-loop-convert] 721 | for (size_t el = 0; el < e_list.size(); el++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (auto & el : e_list) 722 | { 723 | delete e_list[el]; | ~~~~~~~~~~ | el 724 | e_list[el] = nullptr; | ~~~~~~~~~~ | el src/mesh.cpp:723:9: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory] 723 | delete e_list[el]; | ^ ~~~~~~ src/mesh.cpp:198:5: note: variable declared here 198 | std::vector e_list; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:728:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 728 | return; | ^~~~~~~ 729 | } src/mesh.cpp:734:10: warning: redundant 'edge_sort' declaration [readability-redundant-declaration] 734 | void edge_sort(EdgeRecord**, int); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:83:6: note: previously declared here 83 | void edge_sort(EdgeRecord** e_list, int node_max) | ^ src/mesh.cpp:734:32: warning: all parameters should be named in a function [readability-named-parameter] note: this fix will not be applied because it overlaps with another fix 734 | void edge_sort(EdgeRecord**, int); | ^ src/mesh.cpp:735:10: warning: redundant 'find_connectivity' declaration [readability-redundant-declaration] 735 | void find_connectivity(EdgeRecord**, std::vector&); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:137:6: note: previously declared here 137 | void find_connectivity(EdgeRecord** f_list, std::vector& e_list) | ^ src/mesh.cpp:735:40: warning: all parameters should be named in a function [readability-named-parameter] note: this fix will not be applied because it overlaps with another fix 735 | void find_connectivity(EdgeRecord**, std::vector&); | ^ src/mesh.cpp:737:5: warning: initializing non-owner 'struct EdgeRecord *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 737 | struct EdgeRecord* edg_list = new EdgeRecord(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:737:5: warning: use auto when initializing with new to avoid duplicating the type name [modernize-use-auto] 737 | struct EdgeRecord* edg_list = new EdgeRecord(); | ^~~~~~~~~~~~~~~~~ | auto src/mesh.cpp:768:13: warning: no header providing "std::sort" is directly included [misc-include-cleaner] 7 | sort(v.begin(), v.end()); | ^ src/mesh.cpp:768:13: warning: use a ranges version of this algorithm [modernize-use-ranges] 2 | sort(v.begin(), v.end()); | ^~~~ ~~~~~~~~~ ~~~~~~~ | std::ranges::sort v src/mesh.cpp:770:42: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 770 | add_edge_record(edg_list, v, i, j); | ^ src/mesh.cpp:773:37: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 773 | element_3d[i]->element_id = i; | ^ src/mesh.cpp:775:19: warning: redundant parentheses around expression [readability-redundant-parentheses] 775 | delete_first(&(edg_list)); | ^ ~ src/mesh.cpp:790:93: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'mapped_type' (aka 'int') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 790 | element_3d[e_list[i]->shared_element[0]]->side_to_edge[e_list[i]->shared_edge[0]] = i; | ^ src/mesh.cpp:791:93: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'mapped_type' (aka 'int') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 791 | element_3d[e_list[i]->shared_element[1]]->side_to_edge[e_list[i]->shared_edge[1]] = i; | ^ src/mesh.cpp:794:5: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory] 794 | delete edg_list; | ^ ~~~~~~~~ src/mesh.cpp:737:5: note: variable declared here 737 | struct EdgeRecord* edg_list = new EdgeRecord(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:797:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 797 | return; | ^~~~~~~ 798 | } src/mesh.cpp:805:10: warning: function 'correct_orientation' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage] 805 | void correct_orientation(std::vector&, Triangle3D*&, Triangle3D*&, int, int, int&); | ^ | static src/mesh.cpp:805:53: warning: all parameters should be named in a function [readability-named-parameter] 805 | void correct_orientation(std::vector&, Triangle3D*&, Triangle3D*&, int, int, int&); | ^ | /*gvertex*/ /*next_triangle*/ /*neigh_triangle*/ /*n1*/ /*n2*/ /*flip*/ src/mesh.cpp:823:13: warning: variable 'is_present' of type 'bool' can be declared 'const' [misc-const-correctness] 823 | bool is_present = find(triangle_dead.begin(), triangle_dead.end(), neigh_triangle) != triangle_dead.end(); | ^ | const src/mesh.cpp:823:31: warning: no header providing "std::find" is directly included [misc-include-cleaner] 823 | bool is_present = find(triangle_dead.begin(), triangle_dead.end(), neigh_triangle) != triangle_dead.end(); | ^ src/mesh.cpp:823:31: warning: use a ranges version of this algorithm [modernize-use-ranges] 823 | bool is_present = find(triangle_dead.begin(), triangle_dead.end(), neigh_triangle) != triangle_dead.end(); | ^~~~ ~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~ | std::ranges::find triangle_dead src/mesh.cpp:827:17: warning: variable 'n1' of type 'int' can be declared 'const' [misc-const-correctness] 827 | int n1 = neigh_triangle->side_rev_map[next_triangle->element_id]; | ^ | const src/mesh.cpp:843:25: warning: parameter 'gvertex' is unused [misc-unused-parameters] 843 | std::vector& gvertex, Triangle3D*& next_triangle, Triangle3D*& neigh_triangle, int n1, int n2, int& flip) | ^~~~~~~ | /*gvertex*/ src/mesh.cpp:849:13: warning: no header providing "std::reverse" is directly included [misc-include-cleaner] 849 | reverse(neigh_triangle->side[j].orientation.begin(), neigh_triangle->side[j].orientation.end()); | ^ src/mesh.cpp:855:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 855 | return; | ^~~~~~~ 856 | } src/mesh.cpp:866:13: warning: variable 'n' of type 'int' can be declared 'const' [misc-const-correctness] 866 | int n = element_3d[i]->side_map[j]; | ^ | const src/mesh.cpp:866:45: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'key_type' (aka 'int') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 866 | int n = element_3d[i]->side_map[j]; | ^ src/mesh.cpp:867:13: warning: variable 's' of type 'int' can be declared 'const' [misc-const-correctness] 867 | int s = element_3d[n]->side_rev_map[i]; | ^ | const src/mesh.cpp:867:49: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'key_type' (aka 'int') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 867 | int s = element_3d[n]->side_rev_map[i]; | ^ src/mesh.cpp:880:17: warning: no header providing "exit" is directly included [misc-include-cleaner] 7 | exit(1); | ^ src/mesh.cpp:885:12: warning: redundant parentheses around expression [readability-redundant-parentheses] 885 | return (match); | ^ ~ src/mesh.cpp:906:12: warning: redundant parentheses around expression [readability-redundant-parentheses] 906 | return (graph); | ^ ~ src/mesh.cpp:917:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 917 | std::vector x_row1, y_row1, z_row1, x_row2, y_row2, z_row2, x_row3, y_row3, z_row3; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:918:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 918 | double x, y, z, x1, y1, z1, x2, y2, z2, x3, y3, z3; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:918:12: warning: variable 'x' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 918 | double x, y, z, x1, y1, z1, x2, y2, z2, x3, y3, z3; | ^ src/mesh.cpp:918:15: warning: variable 'y' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 918 | double x, y, z, x1, y1, z1, x2, y2, z2, x3, y3, z3; | ^ src/mesh.cpp:918:18: warning: variable 'z' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 918 | double x, y, z, x1, y1, z1, x2, y2, z2, x3, y3, z3; | ^ src/mesh.cpp:918:21: warning: variable 'x1' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 918 | double x, y, z, x1, y1, z1, x2, y2, z2, x3, y3, z3; | ^ src/mesh.cpp:918:25: warning: variable 'y1' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 918 | double x, y, z, x1, y1, z1, x2, y2, z2, x3, y3, z3; | ^ src/mesh.cpp:918:29: warning: variable 'z1' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 918 | double x, y, z, x1, y1, z1, x2, y2, z2, x3, y3, z3; | ^ src/mesh.cpp:918:33: warning: variable 'x2' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 918 | double x, y, z, x1, y1, z1, x2, y2, z2, x3, y3, z3; | ^ src/mesh.cpp:918:37: warning: variable 'y2' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 918 | double x, y, z, x1, y1, z1, x2, y2, z2, x3, y3, z3; | ^ src/mesh.cpp:918:41: warning: variable 'z2' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 918 | double x, y, z, x1, y1, z1, x2, y2, z2, x3, y3, z3; | ^ src/mesh.cpp:918:45: warning: variable 'x3' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 918 | double x, y, z, x1, y1, z1, x2, y2, z2, x3, y3, z3; | ^ src/mesh.cpp:918:49: warning: variable 'y3' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 918 | double x, y, z, x1, y1, z1, x2, y2, z2, x3, y3, z3; | ^ src/mesh.cpp:918:53: warning: variable 'z3' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 918 | double x, y, z, x1, y1, z1, x2, y2, z2, x3, y3, z3; | ^ src/mesh.cpp:919:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 919 | double x_2, y_2, z_2, xy, xz, yz; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:919:12: warning: variable 'x_2' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 919 | double x_2, y_2, z_2, xy, xz, yz; | ^ src/mesh.cpp:919:17: warning: variable 'y_2' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 919 | double x_2, y_2, z_2, xy, xz, yz; | ^ src/mesh.cpp:919:22: warning: variable 'z_2' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 919 | double x_2, y_2, z_2, xy, xz, yz; | ^ src/mesh.cpp:919:27: warning: variable 'xy' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 919 | double x_2, y_2, z_2, xy, xz, yz; | ^ src/mesh.cpp:919:31: warning: variable 'xz' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 919 | double x_2, y_2, z_2, xy, xz, yz; | ^ src/mesh.cpp:919:35: warning: variable 'yz' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 919 | double x_2, y_2, z_2, xy, xz, yz; | ^ src/mesh.cpp:920:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 920 | double x_3, y_3, z_3; | ^~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:920:12: warning: variable 'x_3' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 920 | double x_3, y_3, z_3; | ^ src/mesh.cpp:920:17: warning: variable 'y_3' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 920 | double x_3, y_3, z_3; | ^ src/mesh.cpp:920:22: warning: variable 'z_3' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 920 | double x_3, y_3, z_3; | ^ src/mesh.cpp:921:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 921 | double x_2y, x_2z, y_2x, y_2z, z_2y, z_2x, xyz; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:921:12: warning: variable 'x_2y' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 921 | double x_2y, x_2z, y_2x, y_2z, z_2y, z_2x, xyz; | ^ src/mesh.cpp:921:18: warning: variable 'x_2z' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 921 | double x_2y, x_2z, y_2x, y_2z, z_2y, z_2x, xyz; | ^ src/mesh.cpp:921:24: warning: variable 'y_2x' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 921 | double x_2y, x_2z, y_2x, y_2z, z_2y, z_2x, xyz; | ^ src/mesh.cpp:921:30: warning: variable 'y_2z' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 921 | double x_2y, x_2z, y_2x, y_2z, z_2y, z_2x, xyz; | ^ src/mesh.cpp:921:36: warning: variable 'z_2y' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 921 | double x_2y, x_2z, y_2x, y_2z, z_2y, z_2x, xyz; | ^ src/mesh.cpp:921:42: warning: variable 'z_2x' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 921 | double x_2y, x_2z, y_2x, y_2z, z_2y, z_2x, xyz; | ^ src/mesh.cpp:921:48: warning: variable 'xyz' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 921 | double x_2y, x_2z, y_2x, y_2z, z_2y, z_2x, xyz; | ^ src/mesh.cpp:923:5: warning: use range-based for loop instead [modernize-loop-convert] 923 | for (size_t eno = 0; eno < element_3d.size(); eno++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (auto & eno : element_3d) 924 | { 925 | // calculate normals to each triangle elements 926 | x = gvertex[element_3d[eno]->side[0].orientation[1]]->x - gvertex[element_3d[eno]->side[0].orientation[0]]->x; | ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ | eno eno 927 | y = gvertex[element_3d[eno]->side[0].orientation[1]]->y - gvertex[element_3d[eno]->side[0].orientation[0]]->y; | ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ | eno eno 928 | z = gvertex[element_3d[eno]->side[0].orientation[1]]->z - gvertex[element_3d[eno]->side[0].orientation[0]]->z; | ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ | eno eno 929 | Eigen::Vector3d rl(x, y, z); 930 | 931 | x = gvertex[element_3d[eno]->side[0].orientation[0]]->x - gvertex[element_3d[eno]->side[0].exclude_point]->x; | ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ | eno eno 932 | y = gvertex[element_3d[eno]->side[0].orientation[0]]->y - gvertex[element_3d[eno]->side[0].exclude_point]->y; | ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ | eno eno 933 | z = gvertex[element_3d[eno]->side[0].orientation[0]]->z - gvertex[element_3d[eno]->side[0].exclude_point]->z; | ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ | eno eno 934 | 935 | Eigen::Vector3d rr(x, y, z); 936 | 937 | element_3d[eno]->given_normal = rr.cross(rl); | ~~~~~~~~~~~~~~~ | eno src/mesh.cpp:929:9: warning: variable 'rl' of type 'Eigen::Vector3d' (aka 'Matrix') can be declared 'const' [misc-const-correctness] 929 | Eigen::Vector3d rl(x, y, z); | ^ | const src/mesh.cpp:935:9: warning: variable 'rr' of type 'Eigen::Vector3d' (aka 'Matrix') can be declared 'const' [misc-const-correctness] 935 | Eigen::Vector3d rr(x, y, z); | ^ | const src/mesh.cpp:940:9: warning: variable 'normal_magnitude' of type 'double' can be declared 'const' [misc-const-correctness] 940 | double normal_magnitude = element_3d[eno]->given_normal.norm(); | ^ | const src/mesh.cpp:1006:16: warning: use emplace_back instead of push_back [modernize-use-emplace] 1006 | x_row1.push_back(Eigen::Vector3d(x_2, 2 * xy, 2 * xz)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~ | emplace_back( src/mesh.cpp:1007:16: warning: use emplace_back instead of push_back [modernize-use-emplace] 1007 | y_row1.push_back(Eigen::Vector3d(2 * xy, y_2, 2 * yz)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~ | emplace_back( src/mesh.cpp:1008:16: warning: use emplace_back instead of push_back [modernize-use-emplace] 1008 | z_row1.push_back(Eigen::Vector3d(2 * xz, 2 * yz, z_2)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~ | emplace_back( src/mesh.cpp:1010:16: warning: use emplace_back instead of push_back [modernize-use-emplace] 1010 | x_row2.push_back(Eigen::Vector3d(x_2y, y_2x, 2 * xyz)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~ | emplace_back( src/mesh.cpp:1011:16: warning: use emplace_back instead of push_back [modernize-use-emplace] 1011 | y_row2.push_back(Eigen::Vector3d(x_2z, 2 * xyz, z_2x)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~ | emplace_back( src/mesh.cpp:1012:16: warning: use emplace_back instead of push_back [modernize-use-emplace] 1012 | z_row2.push_back(Eigen::Vector3d(2 * xyz, y_2z, z_2y)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~ | emplace_back( src/mesh.cpp:1014:16: warning: use emplace_back instead of push_back [modernize-use-emplace] 1014 | x_row3.push_back(Eigen::Vector3d(x_3, 3 * x_2y, 3 * x_2z)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~ | emplace_back( src/mesh.cpp:1015:16: warning: use emplace_back instead of push_back [modernize-use-emplace] 1015 | y_row3.push_back(Eigen::Vector3d(3 * y_2x, y_3, 3 * y_2z)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~ | emplace_back( src/mesh.cpp:1016:16: warning: use emplace_back instead of push_back [modernize-use-emplace] 1016 | z_row3.push_back(Eigen::Vector3d(3 * z_2x, 3 * z_2y, z_3)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~ | emplace_back( src/mesh.cpp:1019:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 1019 | double m000(0.0), m100(0.0), m010(0.0), m001(0.0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:1020:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 1020 | double m110(0.0), m101(0.0), m011(0.0), m200(0.0), m020(0.0), m002(0.0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:1056:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 1056 | double ixx, iyy, izz, ixy, ixz, iyz; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:1056:12: warning: variable 'ixx' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1056 | double ixx, iyy, izz, ixy, ixz, iyz; | ^ src/mesh.cpp:1056:17: warning: variable 'iyy' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1056 | double ixx, iyy, izz, ixy, ixz, iyz; | ^ src/mesh.cpp:1056:22: warning: variable 'izz' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1056 | double ixx, iyy, izz, ixy, ixz, iyz; | ^ src/mesh.cpp:1056:27: warning: variable 'ixy' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1056 | double ixx, iyy, izz, ixy, ixz, iyz; | ^ src/mesh.cpp:1056:32: warning: variable 'ixz' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1056 | double ixx, iyy, izz, ixy, ixz, iyz; | ^ src/mesh.cpp:1056:37: warning: variable 'iyz' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1056 | double ixx, iyy, izz, ixy, ixz, iyz; | ^ src/mesh.cpp:1067:12: warning: no header providing "Eigen::Matrix3d" is directly included [misc-include-cleaner] 1067 | Eigen::Matrix3d matrix{ { ixx, -ixy, -ixz }, { -ixy, iyy, -iyz }, { -ixz, -iyz, izz } }; | ^ src/mesh.cpp:1076:15: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1076 | radii(i, 0) = 1.0 / std::sqrt(std::fabs(e_val[i])); | ^ src/mesh.cpp:1076:34: warning: no header providing "std::sqrt" is directly included [misc-include-cleaner] 7 | radii(i, 0) = 1.0 / std::sqrt(std::fabs(e_val[i])); | ^ src/mesh.cpp:1076:44: warning: no header providing "std::fabs" is directly included [misc-include-cleaner] 1076 | radii(i, 0) = 1.0 / std::sqrt(std::fabs(e_val[i])); | ^ src/mesh.cpp:1076:55: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1076 | radii(i, 0) = 1.0 / std::sqrt(std::fabs(e_val[i])); | ^ src/mesh.cpp:1083:9: warning: 'push_back' is called inside a loop; consider pre-allocating the container capacity before the loop [performance-inefficient-vector-operation] 1081 | for (size_t i = 0; i < 3; ++i) 1082 | { 1083 | orig.push_back(radii(i, 0)); | ^ src/mesh.cpp:1083:24: warning: narrowing conversion from 'Scalar' (aka 'double') to 'value_type' (aka 'float') [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1083 | orig.push_back(radii(i, 0)); | ^ src/mesh.cpp:1083:30: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1083 | orig.push_back(radii(i, 0)); | ^ src/mesh.cpp:1087:22: warning: no header providing "std::pair" is directly included [misc-include-cleaner] 7 | std::vector> vp; | ^ src/mesh.cpp:1092:12: warning: use emplace_back instead of push_back [modernize-use-emplace] 1092 | vp.push_back(std::make_pair(orig[i], i)); | ^~~~~~~~~~~~~~~~~~~~~~~~ ~ | emplace_back src/mesh.cpp:1092:27: warning: no header providing "std::make_pair" is directly included [misc-include-cleaner] 1092 | vp.push_back(std::make_pair(orig[i], i)); | ^ src/mesh.cpp:1096:5: warning: no header providing "std::sort" is directly included [misc-include-cleaner] 1096 | sort(vp.begin(), vp.end()); | ^ src/mesh.cpp:1096:5: warning: use a ranges version of this algorithm [modernize-use-ranges] 1096 | sort(vp.begin(), vp.end()); | ^~~~ ~~~~~~~~~~ ~~~~~~~~ | std::ranges::sort vp src/mesh.cpp:1100:13: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1100 | pcx(i, 0) = evec_mat(i, vp[0].second); | ^ src/mesh.cpp:1100:30: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1100 | pcx(i, 0) = evec_mat(i, vp[0].second); | ^ src/mesh.cpp:1100:33: warning: narrowing conversion from 'unsigned long' to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1100 | pcx(i, 0) = evec_mat(i, vp[0].second); | ^ src/mesh.cpp:1101:13: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1101 | pbx(i, 0) = evec_mat(i, vp[1].second); | ^ src/mesh.cpp:1101:30: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1101 | pbx(i, 0) = evec_mat(i, vp[1].second); | ^ src/mesh.cpp:1101:33: warning: narrowing conversion from 'unsigned long' to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1101 | pbx(i, 0) = evec_mat(i, vp[1].second); | ^ src/mesh.cpp:1102:13: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1102 | pax(i, 0) = evec_mat(i, vp[2].second); | ^ src/mesh.cpp:1102:30: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1102 | pax(i, 0) = evec_mat(i, vp[2].second); | ^ src/mesh.cpp:1102:33: warning: narrowing conversion from 'unsigned long' to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1102 | pax(i, 0) = evec_mat(i, vp[2].second); | ^ src/mesh.cpp:1106:5: warning: use range-based for loop instead [modernize-loop-convert] 1106 | for (size_t gno = 0; gno < gvertex.size(); ++gno) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (auto & gno : gvertex) 1107 | { 1108 | gvertex[gno]->x -= cm(0, 0); | ~~~~~~~~~~~~ | gno 1109 | gvertex[gno]->y -= cm(1, 0); | ~~~~~~~~~~~~ | gno 1110 | gvertex[gno]->z -= cm(2, 0); | ~~~~~~~~~~~~ | gno src/mesh.cpp:1126:9: warning: use range-based for loop instead [modernize-loop-convert] 1126 | for (size_t eno = 0; eno < element_3d.size(); eno++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (auto & eno : element_3d) 1127 | { 1128 | element_3d[eno]->given_normal *= -1.0; | ~~~~~~~~~~~~~~~ | eno src/mesh.cpp:1139:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 1139 | int eno, neno, p1, p2; | ^~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:1139:9: warning: variable 'eno' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1139 | int eno, neno, p1, p2; | ^ src/mesh.cpp:1139:14: warning: variable 'neno' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1139 | int eno, neno, p1, p2; | ^ src/mesh.cpp:1139:20: warning: variable 'p1' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1139 | int eno, neno, p1, p2; | ^ src/mesh.cpp:1139:24: warning: variable 'p2' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1139 | int eno, neno, p1, p2; | ^ src/mesh.cpp:1140:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 1140 | double x, y, z, signal, edge_angle; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:1140:12: warning: variable 'x' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1140 | double x, y, z, signal, edge_angle; | ^ src/mesh.cpp:1140:15: warning: variable 'y' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1140 | double x, y, z, signal, edge_angle; | ^ src/mesh.cpp:1140:18: warning: variable 'z' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1140 | double x, y, z, signal, edge_angle; | ^ src/mesh.cpp:1140:21: warning: variable 'signal' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1140 | double x, y, z, signal, edge_angle; | ^ src/mesh.cpp:1140:29: warning: variable 'edge_angle' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1140 | double x, y, z, signal, edge_angle; | ^ src/mesh.cpp:1143:5: warning: use range-based for loop instead [modernize-loop-convert] 1143 | for (size_t i = 0; i < e_list.size(); ++i) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (auto & i : e_list) 1144 | { 1145 | x = gvertex[e_list[i]->nodes[0]]->x - gvertex[e_list[i]->nodes[1]]->x; | ~~~~~~~~~ ~~~~~~~~~ | i i 1146 | y = gvertex[e_list[i]->nodes[0]]->y - gvertex[e_list[i]->nodes[1]]->y; | ~~~~~~~~~ ~~~~~~~~~ | i i 1147 | z = gvertex[e_list[i]->nodes[0]]->z - gvertex[e_list[i]->nodes[1]]->z; | ~~~~~~~~~ ~~~~~~~~~ | i i 1148 | 1149 | // length of an edge 1150 | e_list[i]->length = std::sqrt(x * x + y * y + z * z); | ~~~~~~~~~ | i 1151 | 1152 | eno = e_list[i]->shared_element[0]; | ~~~~~~~~~ | i 1153 | neno = e_list[i]->shared_element[1]; | ~~~~~~~~~ | i 1154 | 1155 | p2 = element_3d[eno]->side[e_list[i]->shared_edge[0]].exclude_point; | ~~~~~~~~~ | i 1156 | p1 = element_3d[neno]->side[e_list[i]->shared_edge[1]].exclude_point; | ~~~~~~~~~ | i src/mesh.cpp:1168:9: warning: variable 'acos_corr' of type 'double' can be declared 'const' [misc-const-correctness] 1168 | double acos_corr = element_3d[eno]->given_normal.dot(element_3d[neno]->given_normal); | ^ | const src/mesh.cpp:1169:27: warning: no header providing "std::acos" is directly included [misc-include-cleaner] 1169 | edge_angle = std::acos(std::min(std::max(acos_corr, -1.0), 1.0)); | ^ src/mesh.cpp:1169:37: warning: no header providing "std::min" is directly included [misc-include-cleaner] 1169 | edge_angle = std::acos(std::min(std::max(acos_corr, -1.0), 1.0)); | ^ src/mesh.cpp:1169:46: warning: no header providing "std::max" is directly included [misc-include-cleaner] 1169 | edge_angle = std::acos(std::min(std::max(acos_corr, -1.0), 1.0)); | ^ src/mesh.cpp:1178:26: warning: no header providing "PI" is directly included [misc-include-cleaner] 3 | edge_angle = PI - edge_angle; | ^ src/mesh.cpp:1195:5: warning: use range-based for loop instead [modernize-loop-convert] 1195 | for (size_t eno = 0; eno < element_3d.size(); ++eno) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (auto & eno : element_3d) 1196 | { 1197 | double l(0.0); 1198 | 1199 | for (size_t sid = 0; sid < 3; sid++) 1200 | { 1201 | l += e_list[element_3d[eno]->side_to_edge[sid]]->length; | ~~~~~~~~~~~~~~~ | eno 1202 | 1203 | double side_pcat(element_3d[eno]->side[sid].edg_bend_angle / element_3d[eno]->edg_ang_norm); | ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ | eno eno 1204 | 1205 | element_3d[eno]->side[sid].p_cat = side_pcat; | ~~~~~~~~~~~~~~~ | eno 1206 | } 1207 | element_3d[eno]->peri_meter = l; | ~~~~~~~~~~~~~~~ | eno src/mesh.cpp:1201:55: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'key_type' (aka 'int') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1201 | l += e_list[element_3d[eno]->side_to_edge[sid]]->length; | ^ src/mesh.cpp:1203:13: warning: variable 'side_pcat' of type 'double' can be declared 'const' [misc-const-correctness] 1203 | double side_pcat(element_3d[eno]->side[sid].edg_bend_angle / element_3d[eno]->edg_ang_norm); | ^ | const src/mesh.cpp:1214:5: warning: use range-based for loop instead [modernize-loop-convert] 1214 | for (size_t eno = 0; eno < element_3d.size(); eno++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (auto & eno : element_3d) 1215 | { 1216 | element_3d[eno]->vertex[0] << gvertex[element_3d[eno]->vertex_ids[0]]->x, | ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ | eno eno 1217 | gvertex[element_3d[eno]->vertex_ids[0]]->y, gvertex[element_3d[eno]->vertex_ids[0]]->z; | ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ | eno eno 1218 | element_3d[eno]->vertex[1] << gvertex[element_3d[eno]->vertex_ids[1]]->x, | ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ | eno eno 1219 | gvertex[element_3d[eno]->vertex_ids[1]]->y, gvertex[element_3d[eno]->vertex_ids[1]]->z; | ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ | eno eno 1220 | element_3d[eno]->vertex[2] << gvertex[element_3d[eno]->vertex_ids[2]]->x, | ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ | eno eno 1221 | gvertex[element_3d[eno]->vertex_ids[2]]->y, gvertex[element_3d[eno]->vertex_ids[2]]->z; | ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ | eno eno 1222 | 1223 | // mid-point coordinate for each triangle 1224 | element_3d[eno]->mid_point | ~~~~~~~~~~~~~~~ | eno 1225 | = (element_3d[eno]->vertex[0] + element_3d[eno]->vertex[1] + element_3d[eno]->vertex[2]) / 3.0; | ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ | eno eno eno src/mesh.cpp:1229:6: warning: function 'image_3d_to_2d' has cognitive complexity of 42 (threshold 25) [readability-function-cognitive-complexity] 1229 | void image_3d_to_2d(std::vector& regions, std::vector& element_3d, double p_cat_curv_list[]) | ^ src/mesh.cpp:1239:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1239 | for (size_t eno = 0; eno < element_3d.size(); eno++) | ^ src/mesh.cpp:1254:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1254 | if ((cross_magnitude > 0) || (cos_angle < 0)) | ^ src/mesh.cpp:1254:35: note: +1 1254 | if ((cross_magnitude > 0) || (cos_angle < 0)) | ^ src/mesh.cpp:1257:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1257 | if (cross_magnitude > 0) | ^ src/mesh.cpp:1265:13: note: +1, nesting level increased to 3 1265 | else | ^ src/mesh.cpp:1315:9: note: +1, nesting level increased to 2 1315 | else | ^ src/mesh.cpp:1337:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1337 | if (s <= 0) | ^ src/mesh.cpp:1346:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1346 | for (size_t i = 0; i < 3; i++) | ^ src/mesh.cpp:1364:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1364 | if (total_pcat > 1.0) | ^ src/mesh.cpp:1369:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1369 | for (int sid = 0; sid < 3; sid++) | ^ src/mesh.cpp:1380:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1380 | for (size_t eno = 0; eno < element_3d.size(); eno++) | ^ src/mesh.cpp:1382:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1382 | for (size_t j = 0; j < 3; j++) | ^ src/mesh.cpp:1424:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1424 | if (std::fabs(a1.determinant() * a2.determinant()) <= 0.0) | ^ src/mesh.cpp:1441:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1441 | if (ts.norm() > 0) | ^ src/mesh.cpp:1451:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1451 | if (angle < 0) | ^ src/mesh.cpp:1455:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1455 | if (angle > 2 * PI) | ^ src/mesh.cpp:1465:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1465 | for (int p = 0; p < 2; p++) | ^ src/mesh.cpp:1470:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1470 | for (int i = 0; i < 3; i++) | ^ src/mesh.cpp:1479:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1479 | for (size_t ax = 0; ax < 2; ax++) | ^ src/mesh.cpp:1485:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1485 | if (cross_magnitude > 0.0) | ^ src/mesh.cpp:1504:13: note: +1, nesting level increased to 3 1504 | else | ^ src/mesh.cpp:1229:90: warning: do not declare C-style arrays, use 'std::span' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 1229 | void image_3d_to_2d(std::vector& regions, std::vector& element_3d, double p_cat_curv_list[]) | ^~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:1229:97: warning: pointer parameter 'p_cat_curv_list' can be pointer to const [readability-non-const-parameter] 1229 | void image_3d_to_2d(std::vector& regions, std::vector& element_3d, double p_cat_curv_list[]) | ^ | const src/mesh.cpp:1261:31: warning: no header providing "std::sin" is directly included [misc-include-cleaner] 1261 | cross *= std::sin(regions[eno]->rot_angle / 2); | ^ src/mesh.cpp:1271:40: warning: no header providing "std::cos" is directly included [misc-include-cleaner] 1271 | regions[eno]->q.w() = std::cos(regions[eno]->rot_angle / 2); | ^ src/mesh.cpp:1278:20: warning: no header providing "Eigen::Quaternion" is directly included [misc-include-cleaner] 2 | Eigen::Quaternion qr(0.0, 0.0, 0.0, 0.0); | ^ src/mesh.cpp:1281:13: warning: variable 'q_mp' of type 'Eigen::Quaternion' can be declared 'const' [misc-const-correctness] 1281 | Eigen::Quaternion q_mp( | ^ | const src/mesh.cpp:1287:13: warning: variable 'q_a' of type 'Eigen::Quaternion' can be declared 'const' [misc-const-correctness] 1287 | Eigen::Quaternion q_a( | ^ | const src/mesh.cpp:1293:13: warning: variable 'q_b' of type 'Eigen::Quaternion' can be declared 'const' [misc-const-correctness] 1293 | Eigen::Quaternion q_b( | ^ | const src/mesh.cpp:1299:13: warning: variable 'q_c' of type 'Eigen::Quaternion' can be declared 'const' [misc-const-correctness] 1299 | Eigen::Quaternion q_c( | ^ | const src/mesh.cpp:1306:13: warning: variable 'n_c' of type 'Eigen::Quaternion' can be declared 'const' [misc-const-correctness] 1306 | Eigen::Quaternion n_c(0, | ^ | const src/mesh.cpp:1335:9: warning: variable 's' of type 'double' can be declared 'const' [misc-const-correctness] 1335 | double s = nz.dot(z); | ^ | const src/mesh.cpp:1364:9: warning: use `std::min` instead of `>` [readability-use-std-min-max] 2 | if (total_pcat > 1.0) | ^~~~~~~~~~~~~~~~~~~~~ | total_pcat = std::min(total_pcat, 1.0); 3 | { | ~ 4 | total_pcat = 1.0; | ~~~~~~~~~~~~~~~~~ 5 | } | ~ src/mesh.cpp:1374:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 1374 | Eigen::Matrix2d a1, a2; | ^~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:1374:12: warning: no header providing "Eigen::Matrix2d" is directly included [misc-include-cleaner] 1374 | Eigen::Matrix2d a1, a2; | ^ src/mesh.cpp:1375:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 1375 | Eigen::Vector2d b1, b2; | ^~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:1376:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 1376 | int v0, v1, v2; | ^~~~~~~~~~~~~~~ src/mesh.cpp:1376:9: warning: variable 'v0' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1376 | int v0, v1, v2; | ^ src/mesh.cpp:1376:13: warning: variable 'v1' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1376 | int v0, v1, v2; | ^ src/mesh.cpp:1376:17: warning: variable 'v2' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1376 | int v0, v1, v2; | ^ src/mesh.cpp:1377:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 1377 | double cos_theta, sin_theta, x, y; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:1377:12: warning: variable 'cos_theta' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1377 | double cos_theta, sin_theta, x, y; | ^ src/mesh.cpp:1377:23: warning: variable 'sin_theta' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1377 | double cos_theta, sin_theta, x, y; | ^ src/mesh.cpp:1377:34: warning: variable 'x' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1377 | double cos_theta, sin_theta, x, y; | ^ src/mesh.cpp:1377:37: warning: variable 'y' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1377 | double cos_theta, sin_theta, x, y; | ^ src/mesh.cpp:1384:13: warning: variable 'ceno' of type 'int' can be declared 'const' [misc-const-correctness] 1384 | int ceno = regions[eno]->side_map[j]; | ^ | const src/mesh.cpp:1384:47: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'key_type' (aka 'int') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1384 | int ceno = regions[eno]->side_map[j]; | ^ src/mesh.cpp:1385:13: warning: variable 'cesd' of type 'int' can be declared 'const' [misc-const-correctness] 1385 | int cesd = regions[ceno]->side_rev_map[regions[eno]->region_id]; | ^ | const src/mesh.cpp:1422:13: warning: variable 'g' of type 'Eigen::MatrixXd' (aka 'Matrix') can be declared 'const' [misc-const-correctness] 1422 | Eigen::MatrixXd g = a1.inverse(); | ^ | const src/mesh.cpp:1422:20: warning: no header providing "Eigen::MatrixXd" is directly included [misc-include-cleaner] 1422 | Eigen::MatrixXd g = a1.inverse(); | ^ src/mesh.cpp:1433:13: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 1433 | Eigen::Vector3d s1(ab(0, 0), ab(1, 0), 0.0), s2(ba(0, 0), ba(1, 0), 0.0), ts(0.0, 0.0, 0.0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:1433:13: warning: variable 's1' of type 'Eigen::Vector3d' (aka 'Matrix') can be declared 'const' [misc-const-correctness] src/mesh.cpp:1440:13: warning: variable 'z' of type 'Eigen::Vector3d' (aka 'Matrix') can be declared 'const' [misc-const-correctness] 1440 | Eigen::Vector3d z(0.0, 0.0, 1.0); | ^ | const src/mesh.cpp:1443:21: warning: variable 'k' is not initialized [cppcoreguidelines-init-variables] 1443 | int k; | ^ | = 0 src/mesh.cpp:1445:21: warning: C-style casts are discouraged; use static_cast [modernize-avoid-c-style-cast] 1445 | k = (int)round(z.dot(ts)); | ^~~~~ | static_cast( ) src/mesh.cpp:1445:26: warning: no header providing "round" is directly included [misc-include-cleaner] 1445 | k = (int)round(z.dot(ts)); | ^ src/mesh.cpp:1449:28: warning: no header providing "atan2" is directly included [misc-include-cleaner] 1449 | double angle = atan2(sin_theta, cos_theta); | ^ src/mesh.cpp:1467:13: warning: 'push_back' is called inside a loop; consider pre-allocating the container capacity before the loop [performance-inefficient-vector-operation] 1465 | for (int p = 0; p < 2; p++) 1466 | { 1467 | ends_3d.push_back(Eigen::Vector3d(0, 0, 0)); | ^ src/mesh.cpp:1467:21: warning: use emplace_back instead of push_back [modernize-use-emplace] 1467 | ends_3d.push_back(Eigen::Vector3d(0, 0, 0)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~ | emplace_back( src/mesh.cpp:1472:39: warning: use emplace_back instead of push_back [modernize-use-emplace] 1472 | regions[eno]->orientation.push_back(Eigen::Vector3d(0.0, 0.0, 0.0)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~ | emplace_back( src/mesh.cpp:1490:17: warning: variable 'q_i0' of type 'Eigen::Quaternion' can be declared 'const' [misc-const-correctness] 1490 | Eigen::Quaternion q_i0(0, 0.0, 0.0, 0.0); | ^ | const src/mesh.cpp:1496:17: warning: variable 'q_i1' of type 'Eigen::Quaternion' can be declared 'const' [misc-const-correctness] 1496 | Eigen::Quaternion q_i1(0, x, y, 0.0); | ^ | const src/mesh.cpp:1519:18: warning: no header providing "std::swap" is directly included [misc-include-cleaner] 1519 | std::swap(x, y); | ^ src/mesh.cpp:1532:29: warning: the parameter 'output_dir' of type 'std::string' (aka 'basic_string') is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 1532 | std::string output_dir) | ^ | const & src/mesh.cpp:1534:5: warning: variable 'filename1' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness] 1534 | std::string filename1(output_dir + "/ViewMeshDefault.off"); | ^ | const src/mesh.cpp:1535:5: warning: variable 'filename2' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness] 1535 | std::string filename2(output_dir + "/ViewMeshFaceTag.dat"); | ^ | const src/mesh.cpp:1536:5: warning: variable 'filename3' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness] 1536 | std::string filename3(output_dir + "/ViewMeshEdgeTag.dat"); | ^ | const src/mesh.cpp:1537:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 1537 | std::fstream fp1, fp2, fp3; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:1546:5: warning: use range-based for loop instead [modernize-loop-convert] 1546 | for (size_t i = 0; i < gvertex.size(); i++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (auto & i : gvertex) 1547 | { 1548 | fp1 << gvertex[i]->x + centroid(0, 0) << " " << gvertex[i]->y + centroid(1, 0) << " " | ~~~~~~~~~~ ~~~~~~~~~~ | i i 1549 | << gvertex[i]->z + centroid(2, 0) << std::endl; | ~~~~~~~~~~ | i src/mesh.cpp:1552:5: warning: use range-based for loop instead [modernize-loop-convert] 1552 | for (size_t i = 0; i < element_3d.size(); i++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (auto & i : element_3d) 1553 | { 1554 | fp1 << 3 << " "; 1555 | for (size_t j = 0; j < 3; j++) 1556 | { 1557 | fp1 << element_3d[i]->vertex_ids[j] << " "; | ~~~~~~~~~~~~~ | i 1558 | } 1559 | fp1 << std::endl; 1560 | 1561 | fp2 << element_3d[i]->face_tag << " "; | ~~~~~~~~~~~~~ | i 1562 | fp3 << element_3d[i]->edge_tag << " "; | ~~~~~~~~~~~~~ | i src/mesh.cpp:1573:5: warning: variable 'ba' of type 'Eigen::Vector3d' (aka 'Matrix') can be declared 'const' [misc-const-correctness] 1573 | Eigen::Vector3d ba = b - a; | ^ | const src/mesh.cpp:1574:5: warning: variable 'n_dot_a' of type 'float' can be declared 'const' [misc-const-correctness] 1574 | float n_dot_a = n.dot(a); | ^ | const src/mesh.cpp:1574:21: warning: narrowing conversion from 'typename ScalarBinaryOpTraits>::Scalar, typename internal::traits>::Scalar>::ReturnType' (aka 'double') to 'float' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1574 | float n_dot_a = n.dot(a); | ^ src/mesh.cpp:1575:5: warning: variable 'n_dot_ba' of type 'float' can be declared 'const' [misc-const-correctness] 1575 | float n_dot_ba = n.dot(ba); | ^ | const src/mesh.cpp:1575:22: warning: narrowing conversion from 'typename ScalarBinaryOpTraits>::Scalar, typename internal::traits>::Scalar>::ReturnType' (aka 'double') to 'float' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1575 | float n_dot_ba = n.dot(ba); | ^ src/mesh.cpp:1576:5: warning: variable 'd' of type 'float' can be declared 'const' [misc-const-correctness] 1576 | float d = n.dot(p); | ^ | const src/mesh.cpp:1576:15: warning: narrowing conversion from 'typename ScalarBinaryOpTraits>::Scalar, typename internal::traits>::Scalar>::ReturnType' (aka 'double') to 'float' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1576 | float d = n.dot(p); | ^ src/mesh.cpp:1578:5: warning: variable 't' of type 'float' can be declared 'const' [misc-const-correctness] 1578 | float t = (d - n_dot_a) / n_dot_ba; | ^ | const src/mesh.cpp:1587:12: warning: redundant parentheses around expression [readability-redundant-parentheses] 1587 | return (intersect); | ^ ~ src/mesh.cpp:1592:5: warning: variable 'v_size' of type 'size_t' (aka 'unsigned long') can be declared 'const' [misc-const-correctness] 1592 | size_t v_size(v.size()); | ^ | const src/mesh.cpp:1593:7: warning: use emplace_back instead of push_back [modernize-use-emplace] 1593 | v.push_back(Vertices(v[0].x, v[0].y, v[0].z)); | ^~~~~~~~~~~~~~~~~~~ ~ | emplace_back( src/mesh.cpp:1596:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 1596 | float an, ax, ay, az; | ^~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:1596:11: warning: variable 'an' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1596 | float an, ax, ay, az; | ^ src/mesh.cpp:1596:15: warning: variable 'ax' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1596 | float an, ax, ay, az; | ^ src/mesh.cpp:1596:19: warning: variable 'ay' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1596 | float an, ax, ay, az; | ^ src/mesh.cpp:1596:23: warning: variable 'az' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1596 | float an, ax, ay, az; | ^ src/mesh.cpp:1597:9: warning: variable 'coord' is not initialized [cppcoreguidelines-init-variables] 1597 | int coord; | ^ | = 0 src/mesh.cpp:1598:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 1598 | size_t i, j, k; | ^~~~~~~~~~~~~~~ src/mesh.cpp:1598:12: warning: variable 'i' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1598 | size_t i, j, k; | ^ src/mesh.cpp:1598:15: warning: variable 'j' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1598 | size_t i, j, k; | ^ src/mesh.cpp:1598:18: warning: variable 'k' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1598 | size_t i, j, k; | ^ src/mesh.cpp:1606:10: warning: narrowing conversion from 'Scalar' (aka 'double') to 'float' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1606 | ax = (n(0, 0) > 0 ? n(0, 0) : -n(0, 0)); | ^ src/mesh.cpp:1607:10: warning: narrowing conversion from 'Scalar' (aka 'double') to 'float' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1607 | ay = (n(1, 0) > 0 ? n(1, 0) : -n(1, 0)); | ^ src/mesh.cpp:1608:10: warning: narrowing conversion from 'Scalar' (aka 'double') to 'float' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1608 | az = (n(2, 0) > 0 ? n(2, 0) : -n(2, 0)); | ^ src/mesh.cpp:1624:5: warning: switching on non-enum value without default case may not cover all cases [bugprone-switch-missing-default-case] 1624 | switch (coord) | ^ src/mesh.cpp:1629:25: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1629 | area += (v[i].y * (v[j].z - v[k].z)); | ^ src/mesh.cpp:1636:25: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1636 | area += (v[i].z * (v[j].x - v[k].x)); | ^ src/mesh.cpp:1643:25: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1643 | area += (v[i].x * (v[j].y - v[k].y)); | ^ src/mesh.cpp:1648:5: warning: switching on non-enum value without default case may not cover all cases [bugprone-switch-missing-default-case] 1648 | switch (coord) | ^ src/mesh.cpp:1651:21: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1651 | area += (v[v_size].y * (v[1].z - v[v_size - 1].z)); | ^ src/mesh.cpp:1654:21: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1654 | area += (v[v_size].z * (v[1].x - v[v_size - 1].x)); | ^ src/mesh.cpp:1657:21: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1657 | area += (v[v_size].x * (v[1].y - v[v_size - 1].y)); | ^ src/mesh.cpp:1662:15: warning: no header providing "std::sqrt" is directly included [misc-include-cleaner] 1662 | an = std::sqrt(ax * ax + ay * ay + az * az); | ^ src/mesh.cpp:1663:5: warning: switching on non-enum value without default case may not cover all cases [bugprone-switch-missing-default-case] 1663 | switch (coord) | ^ src/mesh.cpp:1666:21: warning: narrowing conversion from 'Scalar' (aka 'double') to 'float' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1666 | area *= (an / (2 * n(0, 0))); | ^ src/mesh.cpp:1669:21: warning: narrowing conversion from 'Scalar' (aka 'double') to 'float' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1669 | area *= (an / (2 * n(1, 0))); | ^ src/mesh.cpp:1672:21: warning: narrowing conversion from 'Scalar' (aka 'double') to 'float' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1672 | area *= (an / (2 * n(2, 0))); | ^ src/mesh.cpp:1675:17: warning: no header providing "std::fabs" is directly included [misc-include-cleaner] 1675 | return std::fabs(area); | ^ src/mesh.cpp:1678:8: warning: function 'intersecting_polygon' has cognitive complexity of 26 (threshold 25) [readability-function-cognitive-complexity] 1678 | double intersecting_polygon(std::vector& polygon, | ^ src/mesh.cpp:1687:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1687 | if (shape_type == "2D-plane") | ^ src/mesh.cpp:1691:5: note: +1, nesting level increased to 1 1691 | else | ^ src/mesh.cpp:1695:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1695 | for (size_t eno = 0; eno < regions.size(); eno++) | ^ src/mesh.cpp:1705:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1705 | for (size_t i = 0; i < e_list.size(); i++) | ^ src/mesh.cpp:1721:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1721 | if (intersect) | ^ src/mesh.cpp:1728:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1728 | for (size_t i = 0; i < intersected_edges.size(); i++) | ^ src/mesh.cpp:1748:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1748 | while (true) | ^ src/mesh.cpp:1751:34: note: +3, including nesting penalty of 2, nesting level increased to 3 1751 | ? regions[current_face]->intersect_edg[1] | ^ src/mesh.cpp:1755:28: note: +3, including nesting penalty of 2, nesting level increased to 3 1755 | ? e_list[current_edge_index].shared_element[1] | ^ src/mesh.cpp:1758:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1758 | if (current_edge_index == start_edge_index) | ^ src/mesh.cpp:1767:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1767 | for (size_t i = 0; i < polygon_edges.size(); i++) | ^ src/mesh.cpp:1780:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1780 | for (size_t i = 0; i < regions.size(); i++) | ^ src/mesh.cpp:1684:41: warning: the parameter 'shape_type' of type 'std::string' (aka 'basic_string') is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 1684 | std::string shape_type) | ^ | const & src/mesh.cpp:1695:9: warning: use range-based for loop instead [modernize-loop-convert] 1695 | for (size_t eno = 0; eno < regions.size(); eno++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (auto & region : regions) 1696 | { 1697 | // FOLLOW-UP 1698 | // This used to be a comparison (regions[eno]->polyIntersectMark==0). 1699 | // Check if the fix introduces any regressions. 1700 | regions[eno]->poly_intersect_mark = 0; | ~~~~~~~~~~~~ | region src/mesh.cpp:1704:9: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 1704 | double x, y, z; | ^~~~~~~~~~~~~~~ src/mesh.cpp:1704:16: warning: variable 'x' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1704 | double x, y, z; | ^ src/mesh.cpp:1704:19: warning: variable 'y' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1704 | double x, y, z; | ^ src/mesh.cpp:1704:22: warning: variable 'z' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1704 | double x, y, z; | ^ src/mesh.cpp:1710:13: warning: variable 'l_s' of type 'Eigen::Vector3d' (aka 'Matrix') can be declared 'const' [misc-const-correctness] 1710 | Eigen::Vector3d l_s(x, y, z); | ^ | const src/mesh.cpp:1715:13: warning: variable 'l_e' of type 'Eigen::Vector3d' (aka 'Matrix') can be declared 'const' [misc-const-correctness] 1715 | Eigen::Vector3d l_e(x, y, z); | ^ | const src/mesh.cpp:1719:13: warning: variable 'intersect' of type 'bool' can be declared 'const' [misc-const-correctness] 1719 | bool intersect = line_plane_intersect(np, cp, l_s, l_e, i_vec); | ^ | const src/mesh.cpp:1723:45: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'value_type' (aka 'int') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1723 | intersected_edges.push_back(i); | ^ src/mesh.cpp:1728:9: warning: use range-based for loop instead [modernize-loop-convert] 1728 | for (size_t i = 0; i < intersected_edges.size(); i++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (int edg : intersected_edges) 1729 | { 1730 | int edg = intersected_edges[i]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1731 | 1732 | int face_id = e_list[edg].shared_element[0]; src/mesh.cpp:1730:13: warning: variable 'edg' of type 'int' can be declared 'const' [misc-const-correctness] note: this fix will not be applied because it overlaps with another fix 1730 | int edg = intersected_edges[i]; | ^ src/mesh.cpp:1742:9: warning: variable 'start_edge_index' of type 'int' can be declared 'const' [misc-const-correctness] 1742 | int start_edge_index = intersected_edges[0]; | ^ | const src/mesh.cpp:1767:9: warning: use range-based for loop instead [modernize-loop-convert] 1767 | for (size_t i = 0; i < polygon_edges.size(); i++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (int edg : polygon_edges) 1768 | { 1769 | int edg = polygon_edges[i]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1770 | Eigen::Vector3d pv = e_list[edg].intersection_by_plane; src/mesh.cpp:1769:13: warning: variable 'edg' of type 'int' can be declared 'const' [misc-const-correctness] note: this fix will not be applied because it overlaps with another fix 1769 | int edg = polygon_edges[i]; | ^ src/mesh.cpp:1771:21: warning: use emplace_back instead of push_back [modernize-use-emplace] 1771 | polygon.push_back(Vertices(pv(0, 0), pv(1, 0), pv(2, 0))); | ^~~~~~~~~~~~~~~~~~~ ~ | emplace_back( src/mesh.cpp:1780:9: warning: use range-based for loop instead [modernize-loop-convert] 1780 | for (size_t i = 0; i < regions.size(); i++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (auto & region : regions) 1781 | { 1782 | regions[i]->intersect_edg.clear(); | ~~~~~~~~~~ | region src/mesh.cpp:1785:12: warning: redundant parentheses around expression [readability-redundant-parentheses] 1785 | return (poly_area); | ^ ~ src/mesh.cpp:1788:44: warning: the parameter 'str' of type 'std::string' (aka 'basic_string') is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 1788 | std::vector split(std::string str, char delimiter) | ^ | const & src/mesh.cpp:1791:10: warning: no header providing "std::stringstream" is directly included [misc-include-cleaner] 7 | std::stringstream ss(str); // Turn the string into a stream. | ^ src/mesh.cpp:1794:12: warning: no header providing "std::getline" is directly included [misc-include-cleaner] 1794 | while (getline(ss, tok, delimiter)) | ^ src/mesh.cpp:1803:6: warning: function 'establish_pbc' has cognitive complexity of 28 (threshold 25) [readability-function-cognitive-complexity] 1803 | void establish_pbc(std::vector& vertices, | ^ src/mesh.cpp:1813:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1813 | for (size_t i = 0; i < e_list.size(); i++) | ^ src/mesh.cpp:1817:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1817 | if (hitorigin) | ^ src/mesh.cpp:1822:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1822 | if (!hitorigin) | ^ src/mesh.cpp:1830:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1830 | for (size_t i = 0; i < edge_in_mesh.size(); i++) | ^ src/mesh.cpp:1834:34: note: +2, including nesting penalty of 1, nesting level increased to 2 1834 | int largest = ((n1 > n2) ? n1 : n2); | ^ src/mesh.cpp:1838:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1838 | if (in_boundary) | ^ src/mesh.cpp:1847:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1847 | for (int i = 0; i < b_count; i++) | ^ src/mesh.cpp:1855:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1855 | for (size_t i = 0; i < edge_in_boundary.size(); i++) | ^ src/mesh.cpp:1876:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1876 | for (size_t i = 0; i < edge_in_boundary.size(); i++) | ^ src/mesh.cpp:1884:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1884 | if (theta < 0) | ^ src/mesh.cpp:1889:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1889 | if (theta > 2 * PI) | ^ src/mesh.cpp:1898:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1898 | for (size_t i = 0; i <= edge_in_boundary.size(); i++) | ^ src/mesh.cpp:1906:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1906 | for (size_t i = 0; i != edge_position_boundary.size(); i++) | ^ src/mesh.cpp:1915:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1915 | for (size_t i = 0; i < vp.size(); i++) | ^ src/mesh.cpp:1928:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1928 | if (n1 < n2) | ^ src/mesh.cpp:1933:5: note: +1, nesting level increased to 1 1933 | else | ^ src/mesh.cpp:1943:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1943 | if (n1 < n2) | ^ src/mesh.cpp:1948:5: note: +1, nesting level increased to 1 1948 | else | ^ src/mesh.cpp:1969:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1969 | if (n1 < n2) | ^ src/mesh.cpp:1974:5: note: +1, nesting level increased to 1 1974 | else | ^ src/mesh.cpp:1984:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1984 | if (n1 < n2) | ^ src/mesh.cpp:1989:5: note: +1, nesting level increased to 1 1989 | else | ^ src/mesh.cpp:1807:27: warning: parameter 'size_factor' is unused [misc-unused-parameters] 1807 | double size_factor) | ^~~~~~~~~~~ | /*size_factor*/ src/mesh.cpp:1810:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 1810 | std::vector edge_in_mesh, edge_in_boundary; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:1815:9: warning: variable 'hitorigin' of type 'bool' can be declared 'const' [misc-const-correctness] 1815 | bool hitorigin(e_list[i]->nodes[1] == 5); | ^ | const src/mesh.cpp:1824:36: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'value_type' (aka 'int') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1824 | edge_in_mesh.push_back(i); | ^ src/mesh.cpp:1828:5: warning: variable 'first_bt' of type 'int' can be declared 'const' [misc-const-correctness] 1828 | int first_bt = triangles.size() - b_count; | ^ | const src/mesh.cpp:1828:20: warning: narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1828 | int first_bt = triangles.size() - b_count; | ^ src/mesh.cpp:1830:5: warning: use range-based for loop instead [modernize-loop-convert] 1830 | for (size_t i = 0; i < edge_in_mesh.size(); i++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (int i : edge_in_mesh) 1831 | { 1832 | int n1 = e_list[edge_in_mesh[i]]->shared_element[0]; | ~~~~~~~~~~~~~~~ | i 1833 | int n2 = e_list[edge_in_mesh[i]]->shared_element[1]; | ~~~~~~~~~~~~~~~ | i 1834 | int largest = ((n1 > n2) ? n1 : n2); 1835 | 1836 | bool in_boundary(largest >= first_bt); 1837 | 1838 | if (in_boundary) 1839 | { 1840 | edge_in_boundary.push_back(edge_in_mesh[i]); | ~~~~~~~~~~~~~~~ | i src/mesh.cpp:1832:9: warning: variable 'n1' of type 'int' can be declared 'const' [misc-const-correctness] 1832 | int n1 = e_list[edge_in_mesh[i]]->shared_element[0]; | ^ | const src/mesh.cpp:1833:9: warning: variable 'n2' of type 'int' can be declared 'const' [misc-const-correctness] 1833 | int n2 = e_list[edge_in_mesh[i]]->shared_element[1]; | ^ | const src/mesh.cpp:1834:9: warning: variable 'largest' of type 'int' can be declared 'const' [misc-const-correctness] 1834 | int largest = ((n1 > n2) ? n1 : n2); | ^ | const src/mesh.cpp:1836:9: warning: variable 'in_boundary' of type 'bool' can be declared 'const' [misc-const-correctness] 1836 | bool in_boundary(largest >= first_bt); | ^ | const src/mesh.cpp:1854:13: warning: narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1854 | int vid(vertices.size() - 1); | ^ src/mesh.cpp:1855:5: warning: use range-based for loop instead [modernize-loop-convert] 1855 | for (size_t i = 0; i < edge_in_boundary.size(); i++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (int i : edge_in_boundary) 1856 | { 1857 | vid++; 1858 | e_list[edge_in_boundary[i]]->mid_point = vid; | ~~~~~~~~~~~~~~~~~~~ | i 1859 | 1860 | double xm 1861 | = (vertices[e_list[edge_in_boundary[i]]->nodes[0]]->x + vertices[e_list[edge_in_boundary[i]]->nodes[1]]->x) | ~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~ | i i 1862 | / 2.0; 1863 | double ym 1864 | = (vertices[e_list[edge_in_boundary[i]]->nodes[0]]->y + vertices[e_list[edge_in_boundary[i]]->nodes[1]]->y) | ~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~ | i i 1865 | / 2.0; 1866 | double zm 1867 | = (vertices[e_list[edge_in_boundary[i]]->nodes[0]]->z + vertices[e_list[edge_in_boundary[i]]->nodes[1]]->z) | ~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~ | i i src/mesh.cpp:1860:9: warning: variable 'xm' of type 'double' can be declared 'const' [misc-const-correctness] 1860 | double xm | ^ | const src/mesh.cpp:1863:9: warning: variable 'ym' of type 'double' can be declared 'const' [misc-const-correctness] 1863 | double ym | ^ | const src/mesh.cpp:1866:9: warning: variable 'zm' of type 'double' can be declared 'const' [misc-const-correctness] 1866 | double zm | ^ | const src/mesh.cpp:1871:28: warning: initializing non-owner argument of type 'value_type &&' (aka 'Vertices *&&') with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 1871 | vertices.push_back(new Vertices(vm(0, 0), vm(1, 0), vm(2, 0))); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:1876:5: warning: use range-based for loop instead [modernize-loop-convert] 1876 | for (size_t i = 0; i < edge_in_boundary.size(); i++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (int i : edge_in_boundary) 1877 | { 1878 | Eigen::Vector2d radial_ext(vertices[e_list[edge_in_boundary[i]]->mid_point]->x, | ~~~~~~~~~~~~~~~~~~~ | i 1879 | vertices[e_list[edge_in_boundary[i]]->mid_point]->y); | ~~~~~~~~~~~~~~~~~~~ | i src/mesh.cpp:1908:12: warning: use emplace_back instead of push_back [modernize-use-emplace] 1908 | vp.push_back(std::make_pair(edge_position_boundary[i], i)); | ^~~~~~~~~~~~~~~~~~~~~~~~ ~ | emplace_back src/mesh.cpp:1908:27: warning: no header providing "std::make_pair" is directly included [misc-include-cleaner] 1908 | vp.push_back(std::make_pair(edge_position_boundary[i], i)); | ^ src/mesh.cpp:1912:5: warning: no header providing "std::sort" is directly included [misc-include-cleaner] 1912 | sort(vp.begin(), vp.end()); | ^ src/mesh.cpp:1912:5: warning: use a ranges version of this algorithm [modernize-use-ranges] 1912 | sort(vp.begin(), vp.end()); | ^~~~ ~~~~~~~~~~ ~~~~~~~~ | std::ranges::sort vp src/mesh.cpp:1915:5: warning: use range-based for loop instead [modernize-loop-convert] 1915 | for (size_t i = 0; i < vp.size(); i++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (auto & i : vp) 1916 | { 1917 | index_boundary.push_back(vp[i].second); | ~~~~~ | i src/mesh.cpp:1917:9: warning: 'push_back' is called inside a loop; consider pre-allocating the container capacity before the loop [performance-inefficient-vector-operation] 1915 | for (size_t i = 0; i < vp.size(); i++) 1916 | { 1917 | index_boundary.push_back(vp[i].second); | ^ src/mesh.cpp:1920:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 1920 | int n1, n2, p1, p2, e1, e2, s1, s2, l1, l2; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/mesh.cpp:1920:9: warning: variable 'n1' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1920 | int n1, n2, p1, p2, e1, e2, s1, s2, l1, l2; | ^ src/mesh.cpp:1920:13: warning: variable 'n2' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1920 | int n1, n2, p1, p2, e1, e2, s1, s2, l1, l2; | ^ src/mesh.cpp:1920:17: warning: variable 'p1' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1920 | int n1, n2, p1, p2, e1, e2, s1, s2, l1, l2; | ^ src/mesh.cpp:1920:21: warning: variable 'p2' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1920 | int n1, n2, p1, p2, e1, e2, s1, s2, l1, l2; | ^ src/mesh.cpp:1920:25: warning: variable 'e1' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1920 | int n1, n2, p1, p2, e1, e2, s1, s2, l1, l2; | ^ src/mesh.cpp:1920:29: warning: variable 'e2' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1920 | int n1, n2, p1, p2, e1, e2, s1, s2, l1, l2; | ^ src/mesh.cpp:1920:33: warning: variable 's1' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1920 | int n1, n2, p1, p2, e1, e2, s1, s2, l1, l2; | ^ src/mesh.cpp:1920:37: warning: variable 's2' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1920 | int n1, n2, p1, p2, e1, e2, s1, s2, l1, l2; | ^ src/mesh.cpp:1920:41: warning: variable 'l1' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1920 | int n1, n2, p1, p2, e1, e2, s1, s2, l1, l2; | ^ src/mesh.cpp:1920:45: warning: variable 'l2' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 1920 | int n1, n2, p1, p2, e1, e2, s1, s2, l1, l2; | ^ 47467 warnings generated. Suppressed 46757 warnings (46756 in non-user code, 1 with check filters). Use -header-filter=.* or leave it as default to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. [10/13][15.2s] clang-tidy-22 -p=/home/runner/work/corticalsim/corticalsim/build/debug --config-file=/home/runner/work/corticalsim/corticalsim/.clang-tidy /home/runner/work/corticalsim/corticalsim/src/segment.cpp include/CompactList_impl.hpp:12:7: warning: class 'CompactList' 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] 12 | class CompactList | ^ include/CompactList_impl.hpp:26:19: warning: all parameters should be named in a function [readability-named-parameter] 26 | void remove(T*); | ^ | /*element*/ include/CompactList_impl.hpp:49:16: warning: all parameters should be named in a function [readability-named-parameter] 49 | T* create(Q); | ^ | /*par1*/ include/CompactList_impl.hpp:51:16: warning: all parameters should be named in a function [readability-named-parameter] 51 | T* create(Q, R); | ^ | /*par1*/ /*par2*/ include/CompactList_impl.hpp:53:16: warning: all parameters should be named in a function [readability-named-parameter] 53 | T* create(Q, R, S); | ^ | /*par1*/ /*par2*/ /*par3*/ include/CompactList_impl.hpp:80:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 80 | return; | ^~~~~~~ 81 | } include/CompactList_impl.hpp:86:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 86 | T* new_element = new (MemPool::malloc()) T(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:94:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 94 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:102:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 102 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:110:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 110 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:145:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 145 | return; | ^~~~~~~ 146 | } include/CompactList_impl.hpp:149:7: warning: class 'CompactListItem' 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] 149 | class CompactListItem | ^ include/CompactList_impl.hpp:149:7: warning: destructor of 'CompactListItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] include/CompactList_impl.hpp:149:7: note: make it protected and non-virtual 149 | class CompactListItem | ^ 150 | { 151 | public: 152 | 153 | CompactListItem(): 154 | index(0) {}; 155 | int index; 156 | 157 | protected: 158 | 159 | virtual ~CompactListItem() {}; | ~~~~~~~ include/CompactList_impl.hpp:153:5: warning: public constructor allows the CRTP to be constructed as a regular template class; consider making it private and declaring the derived class as friend [bugprone-crtp-constructor-accessibility] 153 | CompactListItem(): | ^ 154 | index(0) {}; | 155 | int index; 156 | 157 | protected: 158 | 159 | virtual ~CompactListItem() {}; 160 | template 161 | friend class CompactList; 162 | }; include/CompactList_impl.hpp:155:9: warning: use default member initializer for 'index' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 154 | index(0) {}; | ~~~~~~~~ 155 | int index; | ^ | {0} include/CompactList_impl.hpp:159:13: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] 159 | virtual ~CompactListItem() {}; | ^ ~~ | = default include/DLList_impl.hpp:32:7: warning: class 'DLList' 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] 32 | class DLList | ^ include/DLList_impl.hpp:36:9: warning: use default member initializer for 'num_elements' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 36 | int num_elements; | ^ | { 0 } include/DLList_impl.hpp:42:8: warning: use default member initializer for 'first_element' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 42 | T* first_element; | ^ | { nullptr } 43 | T* last_element; 44 | 45 | using MemPool = crts::SingletonPool; 46 | 47 | void unlink_element(T*); 48 | T* link_element(T*); 49 | 50 | public: 51 | 52 | DLList(): 53 | num_elements{ 0 }, 54 | first_element{ nullptr }, | ~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:43:8: warning: use default member initializer for 'last_element' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 43 | T* last_element; | ^ | { nullptr } 44 | 45 | using MemPool = crts::SingletonPool; 46 | 47 | void unlink_element(T*); 48 | T* link_element(T*); 49 | 50 | public: 51 | 52 | DLList(): 53 | num_elements{ 0 }, 54 | first_element{ nullptr }, 55 | last_element{ nullptr } {}; | ~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:47:27: warning: all parameters should be named in a function [readability-named-parameter] 47 | void unlink_element(T*); | ^ | /*element*/ include/DLList_impl.hpp:48:23: warning: all parameters should be named in a function [readability-named-parameter] 48 | T* link_element(T*); | ^ | /*new_element*/ include/DLList_impl.hpp:70:16: warning: all parameters should be named in a function [readability-named-parameter] 70 | T* create(Q); | ^ | /*par1*/ include/DLList_impl.hpp:72:16: warning: all parameters should be named in a function [readability-named-parameter] 72 | T* create(Q, R); | ^ | /*par1*/ /*par2*/ include/DLList_impl.hpp:74:16: warning: all parameters should be named in a function [readability-named-parameter] 74 | T* create(Q, R, S); | ^ | /*par1*/ /*par2*/ /*par3*/ include/DLList_impl.hpp:75:19: warning: all parameters should be named in a function [readability-named-parameter] 75 | void remove(T*); | ^ | /*element*/ include/DLList_impl.hpp:77:49: warning: all parameters should be named in a function [readability-named-parameter] 77 | void import(DLList&, T*); | ^ | /*old_list*/ /*element*/ include/DLList_impl.hpp:78:53: warning: all parameters should be named in a function [readability-named-parameter] 78 | void import_set(DLList&, T*, T*); | ^ | /*old_list*/ /*first_element*/ /*last_element*/ include/DLList_impl.hpp:137:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 137 | return; | ^~~~~~~ 138 | } include/DLList_impl.hpp:154:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 154 | T* new_element = new (MemPool::malloc()) T(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:162:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 162 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:170:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 170 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:178:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 178 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:196:8: warning: variable 'temp' is not initialized [cppcoreguidelines-init-variables] 196 | T* temp; | ^ | = nullptr include/DLList_impl.hpp:211:7: warning: class 'DLBaseItem' 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] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: warning: constructor does not initialize these fields: next_element, previous_element [cppcoreguidelines-pro-type-member-init] 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; | | {} 221 | T* previous_element; | | {} include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: the implicit default constructor of the CRTP is publicly accessible; consider making it private and declaring the derived class as friend [bugprone-crtp-constructor-accessibility] 211 | class DLBaseItem | ^ 212 | { | include/DLList_impl.hpp:226:13: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] 226 | virtual ~DLBaseItem() {}; | ^ ~~ | = default include/det_queue.hpp:14:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 14 | System* const system; // pointer to containing system | ^ include/det_queue.hpp:14:19: warning: member variable 'system' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes] include/det_queue.hpp:17:12: warning: method 'current_pos' can be made const [readability-make-member-function-const] 17 | double current_pos() | ^ | const include/det_queue.hpp:25:63: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 25 | double progression(int cache_pos) { return current_base - value_cache[cache_pos]; } | ^ include/det_queue.hpp:48:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 48 | double value_cache[POSITION_CACHE_SIZE]; // cache of previous 'distance' values | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/det_queue.hpp:49:29: warning: member 'distance_time_conversion_function' of type 'double (System::*const)(double)' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 49 | double (System::* const distance_time_conversion_function)(double); | ^ include/det_queue.hpp:51:29: warning: member 'time_distance_conversion_function' of type 'double (System::*const)(double)' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 51 | double (System::* const time_distance_conversion_function)(double); | ^ include/event.hpp:7:7: warning: class 'EventDescriptor' 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] 7 | class EventDescriptor | ^ include/event.hpp:20:24: warning: member 'mt' of type 'Microtubule *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | Microtubule* const mt; | ^ include/intersection.hpp:33:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | : x(x1) 32 | { 33 | x = x1; | ^~~~~~~ include/intersection.hpp:34:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , y(y1) 32 | { 33 | x = x1; 34 | y = y1; | ^~~~~~~ include/intersection.hpp:35:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , z(z1) 32 | { 33 | x = x1; 34 | y = y1; 35 | z = z1; | ^~~~~~~ include/intersection.hpp:36:9: warning: 'next_element' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , next_element(n1) 32 | { 33 | x = x1; 34 | y = y1; 35 | z = z1; 36 | next_element = n1; | ^~~~~~~~~~~~~~~~~~ include/measurement.hpp:7:7: warning: constructor does not initialize these fields: time, length_density, optical_density, average_length, number_of_m_ts, segments_per_mt, growing_number, shrinking_number, segments, trajectories, zipper_count, crossover_count, induced_catastrophe_count, valid_d_event_count, invalid_d_event_count, s_event_count, length_severing_count, intersection_severing_count, occupied_intersection_count, g_eff_adjust [cppcoreguidelines-pro-type-member-init] 7 | class Measurement | ^ 8 | { 9 | public: 10 | 11 | double time; | | {} 12 | double length_density; | | {} 13 | double optical_density; | | {} 14 | double average_length; | | {} 15 | int number_of_m_ts; | | {} 16 | double segments_per_mt; | | {} 17 | OrderParameters order; 18 | int growing_number; | | {} 19 | int shrinking_number; | | {} 20 | int segments; | | {} 21 | int trajectories; | | {} 22 | int zipper_count; | | {} include/measurement.hpp:34:41: warning: parameter 2 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 | std::ostream& operator<<(std::ostream&, const Measurement); | ^~~~~ include/microtubule.hpp:10:7: warning: class 'Microtubule' 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] 10 | class Microtubule: public DLBaseItem | ^ include/microtubule.hpp:14:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 14 | System* const system; | ^ include/microtubule.hpp:31:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 31 | ~Microtubule(); | ^ | override include/mt_tip.hpp:7:7: warning: class 'MTTip' 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] 7 | class MTTip | ^ include/parameters.hpp:105:3: warning: redundant access specifier has the same accessibility as the previous access specifier [readability-redundant-access-specifiers] 105 | public: | ^~~~~~~ include/parameters.hpp:42:3: note: previously declared here 42 | public: | ^ include/parameters.hpp:119:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 119 | double rdirector[3]; | ^~~~~~~~~~~~~~~~~~~ include/parameters.hpp:139:5: warning: constructor does not initialize these fields: local_order [cppcoreguidelines-pro-type-member-init] 136 | double local_order; | | {} 137 | Eigen::Vector3d sv; 138 | 139 | OrderParametersRaw(void) | ^ include/parameters.hpp:139:24: warning: redundant void argument list in function definition [modernize-redundant-void-arg] 139 | OrderParametersRaw(void) | ^~~~ include/parameters.hpp:141:9: warning: 'local_l' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | : local_l(0.) 140 | { 141 | local_l = 0.; | ^~~~~~~~~~~~~ include/parameters.hpp:142:9: warning: 'local_l_opt' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , local_l_opt(0.) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; | ^~~~~~~~~~~~~~~~~ include/parameters.hpp:143:9: warning: 'qxx' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxx(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; | ^~~~~~~~ include/parameters.hpp:144:9: warning: 'qxy' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxy(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; | ^~~~~~~~ include/parameters.hpp:145:9: warning: 'qxz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; | ^~~~~~~~ include/parameters.hpp:146:9: warning: 'qyy' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qyy(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; | ^~~~~~~~ include/parameters.hpp:147:9: warning: 'qyz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qyz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; 147 | qyz = 0; | ^~~~~~~~ include/parameters.hpp:148:9: warning: 'qzz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qzz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; 147 | qyz = 0; 148 | qzz = 0; | ^~~~~~~~ include/parameters.hpp:152:9: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 152 | return; | ^~~~~~~ 153 | } include/parameters.hpp:155:22: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 155 | double extract_r(double director[3], std::string geometry) | ^~~~~~~~~~~~~~~~~~ include/parameters.hpp:155:54: warning: the parameter 'geometry' of type 'std::string' (aka 'basic_string') is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 155 | double extract_r(double director[3], std::string geometry) | ^ | const & include/parameters.hpp:178:40: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 178 | director[i] = evec_mat(i, max_pos); | ^ include/parameters.hpp:195:40: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 195 | director[i] = evec_mat(i, min_pos); | ^ include/parameters.hpp:199:16: warning: redundant parentheses around expression [readability-redundant-parentheses] 199 | return (sel_eigen_val); | ^ ~ include/segment.hpp:7:7: warning: class 'Segment' 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] 7 | class Segment: public DLBaseItem | ^ include/segment.hpp:12:23: warning: member 'trajectory' of type 'Trajectory *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 12 | Trajectory* const trajectory; | ^ include/segment.hpp:25:25: warning: all parameters should be named in a function [readability-named-parameter] 25 | Segment(Microtubule*, TrajectoryVector&); | ^ | /*m*/ /*tv*/ include/segment.hpp:27:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 27 | ~Segment(); | ^ | override include/segment.hpp:29:12: warning: method 'length' can be made const [readability-make-member-function-const] 29 | double length() { return std::abs(end - start); } | ^ | const include/surface.hpp:16:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | : x(x1) 15 | { 16 | x = x1; | ^~~~~~~ include/surface.hpp:17:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | , y(y1) 15 | { 16 | x = x1; 17 | y = y1; | ^~~~~~~ include/surface.hpp:18:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | , z(z1) 15 | { 16 | x = x1; 17 | y = y1; 18 | z = z1; | ^~~~~~~ include/surface.hpp:32:9: warning: 'cos_theta' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 30 | BendingOperator() | | : cos_theta(0.0) 31 | { 32 | cos_theta = 0.0; | ^~~~~~~~~~~~~~~~ include/surface.hpp:33:9: warning: 'sin_theta' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 30 | BendingOperator() | | , sin_theta(0.0) 31 | { 32 | cos_theta = 0.0; 33 | sin_theta = 0.0; | ^~~~~~~~~~~~~~~~ include/surface.hpp:49:5: warning: constructor does not initialize these fields: region [cppcoreguidelines-pro-type-member-init] 47 | Region* region; | | {} 48 | 49 | SurfaceVector() | ^ include/surface.hpp:51:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | : x(0.0) 50 | { 51 | x = 0.0; | ^~~~~~~~ include/surface.hpp:52:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , y(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; | ^~~~~~~~ include/surface.hpp:53:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , z(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; | ^~~~~~~~ include/surface.hpp:55:9: warning: 'angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , angle(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; 54 | 55 | angle = 0.0; | ^~~~~~~~~~~~ include/surface.hpp:56:9: warning: 'tv_pos' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , tv_pos(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; 54 | 55 | angle = 0.0; 56 | tv_pos = 0.0; | ^~~~~~~~~~~~~ include/surface.hpp:73:9: warning: 'mid_point' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | : mid_point(0) 72 | { 73 | mid_point = 0; | ^~~~~~~~~~~~~~ include/surface.hpp:74:9: warning: 'length' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | , length(0.0) 72 | { 73 | mid_point = 0; 74 | length = 0.0; | ^~~~~~~~~~~~~ include/surface.hpp:75:9: warning: 'edge_3d_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | , edge_3d_angle(0.0) 72 | { 73 | mid_point = 0; 74 | length = 0.0; 75 | edge_3d_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~ include/system.hpp:14:7: warning: class 'System' 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] 14 | class System | ^ include/system.hpp:70:12: warning: method 'identity' can be made static [readability-convert-member-functions-to-static] 70 | double identity(double i) { return i; } | ^ | static include/system.hpp:115:21: warning: redundant void argument list in function declaration [modernize-redundant-void-arg] 115 | void next_event(void); | ^~~~ include/system.hpp:138:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 138 | double binomial_table[MAXBINOM][MAXBINOM]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/system.hpp:139:30: warning: redundant void argument list in function declaration [modernize-redundant-void-arg] 139 | void make_binomial_table(void); | ^~~~ include/trajectory.hpp:16:5: warning: constructor does not initialize these fields: cdir [cppcoreguidelines-pro-type-member-init] 16 | TrajectoryVector(double p, Direction d, Trajectory* t): | ^ include/trajectory.hpp:23:5: warning: constructor does not initialize these fields: pos, dir, cdir, trajectory [cppcoreguidelines-pro-type-member-init] 12 | double pos; | | {} 13 | Direction dir, cdir; 14 | Trajectory* trajectory; | | {} 15 | 16 | TrajectoryVector(double p, Direction d, Trajectory* t): 17 | pos(p), 18 | dir(d), 19 | trajectory(t) 20 | { 21 | } 22 | 23 | TrajectoryVector() {} | ^ include/trajectory.hpp:23:5: warning: use '= default' to define a trivial default constructor [modernize-use-equals-default] 23 | TrajectoryVector() {} | ^ ~~ | = default; include/trajectory.hpp:25:22: warning: method 'flipped' can be made const [readability-make-member-function-const] 25 | TrajectoryVector flipped() | ^ | const include/trajectory.hpp:27:16: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] 27 | return TrajectoryVector(pos, dir == Direction::FORWARD ? Direction::BACKWARD : Direction::FORWARD, trajectory); | ^~~~~~~~~~~~~~~~~ ~ | { } include/trajectory.hpp:31:7: warning: class 'Trajectory' 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] 31 | class Trajectory: public DLBaseItem | ^ include/trajectory.hpp:40:25: warning: member 'base' of type 'const SurfaceVector' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 40 | const SurfaceVector base; | ^ include/trajectory.hpp:41:18: warning: member 'length' of type 'const double' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 41 | const double length; | ^ include/trajectory.hpp:82:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 82 | ~Trajectory(); | ^ | override include/types.hpp:40:9: warning: macro 'PROGRAM_VERSION' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] 40 | #define PROGRAM_VERSION "BC.2018" | ^ include/types.hpp:88:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 88 | extern std::string direction_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:132:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 132 | extern std::string nucleation_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:141:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 141 | extern std::string interaction_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:153:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 153 | extern std::string bundle_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/segment.cpp:5:34: warning: no header providing "TrajectoryVector" is directly included [misc-include-cleaner] 4 | 5 | Segment::Segment(Microtubule* m, TrajectoryVector& tv): | ^ src/segment.cpp:26:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 26 | return; | ^~~~~~~ 27 | } src/segment.cpp:40:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 40 | return; | ^~~~~~~ 41 | } src/segment.cpp:55:36: warning: no header providing "IntersectionItr" is directly included [misc-include-cleaner] 4 | bool Segment::crosses_intersection(IntersectionItr& is) | ^ src/segment.cpp:61:17: warning: no header providing "ZERO_CUTOFF" is directly included [misc-include-cleaner] 2 | if (temp < -ZERO_CUTOFF) | ^ src/segment.cpp:66:5: warning: do not use 'else' after 'return' [readability-else-after-return] 66 | else if (temp < ZERO_CUTOFF) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 67 | { | ~ 68 | int sign1 = trajectory->difference_sign( | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 69 | (this == mt->segments.last()) ? mt->plus.next_collision : end_itr, end, is, is->first); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 70 | int sign2 = trajectory->difference_sign( | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 71 | (this == mt->segments.first()) ? mt->minus.next_collision : start_itr, start, is, is->first); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 72 | 73 | if (sign1 * sign2 == -1) | ~~~~~~~~~~~~~~~~~~~~~~~~ 74 | { | ~ 75 | return true; | ~~~~~~~~~~~~ 76 | } | ~ 77 | } | ~ src/segment.cpp:68:9: warning: variable 'sign1' of type 'int' can be declared 'const' [misc-const-correctness] note: this fix will not be applied because it overlaps with another fix 68 | int sign1 = trajectory->difference_sign( | ^ src/segment.cpp:70:9: warning: variable 'sign2' of type 'int' can be declared 'const' [misc-const-correctness] note: this fix will not be applied because it overlaps with another fix 70 | int sign2 = trajectory->difference_sign( | ^ 34431 warnings generated. Suppressed 34286 warnings (34286 in non-user code). Use -header-filter=.* or leave it as default to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. [11/13][26.3s] clang-tidy-22 -p=/home/runner/work/corticalsim/corticalsim/build/debug --config-file=/home/runner/work/corticalsim/corticalsim/.clang-tidy /home/runner/work/corticalsim/corticalsim/src/system.cpp include/CompactList_impl.hpp:12:7: warning: class 'CompactList' 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] 12 | class CompactList | ^ include/CompactList_impl.hpp:26:19: warning: all parameters should be named in a function [readability-named-parameter] 26 | void remove(T*); | ^ | /*element*/ include/CompactList_impl.hpp:49:16: warning: all parameters should be named in a function [readability-named-parameter] 49 | T* create(Q); | ^ | /*par1*/ include/CompactList_impl.hpp:51:16: warning: all parameters should be named in a function [readability-named-parameter] 51 | T* create(Q, R); | ^ | /*par1*/ /*par2*/ include/CompactList_impl.hpp:53:16: warning: all parameters should be named in a function [readability-named-parameter] 53 | T* create(Q, R, S); | ^ | /*par1*/ /*par2*/ /*par3*/ include/CompactList_impl.hpp:80:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 80 | return; | ^~~~~~~ 81 | } include/CompactList_impl.hpp:86:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 86 | T* new_element = new (MemPool::malloc()) T(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:94:5: warning: initializing non-owner 'OccupiedIntersection *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 94 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:94:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 94 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:102:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 102 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:110:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 110 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:127:5: warning: variable 'size' of type 'int' can be declared 'const' [misc-const-correctness] 127 | int size = elements.size(); | ^ | const include/CompactList_impl.hpp:145:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 145 | return; | ^~~~~~~ 146 | } include/CompactList_impl.hpp:149:7: warning: class 'CompactListItem' 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] 149 | class CompactListItem | ^ include/CompactList_impl.hpp:149:7: warning: destructor of 'CompactListItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] include/CompactList_impl.hpp:149:7: note: make it protected and non-virtual 149 | class CompactListItem | ^ 150 | { 151 | public: 152 | 153 | CompactListItem(): 154 | index(0) {}; 155 | int index; 156 | 157 | protected: 158 | 159 | virtual ~CompactListItem() {}; | ~~~~~~~ include/CompactList_impl.hpp:153:5: warning: public constructor allows the CRTP to be constructed as a regular template class; consider making it private and declaring the derived class as friend [bugprone-crtp-constructor-accessibility] 153 | CompactListItem(): | ^ 154 | index(0) {}; | 155 | int index; 156 | 157 | protected: 158 | 159 | virtual ~CompactListItem() {}; 160 | template 161 | friend class CompactList; 162 | }; include/CompactList_impl.hpp:155:9: warning: use default member initializer for 'index' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 154 | index(0) {}; | ~~~~~~~~ 155 | int index; | ^ | {0} include/CompactList_impl.hpp:159:13: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] 159 | virtual ~CompactListItem() {}; | ^ ~~ | = default include/DLList_impl.hpp:32:7: warning: class 'DLList' 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] 32 | class DLList | ^ include/DLList_impl.hpp:36:9: warning: use default member initializer for 'num_elements' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 36 | int num_elements; | ^ | { 0 } include/DLList_impl.hpp:42:8: warning: use default member initializer for 'first_element' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 42 | T* first_element; | ^ | { nullptr } 43 | T* last_element; 44 | 45 | using MemPool = crts::SingletonPool; 46 | 47 | void unlink_element(T*); 48 | T* link_element(T*); 49 | 50 | public: 51 | 52 | DLList(): 53 | num_elements{ 0 }, 54 | first_element{ nullptr }, | ~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:43:8: warning: use default member initializer for 'last_element' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 43 | T* last_element; | ^ | { nullptr } 44 | 45 | using MemPool = crts::SingletonPool; 46 | 47 | void unlink_element(T*); 48 | T* link_element(T*); 49 | 50 | public: 51 | 52 | DLList(): 53 | num_elements{ 0 }, 54 | first_element{ nullptr }, 55 | last_element{ nullptr } {}; | ~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:47:27: warning: all parameters should be named in a function [readability-named-parameter] 47 | void unlink_element(T*); | ^ | /*element*/ include/DLList_impl.hpp:48:23: warning: all parameters should be named in a function [readability-named-parameter] 48 | T* link_element(T*); | ^ | /*new_element*/ include/DLList_impl.hpp:70:16: warning: all parameters should be named in a function [readability-named-parameter] 70 | T* create(Q); | ^ | /*par1*/ include/DLList_impl.hpp:72:16: warning: all parameters should be named in a function [readability-named-parameter] 72 | T* create(Q, R); | ^ | /*par1*/ /*par2*/ include/DLList_impl.hpp:74:16: warning: all parameters should be named in a function [readability-named-parameter] 74 | T* create(Q, R, S); | ^ | /*par1*/ /*par2*/ /*par3*/ include/DLList_impl.hpp:75:19: warning: all parameters should be named in a function [readability-named-parameter] 75 | void remove(T*); | ^ | /*element*/ include/DLList_impl.hpp:77:49: warning: all parameters should be named in a function [readability-named-parameter] 77 | void import(DLList&, T*); | ^ | /*old_list*/ /*element*/ include/DLList_impl.hpp:78:53: warning: all parameters should be named in a function [readability-named-parameter] 78 | void import_set(DLList&, T*, T*); | ^ | /*old_list*/ /*first_element*/ /*last_element*/ include/DLList_impl.hpp:137:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 137 | return; | ^~~~~~~ 138 | } include/DLList_impl.hpp:154:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 154 | T* new_element = new (MemPool::malloc()) T(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:162:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 162 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:170:5: warning: initializing non-owner 'Microtubule *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 170 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:170:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 170 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:178:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 178 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:196:8: warning: variable 'temp' is not initialized [cppcoreguidelines-init-variables] 196 | T* temp; | ^ | = nullptr include/DLList_impl.hpp:211:7: warning: class 'DLBaseItem' 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] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: the implicit default constructor of the CRTP is publicly accessible; consider making it private and declaring the derived class as friend [bugprone-crtp-constructor-accessibility] 211 | class DLBaseItem | ^ 212 | { | include/DLList_impl.hpp:226:13: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] 226 | virtual ~DLBaseItem() {}; | ^ ~~ | = default include/det_queue.hpp:14:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 14 | System* const system; // pointer to containing system | ^ include/det_queue.hpp:14:19: warning: member variable 'system' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes] include/det_queue.hpp:17:12: warning: method 'current_pos' can be made const [readability-make-member-function-const] 17 | double current_pos() | ^ | const include/det_queue.hpp:25:63: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 25 | double progression(int cache_pos) { return current_base - value_cache[cache_pos]; } | ^ include/det_queue.hpp:48:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 48 | double value_cache[POSITION_CACHE_SIZE]; // cache of previous 'distance' values | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/det_queue.hpp:49:29: warning: member 'distance_time_conversion_function' of type 'double (System::*const)(double)' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 49 | double (System::* const distance_time_conversion_function)(double); | ^ include/det_queue.hpp:51:29: warning: member 'time_distance_conversion_function' of type 'double (System::*const)(double)' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 51 | double (System::* const time_distance_conversion_function)(double); | ^ include/edge.hpp:31:9: warning: 'exclude_point' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | : exclude_point(0) 30 | { 31 | exclude_point = 0; | ^~~~~~~~~~~~~~~~~~ include/edge.hpp:33:9: warning: 'p_cat' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , p_cat(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; | ^~~~~~~~~~~~ include/edge.hpp:34:9: warning: 'edg_ang_norm' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , edg_ang_norm(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; | ^~~~~~~~~~~~~~~~~~~ include/edge.hpp:35:9: warning: 'xy_rotation_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , xy_rotation_angle(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; 35 | xy_rotation_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~~~~~ include/edge.hpp:36:9: warning: 'edg_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , edg_angle(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; 35 | xy_rotation_angle = 0.0; 36 | edg_angle = 0.0; | ^~~~~~~~~~~~~~~~ include/edge.hpp:37:9: warning: 'edg_bend_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 29 | Edge() | | , edg_bend_angle(0.0) 30 | { 31 | exclude_point = 0; 32 | 33 | p_cat = 0.0; 34 | edg_ang_norm = 0.0; 35 | xy_rotation_angle = 0.0; 36 | edg_angle = 0.0; 37 | edg_bend_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~~ include/event.hpp:7:7: warning: class 'EventDescriptor' 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] 7 | class EventDescriptor | ^ include/event.hpp:20:24: warning: member 'mt' of type 'Microtubule *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | Microtubule* const mt; | ^ include/event.hpp:44:7: warning: do not access members of unions; consider using (boost::)variant instead [cppcoreguidelines-pro-type-union-access] 44 | class DeterministicEvent | ^ include/geometry.hpp:10:7: warning: class 'Geometry' 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] 10 | class Geometry | ^ include/geometry.hpp:20:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | System* const system; | ^ include/geometry.hpp:28:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 28 | double patch_area[3]; | ^~~~~~~~~~~~~~~~~~~~ include/geometry.hpp:29:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 29 | std::vector regions_index[3]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/geometry.hpp:35:5: warning: constructor does not initialize these fields: areain_mesh, area_ppb, patch_area, element_max [cppcoreguidelines-pro-type-member-init] 19 | double area_ppb; | | {} 20 | std::vector ppb; 21 | 22 | double patch_area[3]; | | {} 23 | std::vector regions_index[3]; 24 | 25 | int element_max; | | {} 26 | Eigen::Vector3d object_cm, object_pa, nucleous_position; 27 | std::vector regions; 28 | 29 | Geometry(System* s, double a): | ^ include/geometry.hpp:39:9: warning: use range-based for loop instead [modernize-loop-convert] 39 | for (int i = 0; i < 3; i++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~ | (double & i : patch_area) 40 | { 41 | patch_area[i] = 0.0; | ~~~~~~~~~~~~~ | i include/geometry.hpp:41:13: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 41 | patch_area[i] = 0.0; | ^ include/geometry.hpp:46:27: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 46 | virtual ~Geometry() { return; }; | ^~~~~~~ include/geometry.hpp:77:22: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 77 | TrajectoryVector extend_trajectory(Trajectory*, Direction); | ^ | override include/geometry.hpp:77:22: warning: visibility of function 'extend_trajectory' is changed from private in class 'Geometry' to public [misc-override-with-different-visibility] include/geometry.hpp:69:30: note: function declared here as private 69 | virtual TrajectoryVector extend_trajectory(Trajectory*, Direction) = 0; | ^ include/geometry.hpp:77:51: warning: all parameters should be named in a function [readability-named-parameter] 77 | TrajectoryVector extend_trajectory(Trajectory*, Direction); | ^ | /*unused*/ /*unused*/ include/geometry.hpp:78:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 78 | void get_order_parameters(OrderParameters&); | ^ | override include/geometry.hpp:78:47: warning: all parameters should be named in a function [readability-named-parameter] 78 | void get_order_parameters(OrderParameters&); | ^ | /*unused*/ include/geometry.hpp:79:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 79 | void output_snapshot(std::ostream&); | ^ | override include/geometry.hpp:79:39: warning: all parameters should be named in a function [readability-named-parameter] 79 | void output_snapshot(std::ostream&); | ^ | /*unused*/ include/geometry.hpp:80:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 80 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | override include/geometry.hpp:80:45: warning: all parameters should be named in a function [readability-named-parameter] 80 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | /*unused*/ /*unused*/ /*unused*/ include/intersection.hpp:33:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | : x(x1) 32 | { 33 | x = x1; | ^~~~~~~ include/intersection.hpp:34:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , y(y1) 32 | { 33 | x = x1; 34 | y = y1; | ^~~~~~~ include/intersection.hpp:35:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , z(z1) 32 | { 33 | x = x1; 34 | y = y1; 35 | z = z1; | ^~~~~~~ include/intersection.hpp:36:9: warning: 'next_element' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , next_element(n1) 32 | { 33 | x = x1; 34 | y = y1; 35 | z = z1; 36 | next_element = n1; | ^~~~~~~~~~~~~~~~~~ include/measurement.hpp:34:41: warning: parameter 2 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 | std::ostream& operator<<(std::ostream&, const Measurement); | ^~~~~ include/mesh.hpp:37:9: warning: 'element_id' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | : element_id(0) 36 | { 37 | element_id = 0; | ^~~~~~~~~~~~~~~ include/mesh.hpp:38:9: warning: 'edge_tag' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | , edge_tag(0) 36 | { 37 | element_id = 0; 38 | edge_tag = 0; | ^~~~~~~~~~~~~ include/mesh.hpp:39:9: warning: 'face_tag' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | , face_tag(1) 36 | { 37 | element_id = 0; 38 | edge_tag = 0; 39 | face_tag = 1; | ^~~~~~~~~~~~~ include/mesh.hpp:40:9: warning: 'poly_intersect_mark' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | , poly_intersect_mark(0) 36 | { 37 | element_id = 0; 38 | edge_tag = 0; 39 | face_tag = 1; 40 | poly_intersect_mark = 0; | ^~~~~~~~~~~~~~~~~~~~~~~~ include/mesh.hpp:41:9: warning: 'periodic_tag' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | , periodic_tag(0) 36 | { 37 | element_id = 0; 38 | edge_tag = 0; 39 | face_tag = 1; 40 | poly_intersect_mark = 0; 41 | periodic_tag = 0; | ^~~~~~~~~~~~~~~~~ include/mesh.hpp:43:9: warning: 'area' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | , area(0.000001) 36 | { 37 | element_id = 0; 38 | edge_tag = 0; 39 | face_tag = 1; 40 | poly_intersect_mark = 0; 41 | periodic_tag = 0; 42 | 43 | area = 0.000001; | ^~~~~~~~~~~~~~~~ include/mesh.hpp:44:9: warning: 'peri_meter' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | , peri_meter(0.000001) 36 | { 37 | element_id = 0; 38 | edge_tag = 0; 39 | face_tag = 1; 40 | poly_intersect_mark = 0; 41 | periodic_tag = 0; 42 | 43 | area = 0.000001; 44 | peri_meter = 0.000001; | ^~~~~~~~~~~~~~~~~~~~~~ include/mesh.hpp:45:9: warning: 'edg_ang_norm' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | , edg_ang_norm(0.000001) 36 | { 37 | element_id = 0; 38 | edge_tag = 0; 39 | face_tag = 1; 40 | poly_intersect_mark = 0; 41 | periodic_tag = 0; 42 | 43 | area = 0.000001; 44 | peri_meter = 0.000001; 45 | edg_ang_norm = 0.000001; | ^~~~~~~~~~~~~~~~~~~~~~~~ include/mesh.hpp:46:9: warning: 'pcat_edge_weight' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 35 | Triangle3D() | | , pcat_edge_weight(0.000001) 36 | { 37 | element_id = 0; 38 | edge_tag = 0; 39 | face_tag = 1; 40 | poly_intersect_mark = 0; 41 | periodic_tag = 0; 42 | 43 | area = 0.000001; 44 | peri_meter = 0.000001; 45 | edg_ang_norm = 0.000001; 46 | pcat_edge_weight = 0.000001; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/mesh.hpp:52:18: warning: use emplace_back instead of push_back [modernize-use-emplace] 52 | side.push_back(Edge()); | ^~~~~~~~~~~~~~~~ | emplace_back( include/mesh.hpp:54:20: warning: use emplace_back instead of push_back [modernize-use-emplace] 54 | vertex.push_back(Eigen::Vector3d(0, 0, 0)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~ | emplace_back( include/mesh.hpp:79:9: warning: 'cur' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 77 | EdgeOfficer(int c) | | : cur(c) 78 | { 79 | cur = c; | ^~~~~~~~ include/mesh.hpp:80:9: warning: 'mean_edg_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 77 | EdgeOfficer(int c) | | , mean_edg_angle(0.0) 78 | { 79 | cur = c; 80 | mean_edg_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~~ include/mesh.hpp:83:28: warning: use emplace_back instead of push_back [modernize-use-emplace] 83 | edgeface_store.push_back(std::vector()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | emplace_back( include/mesh.hpp:98:71: warning: do not declare C-style arrays, use 'std::span' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 98 | void image_3d_to_2d(std::vector&, std::vector&, double[]); | ^~~~~~~~ include/microtubule.hpp:10:7: warning: class 'Microtubule' 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] 10 | class Microtubule: public DLBaseItem | ^ include/microtubule.hpp:14:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 14 | System* const system; | ^ include/microtubule.hpp:31:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 31 | ~Microtubule(); | ^ | override include/mt_tip.hpp:7:7: warning: class 'MTTip' 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] 7 | class MTTip | ^ include/parameters.hpp:105:3: warning: redundant access specifier has the same accessibility as the previous access specifier [readability-redundant-access-specifiers] 105 | public: | ^~~~~~~ include/parameters.hpp:42:3: note: previously declared here 42 | public: | ^ include/parameters.hpp:116:8: warning: constructor does not initialize these fields: r, c, rdirector [cppcoreguidelines-pro-type-member-init] 116 | struct OrderParameters | ^ 117 | { 118 | double r, c; | | {} {} 119 | double rdirector[3]; | | {} include/parameters.hpp:119:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 119 | double rdirector[3]; | ^~~~~~~~~~~~~~~~~~~ include/parameters.hpp:139:5: warning: constructor does not initialize these fields: local_order [cppcoreguidelines-pro-type-member-init] 136 | double local_order; | | {} 137 | Eigen::Vector3d sv; 138 | 139 | OrderParametersRaw(void) | ^ include/parameters.hpp:139:24: warning: redundant void argument list in function definition [modernize-redundant-void-arg] 139 | OrderParametersRaw(void) | ^~~~ include/parameters.hpp:141:9: warning: 'local_l' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | : local_l(0.) 140 | { 141 | local_l = 0.; | ^~~~~~~~~~~~~ include/parameters.hpp:142:9: warning: 'local_l_opt' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , local_l_opt(0.) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; | ^~~~~~~~~~~~~~~~~ include/parameters.hpp:143:9: warning: 'qxx' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxx(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; | ^~~~~~~~ include/parameters.hpp:144:9: warning: 'qxy' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxy(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; | ^~~~~~~~ include/parameters.hpp:145:9: warning: 'qxz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; | ^~~~~~~~ include/parameters.hpp:146:9: warning: 'qyy' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qyy(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; | ^~~~~~~~ include/parameters.hpp:147:9: warning: 'qyz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qyz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; 147 | qyz = 0; | ^~~~~~~~ include/parameters.hpp:148:9: warning: 'qzz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qzz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; 147 | qyz = 0; 148 | qzz = 0; | ^~~~~~~~ include/parameters.hpp:152:9: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 152 | return; | ^~~~~~~ 153 | } include/parameters.hpp:155:22: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 155 | double extract_r(double director[3], std::string geometry) | ^~~~~~~~~~~~~~~~~~ include/parameters.hpp:155:54: warning: the parameter 'geometry' of type 'std::string' (aka 'basic_string') is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 155 | double extract_r(double director[3], std::string geometry) | ^ | const & include/parameters.hpp:178:40: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 178 | director[i] = evec_mat(i, max_pos); | ^ include/parameters.hpp:195:40: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 195 | director[i] = evec_mat(i, min_pos); | ^ include/parameters.hpp:199:16: warning: redundant parentheses around expression [readability-redundant-parentheses] 199 | return (sel_eigen_val); | ^ ~ include/region.hpp:9:7: warning: class 'Region' 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] 9 | class Region | ^ include/region.hpp:20:21: warning: member 'geometry' of type 'Geometry *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | Geometry* const geometry; | ^ include/region.hpp:24:12: warning: use default member initializer for 'total_length' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 24 | double total_length; | ^ | {0} include/region.hpp:26:9: warning: use default member initializer for 'previous_update_tag' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 26 | int previous_update_tag; | ^ | {0} include/region.hpp:27:9: warning: use default member initializer for 'region_id' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 27 | int region_id; | ^ | {0} include/region.hpp:28:12: warning: use default member initializer for 'z_offset' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 28 | double z_offset; | ^ | {0.0} include/region.hpp:29:12: warning: use default member initializer for 'rot_angle' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 29 | double rot_angle; | ^ | {0.0} include/region.hpp:30:12: warning: use default member initializer for 'peri_meter' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 30 | double peri_meter; | ^ | {0.0} include/region.hpp:55:5: warning: constructor does not initialize these fields: face_tag, poly_intersect_mark [cppcoreguidelines-pro-type-member-init] 38 | Region(Geometry* g, double a): | ^ include/region.hpp:68:22: warning: use emplace_back instead of push_back [modernize-use-emplace] 68 | vertices.push_back(Eigen::Vector2d(0, 0)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~ | emplace_back( include/region.hpp:69:18: warning: use emplace_back instead of push_back [modernize-use-emplace] 69 | side.push_back(Edge()); | ^~~~~~~~~~~~~~~~ | emplace_back( include/region.hpp:73:25: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 73 | virtual ~Region() { return; }; | ^~~~~~~ include/region.hpp:78:51: warning: parameter 2 is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls] 78 | virtual void translate_vector(SurfaceVector&, const double) = 0; | ^~~~~ include/region.hpp:106:27: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 106 | virtual SurfaceVector random_surface_vector() = 0; | ~~~~~~~ ^ | override include/region.hpp:106:27: warning: visibility of function 'random_surface_vector' is changed from protected in class 'Region' to public [misc-override-with-different-visibility] include/region.hpp:90:27: note: function declared here as protected 90 | virtual SurfaceVector random_surface_vector() = 0; | ^ include/region.hpp:107:18: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 107 | virtual void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&) = 0; | ~~~~~~~ ^ | override include/region.hpp:107:59: warning: all parameters should be named in a function [readability-named-parameter] 107 | virtual void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&) = 0; | ^ | /*unused*/ /*unused*/ /*unused*/ /*unused*/ include/region.hpp:108:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 108 | void make_intersection_list(Trajectory*); | ^ | override include/region.hpp:108:10: warning: visibility of function 'make_intersection_list' is changed from protected in class 'Region' to public [misc-override-with-different-visibility] include/region.hpp:89:18: note: function declared here as protected 89 | virtual void make_intersection_list(Trajectory*) = 0; | ^ include/region.hpp:108:44: warning: all parameters should be named in a function [readability-named-parameter] 108 | void make_intersection_list(Trajectory*); | ^ | /*unused*/ include/region.hpp:109:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 109 | void translate_vector(SurfaceVector&, const double); | ^ | override include/region.hpp:109:41: warning: all parameters should be named in a function [readability-named-parameter] 109 | void translate_vector(SurfaceVector&, const double); | ^ | /*unused*/ /*unused*/ include/region.hpp:109:43: warning: parameter 2 is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls] 109 | void translate_vector(SurfaceVector&, const double); | ^~~~~ include/region.hpp:110:12: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 110 | double intersection_angle(Trajectory*, Trajectory*); | ^ | override include/region.hpp:110:42: warning: all parameters should be named in a function [readability-named-parameter] 110 | double intersection_angle(Trajectory*, Trajectory*); | ^ | /*unused*/ /*unused*/ include/region.hpp:116:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 116 | void output_snapshot(std::ostream&); | ^ | override include/region.hpp:116:39: warning: all parameters should be named in a function [readability-named-parameter] 116 | void output_snapshot(std::ostream&); | ^ | /*unused*/ include/region.hpp:119:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 119 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | override include/region.hpp:119:45: warning: all parameters should be named in a function [readability-named-parameter] 119 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | /*unused*/ /*unused*/ /*unused*/ include/region.hpp:128:19: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 128 | SurfaceVector random_surface_vector(); | ^ | override include/region.hpp:129:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 129 | void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&); | ^ | override include/region.hpp:129:51: warning: all parameters should be named in a function [readability-named-parameter] 129 | void get_trajectory_coordinates(SurfaceVector&, double&, std::vector&, TrajectoryVector&); | ^ | /*unused*/ /*unused*/ /*unused*/ /*unused*/ include/segment.hpp:7:7: warning: class 'Segment' 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] 7 | class Segment: public DLBaseItem | ^ include/segment.hpp:12:23: warning: member 'trajectory' of type 'Trajectory *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 12 | Trajectory* const trajectory; | ^ include/segment.hpp:27:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 27 | ~Segment(); | ^ | override include/segment.hpp:29:12: warning: method 'length' can be made const [readability-make-member-function-const] 29 | double length() { return std::abs(end - start); } | ^ | const include/surface.hpp:16:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | : x(x1) 15 | { 16 | x = x1; | ^~~~~~~ include/surface.hpp:17:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | , y(y1) 15 | { 16 | x = x1; 17 | y = y1; | ^~~~~~~ include/surface.hpp:18:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | , z(z1) 15 | { 16 | x = x1; 17 | y = y1; 18 | z = z1; | ^~~~~~~ include/surface.hpp:32:9: warning: 'cos_theta' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 30 | BendingOperator() | | : cos_theta(0.0) 31 | { 32 | cos_theta = 0.0; | ^~~~~~~~~~~~~~~~ include/surface.hpp:33:9: warning: 'sin_theta' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 30 | BendingOperator() | | , sin_theta(0.0) 31 | { 32 | cos_theta = 0.0; 33 | sin_theta = 0.0; | ^~~~~~~~~~~~~~~~ include/surface.hpp:49:5: warning: constructor does not initialize these fields: region [cppcoreguidelines-pro-type-member-init] 47 | Region* region; | | {} 48 | 49 | SurfaceVector() | ^ include/surface.hpp:51:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | : x(0.0) 50 | { 51 | x = 0.0; | ^~~~~~~~ include/surface.hpp:52:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , y(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; | ^~~~~~~~ include/surface.hpp:53:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , z(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; | ^~~~~~~~ include/surface.hpp:55:9: warning: 'angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , angle(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; 54 | 55 | angle = 0.0; | ^~~~~~~~~~~~ include/surface.hpp:56:9: warning: 'tv_pos' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , tv_pos(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; 54 | 55 | angle = 0.0; 56 | tv_pos = 0.0; | ^~~~~~~~~~~~~ include/surface.hpp:73:9: warning: 'mid_point' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | : mid_point(0) 72 | { 73 | mid_point = 0; | ^~~~~~~~~~~~~~ include/surface.hpp:74:9: warning: 'length' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | , length(0.0) 72 | { 73 | mid_point = 0; 74 | length = 0.0; | ^~~~~~~~~~~~~ include/surface.hpp:75:9: warning: 'edge_3d_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | , edge_3d_angle(0.0) 72 | { 73 | mid_point = 0; 74 | length = 0.0; 75 | edge_3d_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~ include/system.hpp:14:7: warning: class 'System' 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] 14 | class System | ^ include/system.hpp:19:15: warning: use default member initializer for 'geometry' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 19 | Geometry* geometry; | ^ | {nullptr} include/system.hpp:35:12: warning: use default member initializer for 'system_time' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 35 | double system_time; | ^ | {0} include/system.hpp:38:12: warning: use default member initializer for 'system_time_offset' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 38 | double system_time_offset; | ^ | {0} include/system.hpp:40:9: warning: use default member initializer for 'current_time_tag' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 40 | int current_time_tag; | ^ | {0} include/system.hpp:41:12: warning: use default member initializer for 'total_length' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 41 | double total_length; | ^ | {0} include/system.hpp:42:9: warning: use default member initializer for 'mem_usage' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 42 | int mem_usage; | ^ | {0} include/system.hpp:43:10: warning: use default member initializer for 'stop_signal' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 43 | bool stop_signal; | ^ | {false} include/system.hpp:46:9: warning: use default member initializer for 'total_s_event_count' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 46 | int total_s_event_count; | ^ | {0} include/system.hpp:47:9: warning: use default member initializer for 'total_valid_d_event_count' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 47 | int total_valid_d_event_count; | ^ | {0} include/system.hpp:48:9: warning: use default member initializer for 'total_invalid_d_event_count' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 48 | int total_invalid_d_event_count; | ^ | {0} include/system.hpp:49:9: warning: use default member initializer for 'total_length_severing_count' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 49 | int total_length_severing_count; | ^ | {0} include/system.hpp:50:9: warning: use default member initializer for 'total_intersection_severing_count' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 50 | int total_intersection_severing_count; | ^ | {0} include/system.hpp:51:9: warning: use default member initializer for 'boundary_crossing_count' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 51 | int boundary_crossing_count; | ^ | {0} include/system.hpp:52:9: warning: use default member initializer for 'total_zipper_count' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 52 | int total_zipper_count; | ^ | {0} include/system.hpp:53:9: warning: use default member initializer for 'total_crossover_count' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 53 | int total_crossover_count; | ^ | {0} include/system.hpp:54:9: warning: use default member initializer for 'total_induced_catastrophe_count' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 54 | int total_induced_catastrophe_count; | ^ | {0} include/system.hpp:56:9: warning: use default member initializer for 'count_segments' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 56 | int count_segments; | ^ | {0} include/system.hpp:57:9: warning: use default member initializer for 'count_trajectories' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 57 | int count_trajectories; | ^ | {0} include/system.hpp:58:9: warning: use default member initializer for 'count_intersections' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 58 | int count_intersections; | ^ | {0} include/system.hpp:70:12: warning: method 'identity' can be made static [readability-convert-member-functions-to-static] 70 | double identity(double i) { return i; } | ^ | static include/system.hpp:73:33: warning: all parameters should be named in a function [readability-named-parameter] 73 | double v_plus_to_time(double); | ^ | /*dist*/ include/system.hpp:76:33: warning: all parameters should be named in a function [readability-named-parameter] 76 | double time_to_v_plus(double); | ^ | /*time*/ include/system.hpp:78:12: warning: use default member initializer for 'next_status_event_time' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 78 | double next_status_event_time; | ^ | {0} include/system.hpp:79:12: warning: use default member initializer for 'next_snapshot_event_time' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 79 | double next_snapshot_event_time; | ^ | {0} include/system.hpp:84:26: warning: use default member initializer for 'event_descriptor_id' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 84 | EventDescriptorIndex event_descriptor_id; | ^ | {0} include/system.hpp:90:68: warning: all parameters should be named in a function [readability-named-parameter] 90 | EventDescriptorIndex register_event_descriptor(EventDescriptor*); | ^ | /*ei*/ include/system.hpp:93:58: warning: all parameters should be named in a function [readability-named-parameter] 93 | void unregister_event_descriptor(EventDescriptorIndex); | ^ | /*ei*/ include/system.hpp:96:63: warning: all parameters should be named in a function [readability-named-parameter] 96 | EventDescriptor* get_event_descriptor(EventDescriptorIndex); | ^ | /*idx*/ include/system.hpp:99:22: warning: use default member initializer for 'event_id' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 99 | EventTrackingTag event_id; | ^ | {0} include/system.hpp:104:17: warning: all parameters should be named in a function [readability-named-parameter] 104 | System(char*); | ^ | /*par_file*/ include/system.hpp:107:32: warning: all parameters should be named in a function [readability-named-parameter] 107 | void flush_and_reload(bool = true); | ^ | /*refresh_parameter_event*/ include/system.hpp:108:10: warning: function 'System::advance_time' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] 108 | void advance_time(double next_time); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:787:14: note: the definition seen here 787 | void System::advance_time(double new_time) | ^ include/system.hpp:108:10: note: differing parameters are named here: ('next_time'), in definition: ('new_time') 108 | void advance_time(double next_time); | ^ ~~~~~~~~~ | new_time include/system.hpp:114:20: warning: all parameters should be named in a function [readability-named-parameter] 114 | void run(double, std::string&, std::string&); | ^ | /*sim_time*/ /*c_s*/ /*m_s*/ include/system.hpp:115:21: warning: redundant void argument list in function declaration [modernize-redundant-void-arg] 115 | void next_event(void); | ^~~~ include/system.hpp:116:49: warning: all parameters should be named in a function [readability-named-parameter] 116 | void handle_global_event(DeterministicEvent&); | ^ | /*event*/ include/system.hpp:127:10: warning: function 'System::random_position_on_microtubule' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] 127 | void random_position_on_microtubule(double& cut_length, Segment*& cut_seg); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1154:14: note: the definition seen here 1154 | void System::random_position_on_microtubule(double& random_pos, Segment*& random_seg) | ^ include/system.hpp:127:10: note: differing parameters are named here: ('cut_length', 'cut_seg'), in definition: ('random_pos', 'random_seg') 127 | void random_position_on_microtubule(double& cut_length, Segment*& cut_seg); | ^ ~~~~~~~~~~ ~~~~~~~ | random_pos random_seg include/system.hpp:131:42: warning: all parameters should be named in a function [readability-named-parameter] 131 | CollisionType collision_result(double, int, int); | ^ | /*angle*/ /*n_parallel*/ /*n_cross*/ include/system.hpp:135:40: warning: all parameters should be named in a function [readability-named-parameter] 135 | void collision_probabilities(double, double&, double&); | ^ | /*angle*/ /*pcat*/ /*pzip*/ include/system.hpp:138:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 138 | double binomial_table[MAXBINOM][MAXBINOM]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/system.hpp:139:30: warning: redundant void argument list in function declaration [modernize-redundant-void-arg] 139 | void make_binomial_table(void); | ^~~~ include/system.hpp:142:12: warning: function 'System::multi_pzip' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name] 142 | double multi_pzip(int npar, int ncoll, double x_single, double z_single); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:117:16: note: the definition seen here 117 | double System::multi_pzip(int n_par, int n_coll, double x_single, double z_single) | ^ include/system.hpp:142:12: note: differing parameters are named here: ('npar', 'ncoll'), in definition: ('n_par', 'n_coll') 142 | double multi_pzip(int npar, int ncoll, double x_single, double z_single); | ^ ~~~~ ~~~~~ | n_par n_coll include/system.hpp:150:10: warning: use default member initializer for 'data_saved' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 150 | bool data_saved; | ^ | {false} include/trajectory.hpp:16:5: warning: constructor does not initialize these fields: cdir [cppcoreguidelines-pro-type-member-init] 16 | TrajectoryVector(double p, Direction d, Trajectory* t): | ^ include/trajectory.hpp:23:5: warning: constructor does not initialize these fields: pos, dir, cdir, trajectory [cppcoreguidelines-pro-type-member-init] 12 | double pos; | | {} 13 | Direction dir, cdir; 14 | Trajectory* trajectory; | | {} 15 | 16 | TrajectoryVector(double p, Direction d, Trajectory* t): 17 | pos(p), 18 | dir(d), 19 | trajectory(t) 20 | { 21 | } 22 | 23 | TrajectoryVector() {} | ^ include/trajectory.hpp:23:5: warning: use '= default' to define a trivial default constructor [modernize-use-equals-default] 23 | TrajectoryVector() {} | ^ ~~ | = default; include/trajectory.hpp:25:22: warning: method 'flipped' can be made const [readability-make-member-function-const] 25 | TrajectoryVector flipped() | ^ | const include/trajectory.hpp:27:16: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] 27 | return TrajectoryVector(pos, dir == Direction::FORWARD ? Direction::BACKWARD : Direction::FORWARD, trajectory); | ^~~~~~~~~~~~~~~~~ ~ | { } include/trajectory.hpp:31:7: warning: class 'Trajectory' 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] 31 | class Trajectory: public DLBaseItem | ^ include/trajectory.hpp:40:25: warning: member 'base' of type 'const SurfaceVector' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 40 | const SurfaceVector base; | ^ include/trajectory.hpp:41:18: warning: member 'length' of type 'const double' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 41 | const double length; | ^ include/trajectory.hpp:82:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 82 | ~Trajectory(); | ^ | override include/types.hpp:40:9: warning: macro 'PROGRAM_VERSION' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] 40 | #define PROGRAM_VERSION "BC.2018" | ^ include/types.hpp:88:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 88 | extern std::string direction_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:132:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 132 | extern std::string nucleation_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:141:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 141 | extern std::string interaction_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:153:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 153 | extern std::string bundle_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:7:14: warning: function 'collision_probabilities' has cognitive complexity of 27 (threshold 25) [readability-function-cognitive-complexity] 7 | void System::collision_probabilities(double angle, double& pcat, double& pzip) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:9:5: note: +1, including nesting penalty of 0, nesting level increased to 1 9 | switch (p.interaction_type) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:14:13: note: +2, including nesting penalty of 1, nesting level increased to 2 14 | if (angle < PI * p.magic_angle / 180.0) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:19:17: note: +3, including nesting penalty of 2, nesting level increased to 3 19 | if (p.zippering_enabled) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:23:17: note: +1, nesting level increased to 3 23 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:33:13: note: +2, including nesting penalty of 1, nesting level increased to 2 33 | if (p.catastrophes_enabled && (angle > p.cat_start_angle / 180.0 * PI)) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:33:40: note: +1 33 | if (p.catastrophes_enabled && (angle > p.cat_start_angle / 180.0 * PI)) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:36:17: note: +3, including nesting penalty of 2, nesting level increased to 3 36 | if (p.proportional_catastrophes) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:43:17: note: +1, nesting level increased to 3 43 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:48:13: note: +1, nesting level increased to 2 48 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:58:13: note: +2, including nesting penalty of 1, nesting level increased to 2 58 | if (p.catastrophes_enabled && (angle > p.cat_start_angle / 180.0 * PI)) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:58:40: note: +1 58 | if (p.catastrophes_enabled && (angle > p.cat_start_angle / 180.0 * PI)) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:61:17: note: +3, including nesting penalty of 2, nesting level increased to 3 61 | if (p.proportional_catastrophes) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:68:17: note: +1, nesting level increased to 3 68 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:73:13: note: +1, nesting level increased to 2 73 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:79:13: note: +2, including nesting penalty of 1, nesting level increased to 2 79 | if (p.zippering_enabled && (angle < p.magic_angle / 180.0 * PI)) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:79:37: note: +1 79 | if (p.zippering_enabled && (angle < p.magic_angle / 180.0 * PI)) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:83:13: note: +1, nesting level increased to 2 83 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:7:14: warning: method 'collision_probabilities' can be made const [readability-make-member-function-const] 7 | void System::collision_probabilities(double angle, double& pcat, double& pzip) | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:11:14: warning: no header providing "InteractionType" is directly included [misc-include-cleaner] 6 | 7 | void System::collision_probabilities(double angle, double& pcat, double& pzip) 8 | { 9 | switch (p.interaction_type) 10 | { 11 | case InteractionType::ZIP_FIRST: | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:19:21: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 19 | if (p.zippering_enabled) | ^ | != 0 /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:33:17: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 33 | if (p.catastrophes_enabled && (angle > p.cat_start_angle / 180.0 * PI)) | ^ | ( != 0) /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:36:21: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 36 | if (p.proportional_catastrophes) | ^ | != 0 /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:58:17: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 58 | if (p.catastrophes_enabled && (angle > p.cat_start_angle / 180.0 * PI)) | ^ | ( != 0) /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:61:21: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 61 | if (p.proportional_catastrophes) | ^ | != 0 /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:79:17: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 79 | if (p.zippering_enabled && (angle < p.magic_angle / 180.0 * PI)) | ^ | ( != 0) /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:97:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 97 | return; | ^~~~~~~ 98 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:104:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 104 | int i, j; | ^~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:104:9: warning: variable 'i' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 104 | int i, j; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:104:12: warning: variable 'j' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 104 | int i, j; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:108:23: warning: no header providing "std::max" is directly included [misc-include-cleaner] 6 | for (j = std::max(0, i - ncoll); j <= std::max(0, i - 1); j++) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:110:43: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 110 | total_sum += (npar + 1 - i) * binomial_table[ncoll][i - j] * binomial_table[std::max(0, i - 1)][j] | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:110:74: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 110 | total_sum += (npar + 1 - i) * binomial_table[ncoll][i - j] * binomial_table[std::max(0, i - 1)][j] | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:111:33: warning: no header providing "std::pow" is directly included [misc-include-cleaner] 6 | * std::pow(x_single, 2 * j + ncoll - i) * std::pow(z_single, 2 * (i - j)); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:121:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 121 | int i, j, k; | ^~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:121:9: warning: variable 'i' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 121 | int i, j, k; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:121:12: warning: variable 'j' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 121 | int i, j, k; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:121:15: warning: variable 'k' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 121 | int i, j, k; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:129:30: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 129 | total_sum += binomial_table[j][i - k] * binomial_table[i][k] * std::pow(x_single, 2 * k + j - i) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:129:57: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 129 | total_sum += binomial_table[j][i - k] * binomial_table[i][k] * std::pow(x_single, 2 * k + j - i) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:137:1: warning: no header providing "CollisionType" is directly included [misc-include-cleaner] 137 | CollisionType System::collision_result(double angle, int n_parallel, int n_cross) // range: 0..PI/2 | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:162:5: warning: variable 'rand' of type 'double' can be declared 'const' [misc-const-correctness] 162 | double rand = random_gen.rand_dbl_exc(); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:173:14: warning: no header providing "BundleType" is directly included [misc-include-cleaner] 173 | case BundleType::COUNT_LAST: | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:236:13: warning: do not use 'else' after 'return' [readability-else-after-return] 236 | else if (rand < pcat + pzip) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 237 | { | ~ 238 | return CollisionType::ZIPPER; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 239 | } | ~ 240 | 241 | else | ~~~~ 242 | { | ~ 243 | return CollisionType::CROSSOVER; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 244 | } | ~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:251:13: warning: variable 'pcross' of type 'double' can be declared 'const' [misc-const-correctness] 251 | double pcross = 1.0 - pcat - pzip; | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:252:13: warning: variable 'multi_px' of type 'double' can be declared 'const' [misc-const-correctness] 252 | double multi_px | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:253:33: warning: no header providing "std::min" is directly included [misc-include-cleaner] 253 | = multi_pcross(std::min(n_parallel, MAXBINOM - 1), std::min(n_cross, MAXBINOM - 1), pcross, pzip); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:254:13: warning: variable 'multi_pz' of type 'double' can be declared 'const' [misc-const-correctness] 254 | double multi_pz | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:262:13: warning: do not use 'else' after 'return' [readability-else-after-return] 262 | else if (rand < multi_px + multi_pz) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 263 | { | ~ 264 | return CollisionType::ZIPPER; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 265 | } | ~ 266 | 267 | else | ~~~~ 268 | { | ~ 269 | return CollisionType::INDUCED_CATASTROPHE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 270 | } | ~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:280:1: warning: constructor does not initialize these fields: next_stochastic_event_time, next_stochastic_event_type, binomial_table [cppcoreguidelines-pro-type-member-init] 280 | System::System(char* par_file): | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:289:27: warning: no header providing "time" is directly included [misc-include-cleaner] 6 | wall_clock_start_time(time(nullptr)), | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:320:5: warning: assigning newly created 'gsl::owner<>' to non-owner 'Geometry *' [cppcoreguidelines-owning-memory] 320 | geometry = new TriMeshGeometry(this); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:320:20: warning: no header providing "TriMeshGeometry" is directly included [misc-include-cleaner] 1 | geometry = new TriMeshGeometry(this); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:334:52: warning: no header providing "GlobalEventType" is directly included [misc-include-cleaner] 334 | time_queue.push_global(p.measurement_interval, GlobalEventType::STATUS); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:338:9: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 338 | if (p.movie_enabled) | ^ | != 0 /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:345:9: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 345 | if (p.ppb) | ^ | != 0 /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:358:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 358 | return; | ^~~~~~~ 359 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:367:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 367 | return; | ^~~~~~~ 368 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:370:40: warning: no header providing "std::string" is directly included [misc-include-cleaner] 6 | void System::run(double sim_time, std::string& c_s, std::string& m_s) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:370:48: warning: parameter 'c_s' is unused [misc-unused-parameters] 370 | void System::run(double sim_time, std::string& c_s, std::string& m_s) | ^~~ | /*c_s*/ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:370:66: warning: parameter 'm_s' is unused [misc-unused-parameters] 370 | void System::run(double sim_time, std::string& c_s, std::string& m_s) | ^~~ | /*m_s*/ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:378:14: warning: no header providing "std::cout" is directly included [misc-include-cleaner] 6 | std::cout << "===============================================" << std::endl; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:378:80: warning: no header providing "std::endl" is directly included [misc-include-cleaner] 6 | std::cout << "===============================================" << std::endl; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:387:17: warning: no header providing "difftime" is directly included [misc-include-cleaner] 387 | if (difftime(time(nullptr), wall_clock_start_time) >= p.wall_clock_limit) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:390:22: warning: no header providing "std::cerr" is directly included [misc-include-cleaner] 390 | std::cerr << "Wall clock limit (" << p.wall_clock_limit << " seconds) reached. Stopping.\n"; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:394:21: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 394 | if (p.movie_enabled) | ^ | != 0 /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:401:17: warning: no header providing "exit" is directly included [misc-include-cleaner] 6 | exit(-1); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:451:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 451 | return; | ^~~~~~~ 452 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:460:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 460 | return; | ^~~~~~~ 461 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:467:14: warning: narrowing conversion from '__size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 467 | total += (growing_mts.size() + shrinking_mts.size()) * (sizeof(Microtubule) + 2 * sizeof(MTTip*)); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:467:68: warning: no header providing "Microtubule" is directly included [misc-include-cleaner] 2 | total += (growing_mts.size() + shrinking_mts.size()) * (sizeof(Microtubule) + 2 * sizeof(MTTip*)); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:469:8: warning: narrowing conversion from 'unsigned long' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 469 | += event_descriptor_map.size() * (sizeof(std::pair) + 3 * sizeof(void*)); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:469:51: warning: no header providing "std::pair" is directly included [misc-include-cleaner] 6 | += event_descriptor_map.size() * (sizeof(std::pair) + 3 * sizeof(void*)); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:469:56: warning: no header providing "EventDescriptorIndex" is directly included [misc-include-cleaner] 469 | += event_descriptor_map.size() * (sizeof(std::pair) + 3 * sizeof(void*)); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:469:78: warning: no header providing "EventDescriptor" is directly included [misc-include-cleaner] 1 | += event_descriptor_map.size() * (sizeof(std::pair) + 3 * sizeof(void*)); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:470:14: warning: narrowing conversion from '__size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 470 | total += count_segments * (sizeof(Segment) + sizeof(Segment*)); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:470:39: warning: no header providing "Segment" is directly included [misc-include-cleaner] 6 | total += count_segments * (sizeof(Segment) + sizeof(Segment*)); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:471:14: warning: narrowing conversion from '__size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 471 | total += count_trajectories * (sizeof(Trajectory)); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:471:43: warning: no header providing "Trajectory" is directly included [misc-include-cleaner] 6 | total += count_trajectories * (sizeof(Trajectory)); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:472:14: warning: narrowing conversion from '__size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 472 | total += count_intersections * (2 * (sizeof(std::pair) + 3 * sizeof(void*))); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:472:67: warning: no header providing "Intersection" is directly included [misc-include-cleaner] 1 | total += count_intersections * (2 * (sizeof(std::pair) + 3 * sizeof(void*))); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:473:14: warning: narrowing conversion from 'unsigned long' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 473 | total += (time_queue.queue.size() + v_plus_queue.queue.size()) * (sizeof(DeterministicEvent) + 2 * sizeof(void*)); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:473:78: warning: no header providing "DeterministicEvent" is directly included [misc-include-cleaner] 473 | total += (time_queue.queue.size() + v_plus_queue.queue.size()) * (sizeof(DeterministicEvent) + 2 * sizeof(void*)); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:474:14: warning: narrowing conversion from 'unsigned long' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 474 | total += measurement_history.size() * sizeof(Measurement); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:474:50: warning: no header providing "Measurement" is directly included [misc-include-cleaner] 1 | total += measurement_history.size() * sizeof(Measurement); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:518:5: warning: variable 'time_offset' of type 'double' can be declared 'const' [misc-const-correctness] 518 | double time_offset(system_time); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:528:5: warning: use range-based for loop instead [modernize-loop-convert] 528 | for (size_t ridx = 0; ridx < geometry->regions.size(); ridx++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (auto & region : geometry->regions) 529 | { 530 | region_length = 0; 531 | tptr = geometry->regions[ridx]->trajectories.first(); | ~~~~~~~~~~~~~~~~~~~~~~~ | region 532 | 533 | while (tptr != nullptr) 534 | { 535 | region_length += tptr->segment_length(); 536 | tptr = tptr->next(); 537 | } 538 | 539 | if (std::abs(geometry->regions[ridx]->total_length - region_length) | ~~~~~~~~~~~~~~~~~~~~~~~ | region 540 | > ZERO_CUTOFF * std::max(100., region_length)) 541 | { 542 | std::cerr << "Unacceptable drift in region length (drift = " 543 | << std::abs(geometry->regions[ridx]->total_length - region_length) | ~~~~~~~~~~~~~~~~~~~~~~~ | region /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:528:10: warning: no header providing "size_t" is directly included [misc-include-cleaner] 6 | for (size_t ridx = 0; ridx < geometry->regions.size(); ridx++) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:539:18: warning: no header providing "std::abs" is directly included [misc-include-cleaner] 539 | if (std::abs(geometry->regions[ridx]->total_length - region_length) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:540:34: warning: no header providing "std::max" is directly included [misc-include-cleaner] 540 | > ZERO_CUTOFF * std::max(100., region_length)) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:585:9: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 585 | if (p.movie_enabled) | ^ | != 0 /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:591:9: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 591 | if (p.ppb) | ^ | != 0 /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:631:13: warning: Value stored to 'seg' is never read [clang-analyzer-deadcode.DeadStores] 631 | seg = seg->next(); | ^ ~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:631:13: note: Value stored to 'seg' is never read 631 | seg = seg->next(); | ^ ~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:643:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 643 | return; | ^~~~~~~ 644 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:646:8: warning: function 'lambert_w' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage] 646 | double lambert_w(double x) | ^ | static /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:649:49: warning: no header providing "std::numbers::e" is directly included [misc-include-cleaner] 6 | const double exp_min1 = 1.0 / std::numbers::e; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:650:37: warning: no header providing "std::pow" is directly included [misc-include-cleaner] 650 | const double zero_cutoff = std::pow(2.0, -DBL_MANT_DIG / 6.0); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:650:47: warning: no header providing "DBL_MANT_DIG" is directly included [misc-include-cleaner] 6 | const double zero_cutoff = std::pow(2.0, -DBL_MANT_DIG / 6.0); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:665:9: warning: variable 'h' of type 'double' can be declared 'const' [misc-const-correctness] 665 | double h = std::exp(-1.124491989777808 / (0.4225028202459761 + std::log(x))); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:665:25: warning: no header providing "std::exp" is directly included [misc-include-cleaner] 665 | double h = std::exp(-1.124491989777808 / (0.4225028202459761 + std::log(x))); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:665:77: warning: no header providing "std::log" is directly included [misc-include-cleaner] 665 | double h = std::exp(-1.124491989777808 / (0.4225028202459761 + std::log(x))); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:668:9: warning: variable 'z_n' of type 'double' can be declared 'const' [misc-const-correctness] 668 | double z_n = std::log(x / out) - out; | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:669:9: warning: variable 'temp' of type 'double' can be declared 'const' [misc-const-correctness] 669 | double temp = 2.0 * (1.0 + out) * (1.0 + out + z_n * 2.0 / 3.0); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:670:9: warning: variable 'e_n' of type 'double' can be declared 'const' [misc-const-correctness] 670 | double e_n = (z_n / (1.0 + out)) * (temp - z_n) / (temp - 2.0 * z_n); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:675:9: warning: variable 'eta' of type 'double' can be declared 'const' [misc-const-correctness] 675 | double eta = 2.0 + 2.0 * std::numbers::e * x; | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:676:9: warning: variable 'sqrt_eta' of type 'double' can be declared 'const' [misc-const-correctness] 676 | double sqrt_eta = std::sqrt(eta); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:676:32: warning: no header providing "std::sqrt" is directly included [misc-include-cleaner] 676 | double sqrt_eta = std::sqrt(eta); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:680:13: warning: variable 'n2' of type 'double' can be declared 'const' [misc-const-correctness] 680 | double n2 = 4.612634277343749 * std::sqrt(std::sqrt(sqrt_eta + 1.09556884765625)); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:681:13: warning: variable 'n1' of type 'double' can be declared 'const' [misc-const-correctness] 681 | double n1 | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:682:42: warning: no header providing "std::numbers::sqrt2" is directly included [misc-include-cleaner] 682 | = (4.0 - 3.0 * std::numbers::sqrt2 + (2.0 * std::numbers::sqrt2 - 3.0) * n2) / (std::numbers::sqrt2 - 2.0); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:687:13: warning: variable 'z_n' of type 'double' can be declared 'const' [misc-const-correctness] 687 | double z_n = std::log(x / out) - out; | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:688:13: warning: variable 'temp' of type 'double' can be declared 'const' [misc-const-correctness] 688 | double temp = 2.0 * (1.0 + out) * (1.0 + out + z_n * 2.0 / 3.0); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:689:13: warning: variable 'e_n' of type 'double' can be declared 'const' [misc-const-correctness] 689 | double e_n = (z_n / (1.0 + out)) * (temp - z_n) / (temp - 2.0 * z_n); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:720:5: warning: variable 'lmax' of type 'double' can be declared 'const' [misc-const-correctness] 720 | double lmax = (p.pool_density * geometry->area); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:721:5: warning: variable 'inv_l_max' of type 'double' can be declared 'const' [misc-const-correctness] 721 | double inv_l_max = 1.0 / (p.pool_density * geometry->area); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:723:5: warning: variable 'alpha' of type 'double' can be declared 'const' [misc-const-correctness] 723 | double alpha = (p.v_plus - p.v_tm) * growing_mts.size() + (p.v_min - p.v_tm) * shrinking_mts.size(); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:731:9: warning: do not use 'else' after 'return' [readability-else-after-return] 731 | else | ^~~~ 732 | { | ~ 733 | return ((lmax - total_length) - std::sqrt(std::pow(lmax - total_length, 2) - 2. * alpha * lmax * dist)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 734 | / alpha; | ~~~~~~~~ 735 | } | ~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:738:5: warning: variable 'beta' of type 'double' can be declared 'const' [misc-const-correctness] 738 | double beta = p.v_plus * growing_mts.size() * inv_l_max; | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:745:5: warning: variable 'pv' of type 'double' can be declared 'const' [misc-const-correctness] 745 | double pv = (alpha / beta - total_length) / (lmax - alpha / beta); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:746:5: warning: variable 'qv' of type 'double' can be declared 'const' [misc-const-correctness] 746 | double qv = growing_mts.size() * p.v_plus * dist / (lmax - alpha / beta); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:755:5: warning: variable 'l1' of type 'double' can be declared 'const' [misc-const-correctness] 755 | double l1 = pv - qv + std::log(pv); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:756:5: warning: variable 'l2' of type 'double' can be declared 'const' [misc-const-correctness] 756 | double l2 = std::log(l1); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:772:5: warning: variable 'inv_l_max' of type 'double' can be declared 'const' [misc-const-correctness] 772 | double inv_l_max = 1.0 / (p.pool_density * geometry->area); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:773:5: warning: variable 'alpha' of type 'double' can be declared 'const' [misc-const-correctness] 773 | double alpha = (p.v_plus - p.v_tm) * growing_mts.size() + (p.v_min - p.v_tm) * shrinking_mts.size(); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:780:5: warning: variable 'beta' of type 'double' can be declared 'const' [misc-const-correctness] 780 | double beta = p.v_plus * growing_mts.size() * inv_l_max; | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:781:5: warning: variable 'lambda_inf' of type 'double' can be declared 'const' [misc-const-correctness] 781 | double lambda_inf = inv_l_max * alpha / beta; | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:782:5: warning: variable 'lambda_0' of type 'double' can be declared 'const' [misc-const-correctness] 782 | double lambda_0 = total_length * inv_l_max; | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:811:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 811 | return; | ^~~~~~~ 812 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:817:5: warning: use range-based for loop instead [modernize-loop-convert] 817 | for (size_t ridx = 0; ridx < geometry->regions.size(); ridx++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (auto & region : geometry->regions) 818 | { 819 | geometry->regions[ridx]->update_region_length(force_update); | ~~~~~~~~~~~~~~~~~~~~~~~ | region /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:822:18: warning: variable 'mt' is not initialized [cppcoreguidelines-init-variables] 822 | Microtubule* mt; | ^ | = nullptr /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:861:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 861 | return; | ^~~~~~~ 862 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:866:28: warning: no header providing "std::numeric_limits" is directly included [misc-include-cleaner] 6 | double tq_value = std::numeric_limits::max(); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:894:18: warning: no header providing "StochasticEventType" is directly included [misc-include-cleaner] 894 | case StochasticEventType::CATASTROPHE: | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:920:9: warning: uninitialized record type: 'event' [cppcoreguidelines-pro-type-member-init] 920 | DeterministicEvent event; | ^ | {} /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:934:13: warning: use auto when declaring iterators [modernize-use-auto] 934 | std::map::iterator event_itr | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | auto /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:934:13: warning: variable 'event_itr' of type 'std::map::iterator' (aka '_Rb_tree_iterator>') can be declared 'const' [misc-const-correctness] 934 | std::map::iterator event_itr | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:934:18: warning: no header providing "std::map" is directly included [misc-include-cleaner] 6 | std::map::iterator event_itr | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:938:95: warning: do not access members of unions; consider using (boost::)variant instead [cppcoreguidelines-pro-type-union-access] 938 | if ((event_itr != event_descriptor_map.end()) && (event_itr->second->tag == event.tag)) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:974:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 974 | return; | ^~~~~~~ 975 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:977:14: warning: function 'handle_catastrophe_event' has cognitive complexity of 30 (threshold 25) [readability-function-cognitive-complexity] 977 | void System::handle_catastrophe_event() | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:985:5: note: +1, including nesting penalty of 0, nesting level increased to 1 985 | for (int d_tag = 0; d_tag <= p.face_number; d_tag++) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:993:5: note: +1, including nesting penalty of 0, nesting level increased to 1 993 | for (int d_tag = 0; d_tag <= p.face_number; d_tag++) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:996:9: note: +2, including nesting penalty of 1, nesting level increased to 2 996 | if (rand_gen < norm_fraction / norm) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1008:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1008 | if (tip_number < total_relevant_tips / 2) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1010:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1010 | while (true) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1012:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1012 | if (geometry->regions[ridx]->face_tag == domain_type) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1014:17: note: +4, including nesting penalty of 3, nesting level increased to 4 1014 | if (tip_number < geometry->regions[ridx]->growing_plus_tip_list.size()) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1025:5: note: +1, nesting level increased to 1 1025 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1030:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1030 | while (true) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1032:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1032 | if (geometry->regions[ridx]->face_tag == domain_type) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1034:17: note: +4, including nesting penalty of 3, nesting level increased to 4 1034 | if (tip_number < geometry->regions[ridx]->growing_plus_tip_list.size()) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1048:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1048 | if (tip_number < geometry->regions[ridx]->growing_plus_tip_list.size() / 2) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1051:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1051 | while (tip_number > 0) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1057:5: note: +1, nesting level increased to 1 1057 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1060:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1060 | while (tip_number < geometry->regions[ridx]->growing_plus_tip_list.size() - 1) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:980:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 980 | size_t tip_number(0), total_relevant_tips(0), ridx(0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:982:5: warning: no header providing "RegionMTTipTag" is directly included [misc-include-cleaner] 982 | RegionMTTipTag tip_tag; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:990:5: warning: variable 'rand_gen' of type 'double' can be declared 'const' [misc-const-correctness] 990 | double rand_gen = random_gen.rand(); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1069:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 1069 | return; | ^~~~~~~ 1070 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1086:9: warning: comparison between 'signed' and 'unsigned' integers [modernize-use-integer-sign-comparison] 4 | if (tip_number < static_cast(shrinking_mts.size() / 2)) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ | std::cmp_less( , ) /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1132:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 1132 | return; | ^~~~~~~ 1133 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1151:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 1151 | return; | ^~~~~~~ 1152 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1154:14: warning: function 'random_position_on_microtubule' has cognitive complexity of 52 (threshold 25) [readability-function-cognitive-complexity] 1154 | void System::random_position_on_microtubule(double& random_pos, Segment*& random_seg) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1163:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1163 | if (cut_length < 0.5 * total_length) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1166:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1166 | while (true) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1169:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1169 | if (cut_length < geometry->regions[ridx]->total_length) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1175:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1175 | if (ridx == static_cast(geometry->regions.size())) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1190:5: note: +1, nesting level increased to 1 1190 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1194:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1194 | while (true) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1197:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1197 | if (cut_length < geometry->regions[ridx]->total_length) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1203:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1203 | if (ridx == -1) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1228:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1228 | if (cut_length < 0.5 * (geometry->regions[ridx]->total_length)) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1232:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1232 | while (true) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1237:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1237 | while (seg != trptr->segments.end()) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1242:17: note: +4, including nesting penalty of 3, nesting level increased to 4 1242 | if (cut_length < (temp = (*seg)->length())) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1247:17: note: +1, nesting level increased to 4 1247 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1255:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1255 | if (stop_flag) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1261:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1261 | if (trptr->next() == nullptr) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1271:5: note: +1, nesting level increased to 1 1271 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1276:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1276 | while (true) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1280:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1280 | do | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1286:17: note: +4, including nesting penalty of 3, nesting level increased to 4 1286 | if (cut_length < (temp = (**seg).length())) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1291:17: note: +1, nesting level increased to 4 1291 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1297:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1297 | if (stop_flag) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1302:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1302 | if (trptr->previous() == nullptr) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1175:17: warning: comparison between 'signed' and 'unsigned' integers [modernize-use-integer-sign-comparison] 1175 | if (ridx == static_cast(geometry->regions.size())) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ | std::cmp_equal( , ) /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1224:10: warning: no header providing "std::list" is directly included [misc-include-cleaner] 6 | std::list::iterator seg; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1242:40: warning: an assignment within an 'if' condition is bug-prone [bugprone-assignment-in-if-condition] 1242 | if (cut_length < (temp = (*seg)->length())) | ~~~~~^~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1242:40: note: if it should be an assignment, move it out of the 'if' condition /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1242:40: note: if it is meant to be an equality check, change '=' to '==' /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1247:17: warning: do not use 'else' after 'break' [readability-else-after-return] 1247 | else | ^~~~ 1248 | { | ~ 1249 | // if not, continue | ~~~~~~~~~~~~~~~~~~~ 1250 | cut_length -= temp; | ~~~~~~~~~~~~~~~~~~~ 1251 | seg++; | ~~~~~~ 1252 | } | ~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1280:13: warning: avoid do-while loops [cppcoreguidelines-avoid-do-while] 1280 | do | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1286:40: warning: an assignment within an 'if' condition is bug-prone [bugprone-assignment-in-if-condition] 1286 | if (cut_length < (temp = (**seg).length())) | ~~~~~^~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1286:40: note: if it should be an assignment, move it out of the 'if' condition /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1286:40: note: if it is meant to be an equality check, change '=' to '==' /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1291:17: warning: do not use 'else' after 'break' [readability-else-after-return] 1291 | else | ^~~~ 1292 | { | ~ 1293 | cut_length -= temp; | ~~~~~~~~~~~~~~~~~~~ 1294 | } | ~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1316:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 1316 | return; | ^~~~~~~ 1317 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1322:14: warning: function 'handle_severing_at_cross_event' has cognitive complexity of 30 (threshold 25) [readability-function-cognitive-complexity] 1322 | void System::handle_severing_at_cross_event() | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1333:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1333 | if (p.cross_severing_top || (random_gen.rand_int(1) == 0)) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1333:30: note: +1 1333 | if (p.cross_severing_top || (random_gen.rand_int(1) == 0)) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1339:5: note: +1, nesting level increased to 1 1339 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1345:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1345 | if (diff_angle > 0.5 * PI) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1350:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1350 | if (diff_angle <= (p.cross_severing_start_angle) * PI / 180.) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1364:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1364 | if (cut_seg_number | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1372:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1372 | while (test_seg != final_test_seg) // NOTE: test should not be necessary "while(true)" | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1374:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1374 | if ((**test_seg).crosses_intersection(cut_is)) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1377:17: note: +4, including nesting penalty of 3, nesting level increased to 4 1377 | if (cut_seg_number == 0) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1386:5: note: +1, nesting level increased to 1 1386 | else // search from the end | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1390:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1390 | while (test_seg != final_test_seg) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1393:13: note: +3, including nesting penalty of 2, nesting level increased to 3 1393 | if ((**test_seg).crosses_intersection(cut_is)) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1396:17: note: +4, including nesting penalty of 3, nesting level increased to 4 1396 | if (cut_seg_number == cut_is->second.occupancy) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1404:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1404 | if (cut_seg != nullptr) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1408:9: note: +2, including nesting penalty of 1, nesting level increased to 2 1408 | if (cut_mt != nullptr) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1412:9: note: +1, nesting level increased to 2 1412 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1417:5: note: +1, nesting level increased to 1 1417 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1325:5: warning: no header providing "IntersectionItr" is directly included [misc-include-cleaner] 1325 | IntersectionItr cut_is; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1326:5: warning: no header providing "OccupiedIntersection" is directly included [misc-include-cleaner] 1326 | OccupiedIntersection* cut_occ_is(nullptr); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1326:5: warning: pointee of variable 'cut_occ_is' of type 'OccupiedIntersection *' can be declared 'const' [misc-const-correctness] 1326 | OccupiedIntersection* cut_occ_is(nullptr); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1332:61: warning: narrowing conversion from 'unsigned long' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1332 | cut_occ_is = occupied_intersection_list.element_address(random_gen.rand_int(occupied_intersection_list.size() - 1)); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1333:9: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 1333 | if (p.cross_severing_top || (random_gen.rand_int(1) == 0)) | ^ | ( != 0) /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1363:22: warning: narrowing conversion from 'unsigned long' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1363 | cut_seg_number = random_gen.rand_int(cut_is->second.occupancy - 1); // nummers 0 - occupancy -1 . | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1422:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 1422 | return; | ^~~~~~~ 1423 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1437:5: warning: no header providing "TrajectoryVector" is directly included [misc-include-cleaner] 1437 | TrajectoryVector tv; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1453:14: warning: no header providing "NucleationType" is directly included [misc-include-cleaner] 1453 | case NucleationType::ISOTROPIC: | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1464:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 1464 | return; | ^~~~~~~ 1465 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1504:23: warning: an assignment within an 'if' condition is bug-prone [bugprone-assignment-in-if-condition] 1504 | if ((temp = std::pow(const_rate, 2) + 2 * slope_rate * log_random) < 0) | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1504:23: note: if it should be an assignment, move it out of the 'if' condition /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1504:23: note: if it is meant to be an equality check, change '=' to '==' /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1523:9: warning: variable 'inv_l_max' of type 'double' can be declared 'const' [misc-const-correctness] 1523 | double inv_l_max = 1.0 / (p.pool_density * geometry->area); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1524:9: warning: variable 'alpha' of type 'double' can be declared 'const' [misc-const-correctness] 1524 | double alpha = (p.v_plus - p.v_tm) * growing_mts.size() + (p.v_min - p.v_tm) * shrinking_mts.size(); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1525:9: warning: variable 'beta' of type 'double' can be declared 'const' [misc-const-correctness] 1525 | double beta = p.v_plus * growing_mts.size() * inv_l_max; | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1526:9: warning: variable 'l_inf' of type 'double' can be declared 'const' [misc-const-correctness] 1526 | double l_inf = alpha / beta; | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1538:9: warning: variable 'x' of type 'double' can be declared 'const' [misc-const-correctness] 1538 | double x = p.k_sev * (total_length - l_inf) / (base_rate + p.k_sev * l_inf); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1539:9: warning: variable 'y' of type 'double' can be declared 'const' [misc-const-correctness] 1539 | double y = -beta * std::log(random_gen.rand_dbl_exc()) / (base_rate + p.k_sev * l_inf); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1543:9: warning: variable 'total_rate' of type 'double' can be declared 'const' [misc-const-correctness] 1543 | double total_rate | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1606:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 1606 | return; | ^~~~~~~ 1607 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1609:14: warning: function 'handle_global_event' has cognitive complexity of 38 (threshold 25) [readability-function-cognitive-complexity] 1609 | void System::handle_global_event(DeterministicEvent& event) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1614:5: note: +1, including nesting penalty of 0, nesting level increased to 1 1614 | switch (event.global_type) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1620:13: note: +2, including nesting penalty of 1, nesting level increased to 2 1620 | if (!integrity_check()) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1670:13: note: +2, including nesting penalty of 1, nesting level increased to 2 1670 | if (p.show_output == 1) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1684:13: note: +2, including nesting penalty of 1, nesting level increased to 2 1684 | if (p.reinitialize(p.new_parameter_file.c_str())) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1686:17: note: +3, including nesting penalty of 2, nesting level increased to 3 1686 | if (p.output_dir != old_dir) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1695:17: note: +3, including nesting penalty of 2, nesting level increased to 3 1695 | if (p.movie_enabled) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1697:21: note: +4, including nesting penalty of 3, nesting level increased to 4 1697 | if (next_snapshot_event_time < ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1703:17: note: +1, nesting level increased to 3 1703 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1708:17: note: +3, including nesting penalty of 2, nesting level increased to 3 1708 | if (p.new_parameter_read_interval > ZERO_CUTOFF) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1714:13: note: +1, nesting level increased to 2 1714 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1742:13: note: +2, including nesting penalty of 1, nesting level increased to 2 1742 | for (int d_tag = 0; d_tag <= p.face_number; d_tag++) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1747:13: note: +2, including nesting penalty of 1, nesting level increased to 2 1747 | for (size_t eno = 0; eno < geometry->regions.size(); eno++) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1749:17: note: +3, including nesting penalty of 2, nesting level increased to 3 1749 | if (geometry->regions[eno]->poly_intersect_mark == 1) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1753:21: note: +4, including nesting penalty of 3, nesting level increased to 4 1753 | for (size_t tip = 0; tip < geometry->regions[eno]->growing_plus_tip_list.size(); tip++) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1762:17: note: +1, nesting level increased to 3 1762 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1766:21: note: +4, including nesting penalty of 3, nesting level increased to 4 1766 | for (size_t tip = 0; tip < geometry->regions[eno]->growing_plus_tip_list.size(); tip++) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1614:19: warning: do not access members of unions; consider using (boost::)variant instead [cppcoreguidelines-pro-type-union-access] 1614 | switch (event.global_type) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1661:13: warning: variable 'normal_ppb' of type 'Eigen::Vector3d' (aka 'Matrix') can be declared 'const' [misc-const-correctness] 1661 | Eigen::Vector3d normal_ppb(order.rdirector[0], order.rdirector[1], order.rdirector[2]); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1661:20: warning: no header providing "Eigen::Vector3d" is directly included [misc-include-cleaner] 1 | Eigen::Vector3d normal_ppb(order.rdirector[0], order.rdirector[1], order.rdirector[2]); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1683:13: warning: variable 'old_dir' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness] 1683 | std::string old_dir = p.output_dir; | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1695:21: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 1695 | if (p.movie_enabled) | ^ | != 0 /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1733:13: warning: variable 'normal_ppb' of type 'Eigen::Vector3d' (aka 'Matrix') can be declared 'const' [misc-const-correctness] 1733 | Eigen::Vector3d normal_ppb(order.rdirector[0], order.rdirector[1], order.rdirector[2]); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1759:58: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'value_type' (aka 'int') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1759 | geometry->regions_index[1].push_back(eno); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1772:58: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'value_type' (aka 'int') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 1772 | geometry->regions_index[2].push_back(eno); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1781:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 1781 | return; | ^~~~~~~ 1782 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1787:5: warning: variable 'index' of type 'EventDescriptorIndex' (aka 'int') can be declared 'const' [misc-const-correctness] 1787 | EventDescriptorIndex index = event_descriptor_id++; | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1790:37: warning: no header providing "std::numeric_limits" is directly included [misc-include-cleaner] 1790 | if (event_descriptor_id == std::numeric_limits::max() - 10) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1801:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 1801 | return; | ^~~~~~~ 1802 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1806:5: warning: use auto when declaring iterators [modernize-use-auto] 1806 | std::map::iterator itr = event_descriptor_map.find(idx); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | auto /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1806:5: warning: variable 'itr' of type 'std::map::iterator' (aka '_Rb_tree_iterator>') can be declared 'const' [misc-const-correctness] 1806 | std::map::iterator itr = event_descriptor_map.find(idx); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1811:5: warning: do not use 'else' after 'return' [readability-else-after-return] 1811 | else | ^~~~ 1812 | { | ~ 1813 | return itr->second; | ~~~~~~~~~~~~~~~~~~~ 1814 | } | ~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1823:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 1823 | return; | ^~~~~~~ 1824 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1830:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 1830 | return; | ^~~~~~~ 1831 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1834:34: warning: redundant void argument list in function definition [modernize-redundant-void-arg] 1834 | void System::make_binomial_table(void) | ^~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1836:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 1836 | int i(0), j(0); | ^~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1838:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 1838 | double factorial[MAXBINOM]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1844:9: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 1844 | factorial[i] = temp; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1850:13: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 1850 | binomial_table[i][j] = factorial[i] / (factorial[j] * factorial[i - j]); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1850:36: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 1850 | binomial_table[i][j] = factorial[i] / (factorial[j] * factorial[i - j]); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1850:52: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 1850 | binomial_table[i][j] = factorial[i] / (factorial[j] * factorial[i - j]); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1850:67: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 1850 | binomial_table[i][j] = factorial[i] / (factorial[j] * factorial[i - j]); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/system.cpp:1853:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 1853 | return; | ^~~~~~~ 1854 | } 35515 warnings generated. Suppressed 35019 warnings (35019 in non-user code). Use -header-filter=.* or leave it as default to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. [12/13][31.1s] clang-tidy-22 -p=/home/runner/work/corticalsim/corticalsim/build/debug --config-file=/home/runner/work/corticalsim/corticalsim/.clang-tidy /home/runner/work/corticalsim/corticalsim/src/parameters.cpp include/CompactList_impl.hpp:12:7: warning: class 'CompactList' 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] 12 | class CompactList | ^ include/CompactList_impl.hpp:26:19: warning: all parameters should be named in a function [readability-named-parameter] 26 | void remove(T*); | ^ | /*element*/ include/CompactList_impl.hpp:49:16: warning: all parameters should be named in a function [readability-named-parameter] 49 | T* create(Q); | ^ | /*par1*/ include/CompactList_impl.hpp:51:16: warning: all parameters should be named in a function [readability-named-parameter] 51 | T* create(Q, R); | ^ | /*par1*/ /*par2*/ include/CompactList_impl.hpp:53:16: warning: all parameters should be named in a function [readability-named-parameter] 53 | T* create(Q, R, S); | ^ | /*par1*/ /*par2*/ /*par3*/ include/CompactList_impl.hpp:80:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 80 | return; | ^~~~~~~ 81 | } include/CompactList_impl.hpp:86:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 86 | T* new_element = new (MemPool::malloc()) T(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:94:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 94 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:102:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 102 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:110:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 110 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:145:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 145 | return; | ^~~~~~~ 146 | } include/CompactList_impl.hpp:149:7: warning: class 'CompactListItem' 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] 149 | class CompactListItem | ^ include/CompactList_impl.hpp:149:7: warning: destructor of 'CompactListItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] include/CompactList_impl.hpp:149:7: note: make it protected and non-virtual 149 | class CompactListItem | ^ 150 | { 151 | public: 152 | 153 | CompactListItem(): 154 | index(0) {}; 155 | int index; 156 | 157 | protected: 158 | 159 | virtual ~CompactListItem() {}; | ~~~~~~~ include/CompactList_impl.hpp:153:5: warning: public constructor allows the CRTP to be constructed as a regular template class; consider making it private and declaring the derived class as friend [bugprone-crtp-constructor-accessibility] 153 | CompactListItem(): | ^ 154 | index(0) {}; | 155 | int index; 156 | 157 | protected: 158 | 159 | virtual ~CompactListItem() {}; 160 | template 161 | friend class CompactList; 162 | }; include/CompactList_impl.hpp:155:9: warning: use default member initializer for 'index' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 154 | index(0) {}; | ~~~~~~~~ 155 | int index; | ^ | {0} include/CompactList_impl.hpp:159:13: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] 159 | virtual ~CompactListItem() {}; | ^ ~~ | = default include/DLList_impl.hpp:32:7: warning: class 'DLList' 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] 32 | class DLList | ^ include/DLList_impl.hpp:36:9: warning: use default member initializer for 'num_elements' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 36 | int num_elements; | ^ | { 0 } include/DLList_impl.hpp:42:8: warning: use default member initializer for 'first_element' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 42 | T* first_element; | ^ | { nullptr } 43 | T* last_element; 44 | 45 | using MemPool = crts::SingletonPool; 46 | 47 | void unlink_element(T*); 48 | T* link_element(T*); 49 | 50 | public: 51 | 52 | DLList(): 53 | num_elements{ 0 }, 54 | first_element{ nullptr }, | ~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:43:8: warning: use default member initializer for 'last_element' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 43 | T* last_element; | ^ | { nullptr } 44 | 45 | using MemPool = crts::SingletonPool; 46 | 47 | void unlink_element(T*); 48 | T* link_element(T*); 49 | 50 | public: 51 | 52 | DLList(): 53 | num_elements{ 0 }, 54 | first_element{ nullptr }, 55 | last_element{ nullptr } {}; | ~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:47:27: warning: all parameters should be named in a function [readability-named-parameter] 47 | void unlink_element(T*); | ^ | /*element*/ include/DLList_impl.hpp:48:23: warning: all parameters should be named in a function [readability-named-parameter] 48 | T* link_element(T*); | ^ | /*new_element*/ include/DLList_impl.hpp:70:16: warning: all parameters should be named in a function [readability-named-parameter] 70 | T* create(Q); | ^ | /*par1*/ include/DLList_impl.hpp:72:16: warning: all parameters should be named in a function [readability-named-parameter] 72 | T* create(Q, R); | ^ | /*par1*/ /*par2*/ include/DLList_impl.hpp:74:16: warning: all parameters should be named in a function [readability-named-parameter] 74 | T* create(Q, R, S); | ^ | /*par1*/ /*par2*/ /*par3*/ include/DLList_impl.hpp:75:19: warning: all parameters should be named in a function [readability-named-parameter] 75 | void remove(T*); | ^ | /*element*/ include/DLList_impl.hpp:77:49: warning: all parameters should be named in a function [readability-named-parameter] 77 | void import(DLList&, T*); | ^ | /*old_list*/ /*element*/ include/DLList_impl.hpp:78:53: warning: all parameters should be named in a function [readability-named-parameter] 78 | void import_set(DLList&, T*, T*); | ^ | /*old_list*/ /*first_element*/ /*last_element*/ include/DLList_impl.hpp:137:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 137 | return; | ^~~~~~~ 138 | } include/DLList_impl.hpp:154:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 154 | T* new_element = new (MemPool::malloc()) T(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:162:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 162 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:170:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 170 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:178:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 178 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:196:8: warning: variable 'temp' is not initialized [cppcoreguidelines-init-variables] 196 | T* temp; | ^ | = nullptr include/DLList_impl.hpp:211:7: warning: class 'DLBaseItem' 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] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: the implicit default constructor of the CRTP is publicly accessible; consider making it private and declaring the derived class as friend [bugprone-crtp-constructor-accessibility] 211 | class DLBaseItem | ^ 212 | { | include/DLList_impl.hpp:226:13: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] 226 | virtual ~DLBaseItem() {}; | ^ ~~ | = default include/det_queue.hpp:14:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 14 | System* const system; // pointer to containing system | ^ include/det_queue.hpp:14:19: warning: member variable 'system' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes] include/det_queue.hpp:17:12: warning: method 'current_pos' can be made const [readability-make-member-function-const] 17 | double current_pos() | ^ | const include/det_queue.hpp:25:63: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 25 | double progression(int cache_pos) { return current_base - value_cache[cache_pos]; } | ^ include/det_queue.hpp:48:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 48 | double value_cache[POSITION_CACHE_SIZE]; // cache of previous 'distance' values | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/det_queue.hpp:49:29: warning: member 'distance_time_conversion_function' of type 'double (System::*const)(double)' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 49 | double (System::* const distance_time_conversion_function)(double); | ^ include/det_queue.hpp:51:29: warning: member 'time_distance_conversion_function' of type 'double (System::*const)(double)' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 51 | double (System::* const time_distance_conversion_function)(double); | ^ include/event.hpp:7:7: warning: class 'EventDescriptor' 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] 7 | class EventDescriptor | ^ include/event.hpp:20:24: warning: member 'mt' of type 'Microtubule *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | Microtubule* const mt; | ^ include/intersection.hpp:6:7: warning: constructor does not initialize these fields: occupancy, other_trajectory, occupied_list_ptr [cppcoreguidelines-pro-type-member-init] 6 | class Intersection | ^ 7 | // this object describes the intersection of one trajectory with another, from 8 | // one side. since it is created twice for every intersection, it is by far the 9 | // most memory-intensive object and should be kept as small as possible 10 | { 11 | public: 12 | 13 | int occupancy; | | {} 14 | Trajectory* other_trajectory; | | {} 15 | IntersectionItr mirror; 16 | #ifdef CROSS_SEV 17 | OccupiedIntersection* occupied_list_ptr; | | {} include/intersection.hpp:33:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | : x(x1) 32 | { 33 | x = x1; | ^~~~~~~ include/intersection.hpp:34:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , y(y1) 32 | { 33 | x = x1; 34 | y = y1; | ^~~~~~~ include/intersection.hpp:35:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , z(z1) 32 | { 33 | x = x1; 34 | y = y1; 35 | z = z1; | ^~~~~~~ include/intersection.hpp:36:9: warning: 'next_element' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , next_element(n1) 32 | { 33 | x = x1; 34 | y = y1; 35 | z = z1; 36 | next_element = n1; | ^~~~~~~~~~~~~~~~~~ include/measurement.hpp:34:41: warning: parameter 2 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 | std::ostream& operator<<(std::ostream&, const Measurement); | ^~~~~ include/microtubule.hpp:10:7: warning: class 'Microtubule' 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] 10 | class Microtubule: public DLBaseItem | ^ include/microtubule.hpp:14:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 14 | System* const system; | ^ include/microtubule.hpp:31:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 31 | ~Microtubule(); | ^ | override include/mt_tip.hpp:7:7: warning: class 'MTTip' 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] 7 | class MTTip | ^ include/parameters.hpp:45:12: warning: use default member initializer for 'v_plus' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 45 | double v_plus; | ^ | {0.08} include/parameters.hpp:46:12: warning: use default member initializer for 'v_min' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 46 | double v_min; | ^ | {-0.16} include/parameters.hpp:47:12: warning: use default member initializer for 'v_tm' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 47 | double v_tm; | ^ | {0.01} include/parameters.hpp:48:12: warning: use default member initializer for 'k_sev' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 48 | double k_sev; | ^ | {0.001} include/parameters.hpp:49:12: warning: use default member initializer for 'k_cross' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 49 | double k_cross; | ^ | {0.001} include/parameters.hpp:50:12: warning: use default member initializer for 'k_cat' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 50 | double k_cat; | ^ | {0.005} include/parameters.hpp:51:12: warning: use default member initializer for 'k_res' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 51 | double k_res; | ^ | {0.007} include/parameters.hpp:52:12: warning: use default member initializer for 'k_nuc' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 52 | double k_nuc; | ^ | {0.001} include/parameters.hpp:54:12: warning: use default member initializer for 'pool_density' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 54 | double pool_density; | ^ | {5.0} include/parameters.hpp:55:9: warning: use default member initializer for 'treadmilling_enabled' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 55 | int treadmilling_enabled; | ^ | {1} include/parameters.hpp:56:9: warning: use default member initializer for 'severing_enabled' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 56 | int severing_enabled; | ^ | {0} include/parameters.hpp:57:9: warning: use default member initializer for 'cross_severing_enabled' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 57 | int cross_severing_enabled; | ^ | {0} include/parameters.hpp:58:9: warning: use default member initializer for 'cross_severing_top' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 58 | int cross_severing_top; | ^ | {1} include/parameters.hpp:59:12: warning: use default member initializer for 'cross_severing_start_angle' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 59 | double cross_severing_start_angle; | ^ | {0} include/parameters.hpp:60:9: warning: use default member initializer for 'ppb' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 60 | int ppb; | ^ | {0} include/parameters.hpp:61:9: warning: use default member initializer for 'restricted_pool' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 61 | int restricted_pool; | ^ | {0} include/parameters.hpp:62:9: warning: use default member initializer for 'edge_catastrophe_enabled' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 62 | int edge_catastrophe_enabled; | ^ | {0} include/parameters.hpp:63:9: warning: use default member initializer for 'edge_catastrophe_smooth' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 63 | int edge_catastrophe_smooth; | ^ | {0} include/parameters.hpp:64:12: warning: use default member initializer for 'p_cat_special_edge_max' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 64 | double p_cat_special_edge_max; | ^ | {0.0} include/parameters.hpp:65:12: warning: use default member initializer for 'p_cat_regular_edge_max' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 65 | double p_cat_regular_edge_max; | ^ | {0.0} include/parameters.hpp:66:9: warning: use default member initializer for 'edg_number' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 66 | int edg_number; | ^ | {0} include/parameters.hpp:67:9: warning: use default member initializer for 'face_number' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 67 | int face_number; | ^ | {0} include/parameters.hpp:71:20: warning: use default member initializer for 'nucleation_type' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 71 | NucleationType nucleation_type; | ^ | {NucleationType::ISOTROPIC} include/parameters.hpp:72:9: warning: use default member initializer for 'zippering_enabled' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 72 | int zippering_enabled; | ^ | {1} include/parameters.hpp:73:9: warning: use default member initializer for 'catastrophes_enabled' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 73 | int catastrophes_enabled; | ^ | {1} include/parameters.hpp:74:9: warning: use default member initializer for 'proportional_catastrophes' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 74 | int proportional_catastrophes; | ^ | {0} include/parameters.hpp:75:12: warning: use default member initializer for 'induced_catastrophe_fraction' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 75 | double induced_catastrophe_fraction; | ^ | {0.5} include/parameters.hpp:76:12: warning: use default member initializer for 'zip_fraction' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 76 | double zip_fraction; | ^ | {1.0} include/parameters.hpp:77:12: warning: use default member initializer for 'pp_bk_nuc_fraction' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 77 | double pp_bk_nuc_fraction; | ^ | {0.0} include/parameters.hpp:78:12: warning: use default member initializer for 'cat_start_angle' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 78 | double cat_start_angle; | ^ | {0} include/parameters.hpp:79:12: warning: use default member initializer for 'magic_angle' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 79 | double magic_angle; | ^ | {40} include/parameters.hpp:80:21: warning: use default member initializer for 'interaction_type' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 80 | InteractionType interaction_type; | ^ | {InteractionType::ZIP_FIRST} include/parameters.hpp:81:16: warning: use default member initializer for 'bundle_type' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 81 | BundleType bundle_type; | ^ | {BundleType::SIMPLE} include/parameters.hpp:84:12: warning: use default member initializer for 'stop_time' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 84 | double stop_time; | ^ | {36000} include/parameters.hpp:85:12: warning: use default member initializer for 'measurement_interval' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 85 | double measurement_interval; | ^ | {600} include/parameters.hpp:86:12: warning: use default member initializer for 'wall_clock_limit' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 86 | double wall_clock_limit; | ^ | {1000} include/parameters.hpp:87:12: warning: use default member initializer for 'memory_limit' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 87 | double memory_limit; | ^ | {10000000} include/parameters.hpp:91:9: warning: use default member initializer for 'create_subdir' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 91 | int create_subdir; | ^ | {1} include/parameters.hpp:94:9: warning: use default member initializer for 'movie_enabled' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 94 | int movie_enabled; | ^ | {0} include/parameters.hpp:95:9: warning: use default member initializer for 'show_output' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 95 | int show_output; | ^ | {0} include/parameters.hpp:96:9: warning: use default member initializer for 'show_mesh' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 96 | int show_mesh; | ^ | {0} include/parameters.hpp:98:12: warning: use default member initializer for 'movie_frame_interval' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 98 | double movie_frame_interval; | ^ | {-1} include/parameters.hpp:99:12: warning: use default member initializer for 'geometry_scale_factor' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 99 | double geometry_scale_factor; | ^ | {15.0} include/parameters.hpp:101:12: warning: use default member initializer for 'c0_calc' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 101 | double c0_calc; | ^ | {0} include/parameters.hpp:102:12: warning: use default member initializer for 'x0_calc' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 102 | double x0_calc; | ^ | {0} include/parameters.hpp:103:12: warning: use default member initializer for 'z0_calc' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 103 | double z0_calc; | ^ | {0} include/parameters.hpp:105:3: warning: redundant access specifier has the same accessibility as the previous access specifier [readability-redundant-access-specifiers] 105 | public: | ^~~~~~~ include/parameters.hpp:42:3: note: previously declared here 42 | public: | ^ include/parameters.hpp:107:23: warning: all parameters should be named in a function [readability-named-parameter] 107 | Parameters(System*); | ^ | /*s*/ include/parameters.hpp:108:32: warning: all parameters should be named in a function [readability-named-parameter] 108 | void initialize(const char*); | ^ | /*pf*/ include/parameters.hpp:109:34: warning: all parameters should be named in a function [readability-named-parameter] 109 | bool reinitialize(const char*); | ^ | /*pf*/ include/parameters.hpp:110:36: warning: all parameters should be named in a function [readability-named-parameter] 110 | bool read_from_file(const char*, bool); | ^ | /*pf*/ /*initial_run*/ include/parameters.hpp:119:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 119 | double rdirector[3]; | ^~~~~~~~~~~~~~~~~~~ include/parameters.hpp:139:5: warning: constructor does not initialize these fields: local_order [cppcoreguidelines-pro-type-member-init] 136 | double local_order; | | {} 137 | Eigen::Vector3d sv; 138 | 139 | OrderParametersRaw(void) | ^ include/parameters.hpp:139:24: warning: redundant void argument list in function definition [modernize-redundant-void-arg] 139 | OrderParametersRaw(void) | ^~~~ include/parameters.hpp:141:9: warning: 'local_l' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | : local_l(0.) 140 | { 141 | local_l = 0.; | ^~~~~~~~~~~~~ include/parameters.hpp:142:9: warning: 'local_l_opt' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , local_l_opt(0.) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; | ^~~~~~~~~~~~~~~~~ include/parameters.hpp:143:9: warning: 'qxx' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxx(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; | ^~~~~~~~ include/parameters.hpp:144:9: warning: 'qxy' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxy(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; | ^~~~~~~~ include/parameters.hpp:145:9: warning: 'qxz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; | ^~~~~~~~ include/parameters.hpp:146:9: warning: 'qyy' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qyy(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; | ^~~~~~~~ include/parameters.hpp:147:9: warning: 'qyz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qyz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; 147 | qyz = 0; | ^~~~~~~~ include/parameters.hpp:148:9: warning: 'qzz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qzz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; 147 | qyz = 0; 148 | qzz = 0; | ^~~~~~~~ include/parameters.hpp:152:9: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 152 | return; | ^~~~~~~ 153 | } include/parameters.hpp:155:22: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 155 | double extract_r(double director[3], std::string geometry) | ^~~~~~~~~~~~~~~~~~ include/parameters.hpp:155:54: warning: the parameter 'geometry' of type 'std::string' (aka 'basic_string') is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 155 | double extract_r(double director[3], std::string geometry) | ^ | const & include/parameters.hpp:178:40: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 178 | director[i] = evec_mat(i, max_pos); | ^ include/parameters.hpp:195:40: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 195 | director[i] = evec_mat(i, min_pos); | ^ include/parameters.hpp:199:16: warning: redundant parentheses around expression [readability-redundant-parentheses] 199 | return (sel_eigen_val); | ^ ~ include/segment.hpp:7:7: warning: class 'Segment' 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] 7 | class Segment: public DLBaseItem | ^ include/segment.hpp:12:23: warning: member 'trajectory' of type 'Trajectory *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 12 | Trajectory* const trajectory; | ^ include/segment.hpp:27:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 27 | ~Segment(); | ^ | override include/segment.hpp:29:12: warning: method 'length' can be made const [readability-make-member-function-const] 29 | double length() { return std::abs(end - start); } | ^ | const include/surface.hpp:16:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | : x(x1) 15 | { 16 | x = x1; | ^~~~~~~ include/surface.hpp:17:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | , y(y1) 15 | { 16 | x = x1; 17 | y = y1; | ^~~~~~~ include/surface.hpp:18:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | , z(z1) 15 | { 16 | x = x1; 17 | y = y1; 18 | z = z1; | ^~~~~~~ include/surface.hpp:32:9: warning: 'cos_theta' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 30 | BendingOperator() | | : cos_theta(0.0) 31 | { 32 | cos_theta = 0.0; | ^~~~~~~~~~~~~~~~ include/surface.hpp:33:9: warning: 'sin_theta' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 30 | BendingOperator() | | , sin_theta(0.0) 31 | { 32 | cos_theta = 0.0; 33 | sin_theta = 0.0; | ^~~~~~~~~~~~~~~~ include/surface.hpp:49:5: warning: constructor does not initialize these fields: region [cppcoreguidelines-pro-type-member-init] 47 | Region* region; | | {} 48 | 49 | SurfaceVector() | ^ include/surface.hpp:51:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | : x(0.0) 50 | { 51 | x = 0.0; | ^~~~~~~~ include/surface.hpp:52:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , y(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; | ^~~~~~~~ include/surface.hpp:53:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , z(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; | ^~~~~~~~ include/surface.hpp:55:9: warning: 'angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , angle(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; 54 | 55 | angle = 0.0; | ^~~~~~~~~~~~ include/surface.hpp:56:9: warning: 'tv_pos' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , tv_pos(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; 54 | 55 | angle = 0.0; 56 | tv_pos = 0.0; | ^~~~~~~~~~~~~ include/surface.hpp:73:9: warning: 'mid_point' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | : mid_point(0) 72 | { 73 | mid_point = 0; | ^~~~~~~~~~~~~~ include/surface.hpp:74:9: warning: 'length' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | , length(0.0) 72 | { 73 | mid_point = 0; 74 | length = 0.0; | ^~~~~~~~~~~~~ include/surface.hpp:75:9: warning: 'edge_3d_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | , edge_3d_angle(0.0) 72 | { 73 | mid_point = 0; 74 | length = 0.0; 75 | edge_3d_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~ include/system.hpp:14:7: warning: class 'System' 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] 14 | class System | ^ include/system.hpp:70:12: warning: method 'identity' can be made static [readability-convert-member-functions-to-static] 70 | double identity(double i) { return i; } | ^ | static include/system.hpp:115:21: warning: redundant void argument list in function declaration [modernize-redundant-void-arg] 115 | void next_event(void); | ^~~~ include/system.hpp:138:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 138 | double binomial_table[MAXBINOM][MAXBINOM]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/system.hpp:139:30: warning: redundant void argument list in function declaration [modernize-redundant-void-arg] 139 | void make_binomial_table(void); | ^~~~ include/trajectory.hpp:16:5: warning: constructor does not initialize these fields: cdir [cppcoreguidelines-pro-type-member-init] 16 | TrajectoryVector(double p, Direction d, Trajectory* t): | ^ include/trajectory.hpp:23:5: warning: constructor does not initialize these fields: pos, dir, cdir, trajectory [cppcoreguidelines-pro-type-member-init] 12 | double pos; | | {} 13 | Direction dir, cdir; 14 | Trajectory* trajectory; | | {} 15 | 16 | TrajectoryVector(double p, Direction d, Trajectory* t): 17 | pos(p), 18 | dir(d), 19 | trajectory(t) 20 | { 21 | } 22 | 23 | TrajectoryVector() {} | ^ include/trajectory.hpp:23:5: warning: use '= default' to define a trivial default constructor [modernize-use-equals-default] 23 | TrajectoryVector() {} | ^ ~~ | = default; include/trajectory.hpp:25:22: warning: method 'flipped' can be made const [readability-make-member-function-const] 25 | TrajectoryVector flipped() | ^ | const include/trajectory.hpp:27:16: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] 27 | return TrajectoryVector(pos, dir == Direction::FORWARD ? Direction::BACKWARD : Direction::FORWARD, trajectory); | ^~~~~~~~~~~~~~~~~ ~ | { } include/trajectory.hpp:31:7: warning: class 'Trajectory' 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] 31 | class Trajectory: public DLBaseItem | ^ include/trajectory.hpp:40:25: warning: member 'base' of type 'const SurfaceVector' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 40 | const SurfaceVector base; | ^ include/trajectory.hpp:41:18: warning: member 'length' of type 'const double' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 41 | const double length; | ^ include/trajectory.hpp:82:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 82 | ~Trajectory(); | ^ | override include/types.hpp:40:9: warning: macro 'PROGRAM_VERSION' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] 40 | #define PROGRAM_VERSION "BC.2018" | ^ include/types.hpp:88:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 88 | extern std::string direction_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:132:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 132 | extern std::string nucleation_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:141:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 141 | extern std::string interaction_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:153:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 153 | extern std::string bundle_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:6:1: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 6 | std::string direction_type_text[] = { "forward", "backward" }; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:6:6: warning: no header providing "std::string" is directly included [misc-include-cleaner] 2 | 3 | #include "parameters.hpp" 4 | #include "system.hpp" 5 | 6 | std::string direction_type_text[] = { "forward", "backward" }; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:6:13: warning: initialization of 'direction_type_text' with static storage duration may throw an exception that cannot be caught [bugprone-throwing-static-initialization,cert-err58-cpp] 6 | std::string direction_type_text[] = { "forward", "backward" }; | ^ /../lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/basic_string.h:706:7: note: possibly throwing constructor declared here 706 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:7:1: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 7 | std::string geometry_type_text[] = { "cell" }; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:7:13: warning: initialization of 'geometry_type_text' with static storage duration may throw an exception that cannot be caught [bugprone-throwing-static-initialization,cert-err58-cpp] 7 | std::string geometry_type_text[] = { "cell" }; | ^ /../lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/basic_string.h:706:7: note: possibly throwing constructor declared here 706 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:7:13: warning: variable 'geometry_type_text' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage] 7 | std::string geometry_type_text[] = { "cell" }; | ^ | static /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:8:1: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 8 | std::string interaction_type_text[] = { "zipFirst", "catFirst", "minimalFourier" }; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:8:13: warning: initialization of 'interaction_type_text' with static storage duration may throw an exception that cannot be caught [bugprone-throwing-static-initialization,cert-err58-cpp] 8 | std::string interaction_type_text[] = { "zipFirst", "catFirst", "minimalFourier" }; | ^ /../lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/basic_string.h:706:7: note: possibly throwing constructor declared here 706 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:9:1: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 9 | std::string nucleation_type_text[] = { "isotropic", "biased", "ellipse" }; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:9:13: warning: initialization of 'nucleation_type_text' with static storage duration may throw an exception that cannot be caught [bugprone-throwing-static-initialization,cert-err58-cpp] 9 | std::string nucleation_type_text[] = { "isotropic", "biased", "ellipse" }; | ^ /../lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/basic_string.h:706:7: note: possibly throwing constructor declared here 706 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:10:1: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 10 | std::string bundle_type_text[] = { "simple", "sticky", "noZip", "multiCollision", "Ncollision" }; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:10:13: warning: initialization of 'bundle_type_text' with static storage duration may throw an exception that cannot be caught [bugprone-throwing-static-initialization,cert-err58-cpp] 10 | std::string bundle_type_text[] = { "simple", "sticky", "noZip", "multiCollision", "Ncollision" }; | ^ /../lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/basic_string.h:706:7: note: possibly throwing constructor declared here 706 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:37:21: warning: no header providing "NucleationType" is directly included [misc-include-cleaner] 5 | nucleation_type(NucleationType::ISOTROPIC), | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:46:22: warning: no header providing "InteractionType" is directly included [misc-include-cleaner] 46 | interaction_type(InteractionType::ZIP_FIRST), | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:47:17: warning: no header providing "BundleType" is directly included [misc-include-cleaner] 47 | bundle_type(BundleType::SIMPLE), | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:49:10: warning: no header providing "time" is directly included [misc-include-cleaner] 1 | seed(time(nullptr)), | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:58:5: warning: redundant string initialization [readability-redundant-string-init] 58 | new_parameter_file(""), | ^~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:69:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 69 | return; | ^~~~~~~ 70 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:76:14: warning: no header providing "std::cout" is directly included [misc-include-cleaner] 1 | std::cout << "Failed to load parameters from file [" << pf << "]. Aborting\n"; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:77:9: warning: no header providing "exit" is directly included [misc-include-cleaner] 1 | exit(-1); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:82:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 82 | return; | ^~~~~~~ 83 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:91:16: warning: redundant parentheses around expression [readability-redundant-parentheses] 91 | return (true); | ^ ~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:93:5: warning: do not use 'else' after 'return' [readability-else-after-return] 93 | else | ^~~~ 94 | { | ~ 95 | return (false); | ~~~~~~~~~~~~~~~ 96 | } | ~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:95:16: warning: redundant parentheses around expression [readability-redundant-parentheses] note: this fix will not be applied because it overlaps with another fix 95 | return (false); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:101:10: warning: no header providing "std::ofstream" is directly included [misc-include-cleaner] 1 | std::ofstream& of = system->parameter_file; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:133:10: warning: no header providing "std::map" is directly included [misc-include-cleaner] 1 | std::map::iterator it; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:175:13: warning: function 'load_param' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage] 175 | inline void load_param(bool& recognized, std::ifstream& file, std::string& id, const char* tag, T& target) | ^ | static /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:175:47: warning: no header providing "std::ifstream" is directly included [misc-include-cleaner] 175 | inline void load_param(bool& recognized, std::ifstream& file, std::string& id, const char* tag, T& target) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:185:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 185 | return; | ^~~~~~~ 186 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:189:13: warning: function 'load_param_maps' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage] 189 | inline void load_param_maps(bool& recognized, | ^ | static /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:201:13: warning: variable 'key' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness] 201 | std::string key{ tag }; | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:206:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 206 | return; | ^~~~~~~ 207 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:210:13: warning: function 'load_param_random' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage] 210 | inline void load_param_random(bool& recognized, std::ifstream& file, std::string& id, const char* tag, T& target) | ^ | static /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:221:17: warning: variable 'ulong_max' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness] 221 | std::string ulong_max{ std::to_string(ULONG_MAX) }; | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:221:45: warning: no header providing "std::to_string" is directly included [misc-include-cleaner] 221 | std::string ulong_max{ std::to_string(ULONG_MAX) }; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:221:55: warning: no header providing "ULONG_MAX" is directly included [misc-include-cleaner] 1 | std::string ulong_max{ std::to_string(ULONG_MAX) }; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:224:78: warning: no header providing "std::endl" is directly included [misc-include-cleaner] 1 | std::cout << temp << " Bigger than" << ulong_max << std::endl; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:239:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 239 | return; | ^~~~~~~ 240 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:243:13: warning: function 'load_param_enum_text' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage] 243 | inline void load_param_enum_text(bool& recognized, | ^ | static /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:263:30: warning: C-style casts are discouraged; use static_cast/const_cast/reinterpret_cast [modernize-avoid-c-style-cast] 263 | target = (T)i; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:271:22: warning: no header providing "std::cerr" is directly included [misc-include-cleaner] 271 | std::cerr << "ERROR: No valid value for " << tag << ": " << temp << "\n"; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:277:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 277 | return; | ^~~~~~~ 278 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:301:10: warning: variable 'recognized' is not initialized [cppcoreguidelines-init-variables] 301 | bool recognized; | ^ | = false /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:312:13: warning: no header providing "std::getline" is directly included [misc-include-cleaner] 312 | getline(par_file, id); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:368:50: 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] 368 | nucleation_type_text, | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:375:51: 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] 375 | interaction_type_text, | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:378:66: 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] 378 | recognized, par_file, id, "bundleType", bundle_type, bundle_type_text, BundleType::COUNT_LAST); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:386:24: warning: variable 'edg_cat_val' is not initialized [cppcoreguidelines-init-variables] 4 | double edg_cat_val; | ^ | = NAN /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:387:17: warning: variable 'edg_cat_type1' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness] 387 | std::string edg_cat_type1 = "edgCat_" + std::to_string(edg); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:387:62: warning: no header providing "std::to_string" is directly included [misc-include-cleaner] 387 | std::string edg_cat_type1 = "edgCat_" + std::to_string(edg); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:388:17: warning: initializing non-owner 'char *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 388 | char* edg_cat_type = new char[edg_cat_type1.length() + 1]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:389:17: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] 389 | strcpy(edg_cat_type, edg_cat_type1.c_str()); | ^~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:389:17: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 389 | strcpy(edg_cat_type, edg_cat_type1.c_str()); | ^~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:389:17: warning: no header providing "strcpy" is directly included [misc-include-cleaner] 1 | strcpy(edg_cat_type, edg_cat_type1.c_str()); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:391:17: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory] 391 | delete[] edg_cat_type; | ^ ~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:388:17: note: variable declared here 388 | char* edg_cat_type = new char[edg_cat_type1.length() + 1]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:397:24: warning: variable 'face_cat_val' is not initialized [cppcoreguidelines-init-variables] 397 | double face_cat_val; | ^ | = NAN /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:398:17: warning: variable 'face_cat_type1' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness] 398 | std::string face_cat_type1 = "faceCat_" + std::to_string(face); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:399:17: warning: initializing non-owner 'char *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 399 | char* face_cat_type = new char[face_cat_type1.length() + 1]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:400:17: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy] 400 | strcpy(face_cat_type, face_cat_type1.c_str()); | ^~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:400:17: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 400 | strcpy(face_cat_type, face_cat_type1.c_str()); | ^~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:402:17: warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory] 402 | delete[] face_cat_type; | ^ ~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:399:17: note: variable declared here 399 | char* face_cat_type = new char[face_cat_type1.length() + 1]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:464:9: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 464 | if (movie_enabled) | ^ | != 0 /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:495:17: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 495 | if (zippering_enabled) | ^ | != 0 /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:497:17: warning: use `std::max` instead of `<` [readability-use-std-min-max] 1 | if (zip_fraction < 0.) | ^~~~~~~~~~~~~~~~~~~~~~ | zip_fraction = std::max(zip_fraction, 0.); 2 | { | ~ 3 | zip_fraction = 0.; | ~~~~~~~~~~~~~~~~~~ 4 | } | ~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:501:17: warning: use `std::min` instead of `>` [readability-use-std-min-max] 501 | if (zip_fraction > 1.) | ^~~~~~~~~~~~~~~~~~~~~~ | zip_fraction = std::min(zip_fraction, 1.); 502 | { | ~ 503 | zip_fraction = 1.; | ~~~~~~~~~~~~~~~~~~ 504 | } | ~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:512:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 512 | return; | ^~~~~~~ 513 | } /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:515:18: warning: function 'calc_theory_parameters' has cognitive complexity of 35 (threshold 25) [readability-function-cognitive-complexity] 515 | bool Parameters::calc_theory_parameters(void) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:521:5: note: +1, including nesting penalty of 0, nesting level increased to 1 521 | switch (interaction_type) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:527:13: note: +2, including nesting penalty of 1, nesting level increased to 2 527 | if (zippering_enabled) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:533:13: note: +1, nesting level increased to 2 533 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:539:13: note: +2, including nesting penalty of 1, nesting level increased to 2 539 | if (catastrophes_enabled) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:542:17: note: +3, including nesting penalty of 2, nesting level increased to 3 542 | if (proportional_catastrophes) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:545:21: note: +4, including nesting penalty of 3, nesting level increased to 4 545 | if (magic_angle > cat_start_angle) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:552:21: note: +1, nesting level increased to 4 552 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:560:17: note: +1, nesting level increased to 3 560 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:567:13: note: +1, nesting level increased to 2 567 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:580:13: note: +2, including nesting penalty of 1, nesting level increased to 2 580 | if (catastrophes_enabled) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:583:17: note: +3, including nesting penalty of 2, nesting level increased to 3 583 | if (proportional_catastrophes) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:591:17: note: +1, nesting level increased to 3 591 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:598:13: note: +2, including nesting penalty of 1, nesting level increased to 2 598 | if (zippering_enabled) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:603:17: note: +3, including nesting penalty of 2, nesting level increased to 3 603 | if (catastrophes_enabled && (cs_rad < ma_rad)) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:603:42: note: +1 603 | if (catastrophes_enabled && (cs_rad < ma_rad)) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:606:21: note: +4, including nesting penalty of 3, nesting level increased to 4 606 | if (proportional_catastrophes) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:617:21: note: +1, nesting level increased to 4 617 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:625:13: note: +1, nesting level increased to 2 625 | else | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:646:5: note: +1, including nesting penalty of 0, nesting level increased to 1 646 | if (show_output == 1) | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:515:41: warning: redundant void argument list in function definition [modernize-redundant-void-arg] 515 | bool Parameters::calc_theory_parameters(void) | ^~~~ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:518:5: warning: variable 'ma_rad' of type 'double' can be declared 'const' [misc-const-correctness] 518 | double ma_rad = magic_angle * PI / 180.0; | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:519:5: warning: variable 'cs_rad' of type 'double' can be declared 'const' [misc-const-correctness] 519 | double cs_rad = cat_start_angle * PI / 180.0; | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:527:17: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 527 | if (zippering_enabled) | ^ | != 0 /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:529:50: warning: no header providing "std::cos" is directly included [misc-include-cleaner] 1 | z0_calc = (4. / PI) * (1. - std::cos(ma_rad)) * zip_fraction; | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:539:17: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 539 | if (catastrophes_enabled) | ^ | != 0 /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:542:21: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 542 | if (proportional_catastrophes) | ^ | != 0 /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:548:48: warning: no header providing "std::sin" is directly included [misc-include-cleaner] 548 | * (1. - std::sin(ma_rad) + (ma_rad - cs_rad) * std::cos(ma_rad)) / (PI - 2. * cs_rad); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:562:89: warning: no header providing "std::max" is directly included [misc-include-cleaner] 1 | c0_calc = (4.0 / PI) * induced_catastrophe_fraction * std::cos(std::max(ma_rad, cs_rad)); | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:580:17: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 580 | if (catastrophes_enabled) | ^ | != 0 /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:583:21: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 583 | if (proportional_catastrophes) | ^ | != 0 /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:585:21: warning: variable 'temp' of type 'double' can be declared 'const' [misc-const-correctness] 585 | double temp = std::max(0., cs_rad); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:598:17: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 598 | if (zippering_enabled) | ^ | != 0 /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:603:21: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 603 | if (catastrophes_enabled && (cs_rad < ma_rad)) | ^ | ( != 0) /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:606:25: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 606 | if (proportional_catastrophes) | ^ | != 0 /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:608:25: warning: variable 'left_boundary' of type 'double' can be declared 'const' [misc-const-correctness] 608 | double left_boundary = std::max(0., cs_rad); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:641:5: warning: variable 'l0' of type 'double' can be declared 'const' [misc-const-correctness] 641 | double l0 = std::pow( | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:641:22: warning: no header providing "std::pow" is directly included [misc-include-cleaner] 641 | double l0 = std::pow( | ^ /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:643:5: warning: variable 'lavg_inv' of type 'double' can be declared 'const' [misc-const-correctness] 643 | double lavg_inv = k_res / (-v_min + v_tm) - k_cat / (v_plus - v_tm); | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:644:5: warning: variable 'g_0' of type 'double' can be declared 'const' [misc-const-correctness] 644 | double g_0 = l0 * lavg_inv; | ^ | const /home/runner/work/corticalsim/corticalsim/build/debug/../../src/parameters.cpp:657:12: warning: redundant parentheses around expression [readability-redundant-parentheses] 657 | return (true); | ^ ~ 34704 warnings generated. Suppressed 34376 warnings (34376 in non-user code). Use -header-filter=.* or leave it as default to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. [13/13][20.2s] clang-tidy-22 -p=/home/runner/work/corticalsim/corticalsim/build/debug --config-file=/home/runner/work/corticalsim/corticalsim/.clang-tidy /home/runner/work/corticalsim/corticalsim/src/analysis.cpp include/CompactList_impl.hpp:12:7: warning: class 'CompactList' 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] 12 | class CompactList | ^ include/CompactList_impl.hpp:26:19: warning: all parameters should be named in a function [readability-named-parameter] 26 | void remove(T*); | ^ | /*element*/ include/CompactList_impl.hpp:49:16: warning: all parameters should be named in a function [readability-named-parameter] 49 | T* create(Q); | ^ | /*par1*/ include/CompactList_impl.hpp:51:16: warning: all parameters should be named in a function [readability-named-parameter] 51 | T* create(Q, R); | ^ | /*par1*/ /*par2*/ include/CompactList_impl.hpp:53:16: warning: all parameters should be named in a function [readability-named-parameter] 53 | T* create(Q, R, S); | ^ | /*par1*/ /*par2*/ /*par3*/ include/CompactList_impl.hpp:80:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 80 | return; | ^~~~~~~ 81 | } include/CompactList_impl.hpp:86:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 86 | T* new_element = new (MemPool::malloc()) T(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:94:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 94 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:102:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 102 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:110:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 110 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/CompactList_impl.hpp:145:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 145 | return; | ^~~~~~~ 146 | } include/CompactList_impl.hpp:149:7: warning: class 'CompactListItem' 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] 149 | class CompactListItem | ^ include/CompactList_impl.hpp:149:7: warning: destructor of 'CompactListItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] include/CompactList_impl.hpp:149:7: note: make it protected and non-virtual 149 | class CompactListItem | ^ 150 | { 151 | public: 152 | 153 | CompactListItem(): 154 | index(0) {}; 155 | int index; 156 | 157 | protected: 158 | 159 | virtual ~CompactListItem() {}; | ~~~~~~~ include/CompactList_impl.hpp:153:5: warning: public constructor allows the CRTP to be constructed as a regular template class; consider making it private and declaring the derived class as friend [bugprone-crtp-constructor-accessibility] 153 | CompactListItem(): | ^ 154 | index(0) {}; | 155 | int index; 156 | 157 | protected: 158 | 159 | virtual ~CompactListItem() {}; 160 | template 161 | friend class CompactList; 162 | }; include/CompactList_impl.hpp:155:9: warning: use default member initializer for 'index' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 154 | index(0) {}; | ~~~~~~~~ 155 | int index; | ^ | {0} include/CompactList_impl.hpp:159:13: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] 159 | virtual ~CompactListItem() {}; | ^ ~~ | = default include/DLList_impl.hpp:32:7: warning: class 'DLList' 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] 32 | class DLList | ^ include/DLList_impl.hpp:36:9: warning: use default member initializer for 'num_elements' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 36 | int num_elements; | ^ | { 0 } include/DLList_impl.hpp:42:8: warning: use default member initializer for 'first_element' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 42 | T* first_element; | ^ | { nullptr } 43 | T* last_element; 44 | 45 | using MemPool = crts::SingletonPool; 46 | 47 | void unlink_element(T*); 48 | T* link_element(T*); 49 | 50 | public: 51 | 52 | DLList(): 53 | num_elements{ 0 }, 54 | first_element{ nullptr }, | ~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:43:8: warning: use default member initializer for 'last_element' [cppcoreguidelines-use-default-member-init,modernize-use-default-member-init] 43 | T* last_element; | ^ | { nullptr } 44 | 45 | using MemPool = crts::SingletonPool; 46 | 47 | void unlink_element(T*); 48 | T* link_element(T*); 49 | 50 | public: 51 | 52 | DLList(): 53 | num_elements{ 0 }, 54 | first_element{ nullptr }, 55 | last_element{ nullptr } {}; | ~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:47:27: warning: all parameters should be named in a function [readability-named-parameter] 47 | void unlink_element(T*); | ^ | /*element*/ include/DLList_impl.hpp:48:23: warning: all parameters should be named in a function [readability-named-parameter] 48 | T* link_element(T*); | ^ | /*new_element*/ include/DLList_impl.hpp:70:16: warning: all parameters should be named in a function [readability-named-parameter] 70 | T* create(Q); | ^ | /*par1*/ include/DLList_impl.hpp:72:16: warning: all parameters should be named in a function [readability-named-parameter] 72 | T* create(Q, R); | ^ | /*par1*/ /*par2*/ include/DLList_impl.hpp:74:16: warning: all parameters should be named in a function [readability-named-parameter] 74 | T* create(Q, R, S); | ^ | /*par1*/ /*par2*/ /*par3*/ include/DLList_impl.hpp:75:19: warning: all parameters should be named in a function [readability-named-parameter] 75 | void remove(T*); | ^ | /*element*/ include/DLList_impl.hpp:77:49: warning: all parameters should be named in a function [readability-named-parameter] 77 | void import(DLList&, T*); | ^ | /*old_list*/ /*element*/ include/DLList_impl.hpp:78:53: warning: all parameters should be named in a function [readability-named-parameter] 78 | void import_set(DLList&, T*, T*); | ^ | /*old_list*/ /*first_element*/ /*last_element*/ include/DLList_impl.hpp:137:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 137 | return; | ^~~~~~~ 138 | } include/DLList_impl.hpp:154:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 154 | T* new_element = new (MemPool::malloc()) T(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:162:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 162 | T* new_element = new (MemPool::malloc()) T(par1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:170:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 170 | T* new_element = new (MemPool::malloc()) T(par1, par2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:178:5: warning: initializing non-owner 'T *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory] 178 | T* new_element = new (MemPool::malloc()) T(par1, par2, par3); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/DLList_impl.hpp:196:8: warning: variable 'temp' is not initialized [cppcoreguidelines-init-variables] 196 | T* temp; | ^ | = nullptr include/DLList_impl.hpp:211:7: warning: class 'DLBaseItem' 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] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: destructor of 'DLBaseItem' is protected and virtual [cppcoreguidelines-virtual-class-destructor] 211 | class DLBaseItem | ^ include/DLList_impl.hpp:211:7: note: make it protected and non-virtual 211 | class DLBaseItem | ^ 212 | { 213 | public: 214 | 215 | template 216 | friend class DLList; 217 | 218 | private: 219 | 220 | T* next_element; 221 | T* previous_element; 222 | 223 | protected: 224 | 225 | // make sure that this cannot be deleted... 226 | virtual ~DLBaseItem() {}; | ~~~~~~~ include/DLList_impl.hpp:211:7: warning: the implicit default constructor of the CRTP is publicly accessible; consider making it private and declaring the derived class as friend [bugprone-crtp-constructor-accessibility] 211 | class DLBaseItem | ^ 212 | { | include/DLList_impl.hpp:226:13: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] 226 | virtual ~DLBaseItem() {}; | ^ ~~ | = default include/det_queue.hpp:14:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 14 | System* const system; // pointer to containing system | ^ include/det_queue.hpp:14:19: warning: member variable 'system' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes] include/det_queue.hpp:17:12: warning: method 'current_pos' can be made const [readability-make-member-function-const] 17 | double current_pos() | ^ | const include/det_queue.hpp:25:63: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 25 | double progression(int cache_pos) { return current_base - value_cache[cache_pos]; } | ^ include/det_queue.hpp:48:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 48 | double value_cache[POSITION_CACHE_SIZE]; // cache of previous 'distance' values | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/det_queue.hpp:49:29: warning: member 'distance_time_conversion_function' of type 'double (System::*const)(double)' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 49 | double (System::* const distance_time_conversion_function)(double); | ^ include/det_queue.hpp:51:29: warning: member 'time_distance_conversion_function' of type 'double (System::*const)(double)' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 51 | double (System::* const time_distance_conversion_function)(double); | ^ include/event.hpp:7:7: warning: class 'EventDescriptor' 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] 7 | class EventDescriptor | ^ include/event.hpp:20:24: warning: member 'mt' of type 'Microtubule *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | Microtubule* const mt; | ^ include/geometry.hpp:10:7: warning: class 'Geometry' 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] 10 | class Geometry | ^ include/geometry.hpp:20:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 20 | System* const system; | ^ include/geometry.hpp:28:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 28 | double patch_area[3]; | ^~~~~~~~~~~~~~~~~~~~ include/geometry.hpp:29:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 29 | std::vector regions_index[3]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/geometry.hpp:35:5: warning: constructor does not initialize these fields: areain_mesh, area_ppb, patch_area, element_max [cppcoreguidelines-pro-type-member-init] 19 | double area_ppb; | | {} 20 | std::vector ppb; 21 | 22 | double patch_area[3]; | | {} 23 | std::vector regions_index[3]; 24 | 25 | int element_max; | | {} 26 | Eigen::Vector3d object_cm, object_pa, nucleous_position; 27 | std::vector regions; 28 | 29 | Geometry(System* s, double a): | ^ include/geometry.hpp:39:9: warning: use range-based for loop instead [modernize-loop-convert] 39 | for (int i = 0; i < 3; i++) | ^ ~~~~~~~~~~~~~~~~~~~~~~~ | (double & i : patch_area) 40 | { 41 | patch_area[i] = 0.0; | ~~~~~~~~~~~~~ | i include/geometry.hpp:41:13: warning: do not use array subscript when the index is not an integer constant expression [cppcoreguidelines-pro-bounds-constant-array-index] 41 | patch_area[i] = 0.0; | ^ include/geometry.hpp:46:27: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 46 | virtual ~Geometry() { return; }; | ^~~~~~~ include/geometry.hpp:77:22: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 77 | TrajectoryVector extend_trajectory(Trajectory*, Direction); | ^ | override include/geometry.hpp:77:22: warning: visibility of function 'extend_trajectory' is changed from private in class 'Geometry' to public [misc-override-with-different-visibility] include/geometry.hpp:69:30: note: function declared here as private 69 | virtual TrajectoryVector extend_trajectory(Trajectory*, Direction) = 0; | ^ include/geometry.hpp:77:51: warning: all parameters should be named in a function [readability-named-parameter] 77 | TrajectoryVector extend_trajectory(Trajectory*, Direction); | ^ | /*unused*/ /*unused*/ include/geometry.hpp:78:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 78 | void get_order_parameters(OrderParameters&); | ^ | override include/geometry.hpp:78:47: warning: all parameters should be named in a function [readability-named-parameter] 78 | void get_order_parameters(OrderParameters&); | ^ | /*unused*/ include/geometry.hpp:79:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 79 | void output_snapshot(std::ostream&); | ^ | override include/geometry.hpp:79:39: warning: all parameters should be named in a function [readability-named-parameter] 79 | void output_snapshot(std::ostream&); | ^ | /*unused*/ include/geometry.hpp:80:10: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 80 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | override include/geometry.hpp:80:45: warning: all parameters should be named in a function [readability-named-parameter] 80 | void output_order_heat_map(std::ostream&, std::vector&, std::vector&); | ^ | /*unused*/ /*unused*/ /*unused*/ include/intersection.hpp:6:7: warning: constructor does not initialize these fields: occupancy, other_trajectory, occupied_list_ptr [cppcoreguidelines-pro-type-member-init] 6 | class Intersection | ^ 7 | // this object describes the intersection of one trajectory with another, from 8 | // one side. since it is created twice for every intersection, it is by far the 9 | // most memory-intensive object and should be kept as small as possible 10 | { 11 | public: 12 | 13 | int occupancy; | | {} 14 | Trajectory* other_trajectory; | | {} 15 | IntersectionItr mirror; 16 | #ifdef CROSS_SEV 17 | OccupiedIntersection* occupied_list_ptr; | | {} include/intersection.hpp:33:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | : x(x1) 32 | { 33 | x = x1; | ^~~~~~~ include/intersection.hpp:34:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , y(y1) 32 | { 33 | x = x1; 34 | y = y1; | ^~~~~~~ include/intersection.hpp:35:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , z(z1) 32 | { 33 | x = x1; 34 | y = y1; 35 | z = z1; | ^~~~~~~ include/intersection.hpp:36:9: warning: 'next_element' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 31 | PointAtEdge(double x1, double y1, double z1, int n1) | | , next_element(n1) 32 | { 33 | x = x1; 34 | y = y1; 35 | z = z1; 36 | next_element = n1; | ^~~~~~~~~~~~~~~~~~ include/measurement.hpp:7:7: warning: constructor does not initialize these fields: time, length_density, optical_density, average_length, number_of_m_ts, segments_per_mt, growing_number, shrinking_number, segments, trajectories, zipper_count, crossover_count, induced_catastrophe_count, valid_d_event_count, invalid_d_event_count, s_event_count, length_severing_count, intersection_severing_count, occupied_intersection_count, g_eff_adjust [cppcoreguidelines-pro-type-member-init] 7 | class Measurement | ^ 8 | { 9 | public: 10 | 11 | double time; | | {} 12 | double length_density; | | {} 13 | double optical_density; | | {} 14 | double average_length; | | {} 15 | int number_of_m_ts; | | {} 16 | double segments_per_mt; | | {} 17 | OrderParameters order; 18 | int growing_number; | | {} 19 | int shrinking_number; | | {} 20 | int segments; | | {} 21 | int trajectories; | | {} 22 | int zipper_count; | | {} include/measurement.hpp:34:39: warning: all parameters should be named in a function [readability-named-parameter] 34 | std::ostream& operator<<(std::ostream&, const Measurement); | ^ | /*o*/ /*m*/ include/measurement.hpp:34:41: warning: parameter 2 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 | std::ostream& operator<<(std::ostream&, const Measurement); | ^~~~~ include/measurement.hpp:35:49: warning: all parameters should be named in a function [readability-named-parameter] 35 | void write_measurement_descriptors(std::ostream&); | ^ | /*o*/ include/microtubule.hpp:10:7: warning: class 'Microtubule' 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] 10 | class Microtubule: public DLBaseItem | ^ include/microtubule.hpp:14:19: warning: member 'system' of type 'System *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 14 | System* const system; | ^ include/microtubule.hpp:31:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 31 | ~Microtubule(); | ^ | override include/mt_tip.hpp:7:7: warning: class 'MTTip' 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] 7 | class MTTip | ^ include/parameters.hpp:105:3: warning: redundant access specifier has the same accessibility as the previous access specifier [readability-redundant-access-specifiers] 105 | public: | ^~~~~~~ include/parameters.hpp:42:3: note: previously declared here 42 | public: | ^ include/parameters.hpp:116:8: warning: constructor does not initialize these fields: r, c, rdirector [cppcoreguidelines-pro-type-member-init] 116 | struct OrderParameters | ^ 117 | { 118 | double r, c; | | {} {} 119 | double rdirector[3]; | | {} include/parameters.hpp:119:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 119 | double rdirector[3]; | ^~~~~~~~~~~~~~~~~~~ include/parameters.hpp:139:5: warning: constructor does not initialize these fields: local_order [cppcoreguidelines-pro-type-member-init] 136 | double local_order; | | {} 137 | Eigen::Vector3d sv; 138 | 139 | OrderParametersRaw(void) | ^ include/parameters.hpp:139:24: warning: redundant void argument list in function definition [modernize-redundant-void-arg] 139 | OrderParametersRaw(void) | ^~~~ include/parameters.hpp:141:9: warning: 'local_l' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | : local_l(0.) 140 | { 141 | local_l = 0.; | ^~~~~~~~~~~~~ include/parameters.hpp:142:9: warning: 'local_l_opt' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , local_l_opt(0.) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; | ^~~~~~~~~~~~~~~~~ include/parameters.hpp:143:9: warning: 'qxx' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxx(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; | ^~~~~~~~ include/parameters.hpp:144:9: warning: 'qxy' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxy(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; | ^~~~~~~~ include/parameters.hpp:145:9: warning: 'qxz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qxz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; | ^~~~~~~~ include/parameters.hpp:146:9: warning: 'qyy' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qyy(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; | ^~~~~~~~ include/parameters.hpp:147:9: warning: 'qyz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qyz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; 147 | qyz = 0; | ^~~~~~~~ include/parameters.hpp:148:9: warning: 'qzz' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 139 | OrderParametersRaw(void) | | , qzz(0) 140 | { 141 | local_l = 0.; 142 | local_l_opt = 0.; 143 | qxx = 0; 144 | qxy = 0; 145 | qxz = 0; 146 | qyy = 0; 147 | qyz = 0; 148 | qzz = 0; | ^~~~~~~~ include/parameters.hpp:152:9: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 152 | return; | ^~~~~~~ 153 | } include/parameters.hpp:155:22: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 155 | double extract_r(double director[3], std::string geometry) | ^~~~~~~~~~~~~~~~~~ include/parameters.hpp:155:54: warning: the parameter 'geometry' of type 'std::string' (aka 'basic_string') is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] 155 | double extract_r(double director[3], std::string geometry) | ^ | const & include/parameters.hpp:178:40: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 178 | director[i] = evec_mat(i, max_pos); | ^ include/parameters.hpp:195:40: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'Index' (aka 'long') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 195 | director[i] = evec_mat(i, min_pos); | ^ include/parameters.hpp:199:16: warning: redundant parentheses around expression [readability-redundant-parentheses] 199 | return (sel_eigen_val); | ^ ~ include/segment.hpp:7:7: warning: class 'Segment' 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] 7 | class Segment: public DLBaseItem | ^ include/segment.hpp:12:23: warning: member 'trajectory' of type 'Trajectory *const' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 12 | Trajectory* const trajectory; | ^ include/segment.hpp:27:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 27 | ~Segment(); | ^ | override include/segment.hpp:29:12: warning: method 'length' can be made const [readability-make-member-function-const] 29 | double length() { return std::abs(end - start); } | ^ | const include/surface.hpp:16:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | : x(x1) 15 | { 16 | x = x1; | ^~~~~~~ include/surface.hpp:17:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | , y(y1) 15 | { 16 | x = x1; 17 | y = y1; | ^~~~~~~ include/surface.hpp:18:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 14 | Vertices(double x1, double y1, double z1) | | , z(z1) 15 | { 16 | x = x1; 17 | y = y1; 18 | z = z1; | ^~~~~~~ include/surface.hpp:32:9: warning: 'cos_theta' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 30 | BendingOperator() | | : cos_theta(0.0) 31 | { 32 | cos_theta = 0.0; | ^~~~~~~~~~~~~~~~ include/surface.hpp:33:9: warning: 'sin_theta' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 30 | BendingOperator() | | , sin_theta(0.0) 31 | { 32 | cos_theta = 0.0; 33 | sin_theta = 0.0; | ^~~~~~~~~~~~~~~~ include/surface.hpp:49:5: warning: constructor does not initialize these fields: region [cppcoreguidelines-pro-type-member-init] 47 | Region* region; | | {} 48 | 49 | SurfaceVector() | ^ include/surface.hpp:51:9: warning: 'x' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | : x(0.0) 50 | { 51 | x = 0.0; | ^~~~~~~~ include/surface.hpp:52:9: warning: 'y' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , y(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; | ^~~~~~~~ include/surface.hpp:53:9: warning: 'z' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , z(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; | ^~~~~~~~ include/surface.hpp:55:9: warning: 'angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , angle(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; 54 | 55 | angle = 0.0; | ^~~~~~~~~~~~ include/surface.hpp:56:9: warning: 'tv_pos' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 49 | SurfaceVector() | | , tv_pos(0.0) 50 | { 51 | x = 0.0; 52 | y = 0.0; 53 | z = 0.0; 54 | 55 | angle = 0.0; 56 | tv_pos = 0.0; | ^~~~~~~~~~~~~ include/surface.hpp:73:9: warning: 'mid_point' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | : mid_point(0) 72 | { 73 | mid_point = 0; | ^~~~~~~~~~~~~~ include/surface.hpp:74:9: warning: 'length' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | , length(0.0) 72 | { 73 | mid_point = 0; 74 | length = 0.0; | ^~~~~~~~~~~~~ include/surface.hpp:75:9: warning: 'edge_3d_angle' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer] 71 | ElementList() | | , edge_3d_angle(0.0) 72 | { 73 | mid_point = 0; 74 | length = 0.0; 75 | edge_3d_angle = 0.0; | ^~~~~~~~~~~~~~~~~~~~ include/system.hpp:14:7: warning: class 'System' 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] 14 | class System | ^ include/system.hpp:70:12: warning: method 'identity' can be made static [readability-convert-member-functions-to-static] 70 | double identity(double i) { return i; } | ^ | static include/system.hpp:115:21: warning: redundant void argument list in function declaration [modernize-redundant-void-arg] 115 | void next_event(void); | ^~~~ include/system.hpp:138:5: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 138 | double binomial_table[MAXBINOM][MAXBINOM]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/system.hpp:139:30: warning: redundant void argument list in function declaration [modernize-redundant-void-arg] 139 | void make_binomial_table(void); | ^~~~ include/system.hpp:153:41: warning: all parameters should be named in a function [readability-named-parameter] 153 | void write_measurements_to_file(int = 0); | ^ | /*number_to_keep*/ include/trajectory.hpp:16:5: warning: constructor does not initialize these fields: cdir [cppcoreguidelines-pro-type-member-init] 16 | TrajectoryVector(double p, Direction d, Trajectory* t): | ^ include/trajectory.hpp:23:5: warning: constructor does not initialize these fields: pos, dir, cdir, trajectory [cppcoreguidelines-pro-type-member-init] 12 | double pos; | | {} 13 | Direction dir, cdir; 14 | Trajectory* trajectory; | | {} 15 | 16 | TrajectoryVector(double p, Direction d, Trajectory* t): 17 | pos(p), 18 | dir(d), 19 | trajectory(t) 20 | { 21 | } 22 | 23 | TrajectoryVector() {} | ^ include/trajectory.hpp:23:5: warning: use '= default' to define a trivial default constructor [modernize-use-equals-default] 23 | TrajectoryVector() {} | ^ ~~ | = default; include/trajectory.hpp:25:22: warning: method 'flipped' can be made const [readability-make-member-function-const] 25 | TrajectoryVector flipped() | ^ | const include/trajectory.hpp:27:16: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] 27 | return TrajectoryVector(pos, dir == Direction::FORWARD ? Direction::BACKWARD : Direction::FORWARD, trajectory); | ^~~~~~~~~~~~~~~~~ ~ | { } include/trajectory.hpp:31:7: warning: class 'Trajectory' 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] 31 | class Trajectory: public DLBaseItem | ^ include/trajectory.hpp:40:25: warning: member 'base' of type 'const SurfaceVector' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 40 | const SurfaceVector base; | ^ include/trajectory.hpp:41:18: warning: member 'length' of type 'const double' is const qualified [cppcoreguidelines-avoid-const-or-ref-data-members] 41 | const double length; | ^ include/trajectory.hpp:82:5: warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override] 82 | ~Trajectory(); | ^ | override include/types.hpp:40:9: warning: macro 'PROGRAM_VERSION' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] 40 | #define PROGRAM_VERSION "BC.2018" | ^ include/types.hpp:88:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 88 | extern std::string direction_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:132:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 132 | extern std::string nucleation_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:141:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 141 | extern std::string interaction_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/types.hpp:153:8: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 153 | extern std::string bundle_type_text[]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/analysis.cpp:6:1: warning: included header linalg.hpp is not used directly [misc-include-cleaner] 6 | #include "linalg.hpp" | ^~~~~~~~~~~~~~~~~~~~~ 7 | src/analysis.cpp:8:6: warning: no header providing "std::ostream" is directly included [misc-include-cleaner] 2 | #include "types.hpp" 3 | #include "measurement.hpp" 4 | #include "geometry.hpp" 5 | #include "system.hpp" 6 | #include "linalg.hpp" 7 | 8 | std::ostream& operator<<(std::ostream& o, const Measurement m) | ^ src/analysis.cpp:8:61: warning: the const qualified parameter 'm' of type 'const Measurement' is copied for each invocation; consider making it a reference [performance-unnecessary-value-param] 8 | std::ostream& operator<<(std::ostream& o, const Measurement m) | ^ | & src/analysis.cpp:11:17: warning: no header providing "std::ios" is directly included [misc-include-cleaner] 2 | #include "types.hpp" 3 | #include "measurement.hpp" 4 | #include "geometry.hpp" 5 | #include "system.hpp" 6 | #include "linalg.hpp" 7 | 8 | std::ostream& operator<<(std::ostream& o, const Measurement m) 9 | { 10 | // set precession to 4 decimal digits 11 | o.setf(std::ios::fixed, std::ios::floatfield); | ^ src/analysis.cpp:24:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 24 | return; | ^~~~~~~ 25 | } src/analysis.cpp:27:32: warning: redundant void argument list in function definition [modernize-redundant-void-arg] 27 | void System::initialize_output(void) | ^~~~ src/analysis.cpp:31:9: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 31 | if (p.create_subdir) | ^ | != 0 src/analysis.cpp:33:9: warning: variable 'identifier' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness] 33 | std::string identifier; | ^ | const src/analysis.cpp:33:14: warning: no header providing "std::string" is directly included [misc-include-cleaner] 2 | std::string identifier; | ^ src/analysis.cpp:33:21: warning: unused local variable 'identifier' of type 'std::string' (aka 'basic_string') [bugprone-unused-local-non-trivial-variable] 33 | std::string identifier; | ^ src/analysis.cpp:34:9: warning: no header providing "time_t" is directly included [misc-include-cleaner] 1 | time_t time_raw; | ^ src/analysis.cpp:34:16: warning: variable 'time_raw' is not initialized [cppcoreguidelines-init-variables] 34 | time_t time_raw; | ^ | = 0 src/analysis.cpp:35:16: warning: no header providing "tm" is directly included [misc-include-cleaner] 35 | struct tm* time_struct; | ^ src/analysis.cpp:35:20: warning: variable 'time_struct' is not initialized [cppcoreguidelines-init-variables] 35 | struct tm* time_struct; | ^ | = nullptr src/analysis.cpp:36:9: warning: do not declare C-style arrays, use 'std::array' instead [cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays] 36 | char time_name[100]; | ^~~~~~~~~~~~~~~~~~~ src/analysis.cpp:38:9: warning: no header providing "time" is directly included [misc-include-cleaner] 38 | time(&time_raw); | ^ src/analysis.cpp:38:9: warning: the value returned by this function should not be disregarded; neglecting it may lead to errors [cert-err33-c] 38 | time(&time_raw); | ^~~~~~~~~~~~~~~ src/analysis.cpp:38:9: note: cast the expression to void to silence this warning src/analysis.cpp:39:23: warning: no header providing "localtime" is directly included [misc-include-cleaner] 39 | time_struct = localtime(&time_raw); | ^ src/analysis.cpp:40:9: warning: no header providing "strftime" is directly included [misc-include-cleaner] 40 | strftime(time_name, 100, "%c", time_struct); | ^ src/analysis.cpp:40:9: warning: the value returned by this function should not be disregarded; neglecting it may lead to errors [cert-err33-c] 40 | strftime(time_name, 100, "%c", time_struct); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/analysis.cpp:40:9: note: cast the expression to void to silence this warning src/analysis.cpp:40:18: 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] 40 | strftime(time_name, 100, "%c", time_struct); | ^ src/analysis.cpp:43:72: 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] 43 | p.output_dir += "/" + p.geometry + "/outputData" + std::string(time_name); | ^ src/analysis.cpp:44:9: warning: variable 'i' of type 'int' can be declared 'const' [misc-const-correctness] 44 | int i = std::filesystem::create_directories(p.output_dir.c_str()); | ^ | const src/analysis.cpp:44:17: warning: implicit conversion 'bool' -> 'int' [readability-implicit-bool-conversion] 44 | int i = std::filesystem::create_directories(p.output_dir.c_str()); | ^ | static_cast( ) src/analysis.cpp:47:13: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 47 | if (i) | ^ | != 0 src/analysis.cpp:49:18: warning: no header providing "std::cerr" is directly included [misc-include-cleaner] 2 | std::cerr << "ERROR: creating output directory " << p.output_dir << " ; " << strerror(i) << "\n"; | ^ src/analysis.cpp:49:90: warning: no header providing "strerror" is directly included [misc-include-cleaner] 1 | std::cerr << "ERROR: creating output directory " << p.output_dir << " ; " << strerror(i) << "\n"; | ^ src/analysis.cpp:50:13: warning: no header providing "exit" is directly included [misc-include-cleaner] 1 | exit(-1); | ^ src/analysis.cpp:60:14: warning: no header providing "std::cout" is directly included [misc-include-cleaner] 60 | std::cout << "ERROR: cannot open file for output (parameters)\n"; | ^ src/analysis.cpp:94:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 94 | return; | ^~~~~~~ 95 | } src/analysis.cpp:104:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 104 | return; | ^~~~~~~ 105 | } src/analysis.cpp:107:34: warning: redundant void argument list in function definition [modernize-redundant-void-arg] 107 | void System::perform_measurement(void) | ^~~~ src/analysis.cpp:113:39: warning: no header providing "MAX_HISTORY_SIZE" is directly included [misc-include-cleaner] 2 | if (measurement_history.size() == MAX_HISTORY_SIZE) | ^ src/analysis.cpp:115:36: warning: no header providing "MIN_HISTORY_SIZE" is directly included [misc-include-cleaner] 115 | write_measurements_to_file(MIN_HISTORY_SIZE - 1); | ^ src/analysis.cpp:130:18: warning: variable 'mt' is not initialized [cppcoreguidelines-init-variables] 130 | Microtubule* mt; | ^ | = nullptr src/analysis.cpp:152:9: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion] 152 | if (m.number_of_m_ts) | ^ | != 0 src/analysis.cpp:205:36: warning: no header providing "std::setprecision" is directly included [misc-include-cleaner] 2 | std::cout << "[t=" << std::setprecision(9) << m.time << std::setprecision(6) << "\t\t" << m.trajectories | ^ src/analysis.cpp:216:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 216 | return; | ^~~~~~~ 217 | } src/analysis.cpp:221:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration] 221 | int i, i_max; | ^~~~~~~~~~~~~ src/analysis.cpp:221:9: warning: variable 'i' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 221 | int i, i_max; | ^ src/analysis.cpp:221:12: warning: variable 'i_max' is not initialized [cppcoreguidelines-init-variables] note: this fix will not be applied because it overlaps with another fix 221 | int i, i_max; | ^ src/analysis.cpp:223:13: warning: narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions] 223 | i_max = measurement_history.size() - number_to_keep; | ^ src/analysis.cpp:232:5: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] 232 | return; | ^~~~~~~ 233 | } 34905 warnings generated. Suppressed 34697 warnings (34697 in non-user code). Use -header-filter=.* or leave it as default to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. Thu Dec 3 12:23:44 UTC 2026 git-sha: c196c16fd29fd3e9807b84c2e80b6970e3d0ecae