Lint updates for the 2020.3 versions of PyCharm/CLion

This commit is contained in:
Eric Froemling 2020-12-11 11:37:14 -06:00
parent 3953c98cc2
commit 29eefd6b10
25 changed files with 92 additions and 88 deletions

View File

@ -3932,32 +3932,32 @@
"assets/build/windows/Win32/ucrtbased.dll": "https://files.ballistica.net/cache/ba1/b5/85/f8b6d0558ddb87267f34254b1450",
"assets/build/windows/Win32/vc_redist.x86.exe": "https://files.ballistica.net/cache/ba1/1c/e1/4a1a2eddda2f4aebd5f8b64ab08e",
"assets/build/windows/Win32/vcruntime140d.dll": "https://files.ballistica.net/cache/ba1/50/8d/bc2600ac9491f1b14d659709451f",
"build/prefab/full/linux_x86_64/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/9f/39/899e7b09787e2d30cdb996dc0810",
"build/prefab/full/linux_x86_64/release/ballisticacore": "https://files.ballistica.net/cache/ba1/58/91/b69eac3a1af4fb80bb314215ba9f",
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ba/ed/2c76bd29944f4a4b97ec95c6caca",
"build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ee/fc/655567f17f4c55102390ccaee221",
"build/prefab/full/mac_arm64/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/11/20/5f4861a3747db4d8d6130287b865",
"build/prefab/full/mac_arm64/release/ballisticacore": "https://files.ballistica.net/cache/ba1/a6/65/d587bd1356dd0ba5f38503ad542f",
"build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a0/2a/db7a9c805e703cc7a5c305f33840",
"build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/51/a2/97d4a11351b648f1c7a0d4ccffdc",
"build/prefab/full/mac_x86_64/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/84/b2/0cdac010a6d0ab618336d84364ce",
"build/prefab/full/mac_x86_64/release/ballisticacore": "https://files.ballistica.net/cache/ba1/dd/f5/b2a13f5965bed385184961c2b354",
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ce/ac/eee81b5add93a6a6657a3721a3f3",
"build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/44/4a/a2d432631e58a7d2a35b03fe3a3c",
"build/prefab/full/windows_x86/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/e0/66/e20e5da1830803a5459e7b6da9be",
"build/prefab/full/windows_x86/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/60/ce/6f4e5d533366a7af8b319e58c2c0",
"build/prefab/full/windows_x86_server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/39/cd/e7d89b94ace25e654740ba17bed3",
"build/prefab/full/windows_x86_server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/f5/a7/daaa05b5d4195863262a1a682466",
"build/prefab/lib/linux_x86_64/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ea/ac/76dc570fa7a553e07f8edded0693",
"build/prefab/full/linux_x86_64/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c3/37/024056b52b1ab36a0481ead1e718",
"build/prefab/full/linux_x86_64/release/ballisticacore": "https://files.ballistica.net/cache/ba1/c4/5c/a572440cbca95bf0ffbe503d1602",
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1a/3c/5cf31bcc82f352651fd4383add39",
"build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/6d/ae/e5e6a2312028ef69df1d818147ad",
"build/prefab/full/mac_arm64/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/79/cf/3807b756d7251fa122ddc31de002",
"build/prefab/full/mac_arm64/release/ballisticacore": "https://files.ballistica.net/cache/ba1/17/72/6f0f34c727c13cb9d475ab888529",
"build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/26/1e/72bcebdcae9c7de45d688a739e5c",
"build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ea/7d/c743cc744396a5055fea05403dec",
"build/prefab/full/mac_x86_64/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/52/5e/fbc997f6fe12cd3ff6718d363685",
"build/prefab/full/mac_x86_64/release/ballisticacore": "https://files.ballistica.net/cache/ba1/93/7e/901930970d61a20a8e81c6adb77f",
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d5/1f/c87b3bd438c3bfc7eed8c3fdd830",
"build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/5f/fd/87486914c7a6a3b3de863e723bd8",
"build/prefab/full/windows_x86/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/df/ff/77316ad5ed576772c7e54d569571",
"build/prefab/full/windows_x86/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/33/0a/9c65fd6874b1fd824d1a7d994c33",
"build/prefab/full/windows_x86_server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/9f/f6/f7d7c08489ee52bc1f000a0de294",
"build/prefab/full/windows_x86_server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/1a/c2/8431f62aa377d0ba6d6833013712",
"build/prefab/lib/linux_x86_64/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d3/51/8ddfd77cd98e30b27fbeb11cfbe7",
"build/prefab/lib/linux_x86_64/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/83/25/980050d75bbea49a84652209050c",
"build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/be/82/432710f28c27ebb30a15c6f3692d",
"build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/81/a4/e2b3ac8eec73286f93fa0409bf88",
"build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2b/45/7f9fbae208890455fce2fbc172d3",
"build/prefab/lib/mac_arm64/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/60/49/f01b296fd59f4a15fa16be39830c",
"build/prefab/lib/mac_arm64/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/34/70/2a89f2e8130ee4bcc649ffb9fc1d",
"build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0e/f7/ff76fe963d96eb342543a5ffb0dc",
"build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/8e/f1/1d3cd8f97a496faf5a619cc46149",
"build/prefab/lib/mac_x86_64/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d7/c9/b5ae4d4189133b024e7b15e74ff4",
"build/prefab/lib/mac_x86_64/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/00/4c/2480cfe8037055af072c2c9fa1b2",
"build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/8f/30/7f0aedb2ec9b64db1566ade2fc2f",
"build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ad/69/4203464dc0b509ef11967ca90612"
"build/prefab/lib/mac_arm64/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b4/2c/414ac6c258e69fba7c0cf899ae8a",
"build/prefab/lib/mac_arm64/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/15/3f/23aff5bb8dd628345ade5d69c9bb",
"build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/71/e3/50e4404d25e65b84584ac1fa94cb",
"build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ff/0a/b1deb9ecc9a42c3867948a967ef1",
"build/prefab/lib/mac_x86_64/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/dc/d5/3d4e86d7221f9f32b65da512fb71",
"build/prefab/lib/mac_x86_64/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3f/7c/78754b4d3e3cd271b2815bf6c8ae",
"build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/00/5d/853823b9b4ce4511599134ffd939",
"build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ab/2a/dbe6306405e14ecf6325decceaec"
}

View File

@ -68,6 +68,7 @@
<w>anota</w>
<w>anroid</w>
<w>antigravity</w>
<w>anyofallof</w>
<w>apichanges</w>
<w>apis</w>
<w>apks</w>
@ -429,6 +430,7 @@
<w>cryptmodule</w>
<w>cspbd</w>
<w>cspnf</w>
<w>cspre</w>
<w>cssclass</w>
<w>cstr</w>
<w>csum</w>

View File

@ -2,6 +2,7 @@
<profile version="1.0">
<option name="myName" value="Default" />
<inspection_tool class="DuplicatedCode" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="GrazieInspection" enabled="false" level="TYPO" enabled_by_default="false" />
<inspection_tool class="InconsistentLineSeparators" enabled="true" level="WARNING" enabled_by_default="true">
<scope name="NonPython" level="WARNING" enabled="false" />
</inspection_tool>

View File

@ -13,8 +13,8 @@
<w>ack'ed</w>
<w>acked</w>
<w>acks</w>
<w>aclass's</w>
<w>aclass</w>
<w>aclass's</w>
<w>activityplayer</w>
<w>addrs</w>
<w>adjoint</w>
@ -38,6 +38,7 @@
<w>alsoft</w>
<w>animcurve</w>
<w>aniso</w>
<w>anyofallof</w>
<w>apientry</w>
<w>appconfig</w>
<w>appname</w>
@ -150,8 +151,8 @@
<w>cmath</w>
<w>cmds</w>
<w>cmdvals</w>
<w>codewarrior's</w>
<w>codewarrior</w>
<w>codewarrior's</w>
<w>cofnodes</w>
<w>collapseable</w>
<w>collidable</w>
@ -176,6 +177,7 @@
<w>crvel</w>
<w>csize</w>
<w>cspr</w>
<w>cspre</w>
<w>cstdint</w>
<w>cstdlib</w>
<w>cstring</w>

View File

@ -4,10 +4,9 @@
<inspection_tool class="ArrayIssues" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CannotResolve" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="ClangTidy" enabled="true" level="WARNING" enabled_by_default="true">
<option name="clangTidyChecks" value="*,-android-*,-bugprone-bool-pointer-implicit-conversion,-bugprone-exception-escape,-bugprone-signed-char-misuse,-cert-dcl50-cpp,-cert-env33-c,-cert-mem57-cpp,-cert-oop57-cpp,-cert-oop58-cpp,-clang-analyzer-*,-clang-diagnostic-*,-cppcoreguidelines-avoid-goto,-cppcoreguidelines-init-variables,-cppcoreguidelines-macro-usage,-cppcoreguidelines-no-malloc,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-cstyle-cast,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-union-access,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-special-member-functions,-darwin-*,-fuchsia-*,-google-*,-hicpp-avoid-goto,-hicpp-no-assembler,-linuxkernel-*,-llvm-*,-llvmlibc-*,-misc-bool-pointer-implicit-conversion,-misc-definitions-in-headers,-misc-non-private-member-variables-in-classes,-misc-unused-alias-decls,-misc-unused-parameters,-misc-unused-using-decls,-modernize-avoid-c-arrays,-modernize-use-default-member-init,-modernize-use-trailing-return-type,-modernize-use-using,-objc-*,-openmp-exception-escape,-readability-braces-around-statements,-readability-else-after-return,-readability-function-size,-readability-identifier-naming,-readability-implicit-bool-conversion,-readability-isolate-declaration,-readability-magic-numbers,-readability-named-parameter,-readability-qualified-auto,-readability-redundant-access-specifiers,-readability-redundant-member-init,-readability-redundant-preprocessor,-readability-simplify-boolean-expr,-readability-uppercase-literal-suffix,-zircon-*,-cert-dcl03-c,-cert-dcl16-c,-cert-dcl37-c,-cert-dcl51-cpp,-cert-dcl54-cpp,-cert-dcl59-cpp,-cert-err09-cpp,-cert-err61-cpp,-cert-fio38-c,-cert-msc30-c,-cert-msc32-c,-cert-oop11-cpp,-cert-oop54-cpp,-cert-pos44-c,-cppcoreguidelines-avoid-c-arrays,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-c-copy-assignment-signature,-cppcoreguidelines-explicit-virtual-functions,-cppcoreguidelines-non-private-member-variables-in-classes,-fuchsia-header-anon-namespaces,-google-readability-braces-around-statements,-google-readability-function-size,-google-readability-namespace-comments,-hicpp-avoid-c-arrays,-hicpp-braces-around-statements,-hicpp-deprecated-headers,-hicpp-explicit-conversions,-hicpp-function-size,-hicpp-invalid-access-moved,-hicpp-member-init,-hicpp-move-const-arg,-hicpp-named-parameter,-hicpp-new-delete-operators,-hicpp-no-array-decay,-hicpp-no-malloc,-hicpp-noexcept-move,-hicpp-special-member-functions,-hicpp-static-assert,-hicpp-undelegated-constructor,-hicpp-uppercase-literal-suffix,-hicpp-use-auto,-hicpp-use-emplace,-hicpp-use-equals-default,-hicpp-use-equals-delete,-hicpp-use-noexcept,-hicpp-use-nullptr,-hicpp-use-override,-hicpp-vararg,google-default-arguments,google-explicit-constructor,google-runtime-operator,-readability-convert-member-functions-to-static,-bugprone-reserved-identifier,-cppcoreguidelines-pro-type-static-cast-downcast,-readability-make-member-function-const,-cert-err58-cpp,-bugprone-lambda-function-name,-modernize-use-nodiscard,-llvmlibc-callee-namespace,-readability-use-anyofallof,-cppcoreguidelines-avoid-non-const-global-variables " />
<option name="clangTidyChecks" value="-*,bugprone-argument-comment,bugprone-assert-side-effect,bugprone-bad-signal-to-kill-thread,bugprone-branch-clone,bugprone-copy-constructor-init,bugprone-dangling-handle,bugprone-dynamic-static-initializers,bugprone-fold-init-type,bugprone-forward-declaration-namespace,bugprone-forwarding-reference-overload,bugprone-inaccurate-erase,bugprone-incorrect-roundings,bugprone-integer-division,bugprone-lambda-function-name,bugprone-macro-parentheses,bugprone-macro-repeated-side-effects,bugprone-misplaced-operator-in-strlen-in-alloc,bugprone-misplaced-pointer-arithmetic-in-alloc,bugprone-misplaced-widening-cast,bugprone-move-forwarding-reference,bugprone-multiple-statement-macro,bugprone-no-escape,bugprone-not-null-terminated-result,bugprone-parent-virtual-call,bugprone-posix-return,bugprone-sizeof-container,bugprone-sizeof-expression,bugprone-spuriously-wake-up-functions,bugprone-string-constructor,bugprone-string-integer-assignment,bugprone-string-literal-with-embedded-nul,bugprone-suspicious-enum-usage,bugprone-suspicious-include,bugprone-suspicious-memset-usage,bugprone-suspicious-missing-comma,bugprone-suspicious-semicolon,bugprone-suspicious-string-compare,bugprone-swapped-arguments,bugprone-terminating-continue,bugprone-throw-keyword-missing,bugprone-too-small-loop-variable,bugprone-undefined-memory-manipulation,bugprone-undelegated-constructor,bugprone-unhandled-self-assignment,bugprone-unused-raii,bugprone-unused-return-value,bugprone-use-after-move,bugprone-virtual-near-miss,cert-dcl21-cpp,cert-dcl58-cpp,cert-err34-c,cert-err52-cpp,cert-err58-cpp,cert-err60-cpp,cert-flp30-c,cert-msc50-cpp,cert-msc51-cpp,cppcoreguidelines-interfaces-global-init,cppcoreguidelines-narrowing-conversions,cppcoreguidelines-pro-type-member-init,cppcoreguidelines-slicing,google-default-arguments,google-explicit-constructor,google-runtime-operator,hicpp-exception-baseclass,hicpp-multiway-paths-covered,misc-misplaced-const,misc-new-delete-overloads,misc-no-recursion,misc-non-copyable-objects,misc-throw-by-value-catch-by-reference,misc-unconventional-assign-operator,misc-uniqueptr-reset-release,modernize-avoid-bind,modernize-concat-nested-namespaces,modernize-deprecated-headers,modernize-deprecated-ios-base-aliases,modernize-loop-convert,modernize-make-shared,modernize-make-unique,modernize-pass-by-value,modernize-raw-string-literal,modernize-redundant-void-arg,modernize-replace-auto-ptr,modernize-replace-disallow-copy-and-assign-macro,modernize-replace-random-shuffle,modernize-return-braced-init-list,modernize-shrink-to-fit,modernize-unary-static-assert,modernize-use-auto,modernize-use-bool-literals,modernize-use-emplace,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-noexcept,modernize-use-nullptr,modernize-use-override,modernize-use-transparent-functors,modernize-use-uncaught-exceptions,mpi-buffer-deref,mpi-type-mismatch,openmp-use-default-none,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-noexcept-move-constructor,performance-trivially-destructible,performance-type-promotion-in-math-fn,performance-unnecessary-copy-initialization,performance-unnecessary-value-param,portability-simd-intrinsics,readability-avoid-const-params-in-decls,readability-const-return-type,readability-container-size-empty,readability-delete-null-pointer,readability-deleted-default,readability-inconsistent-declaration-parameter-name,readability-misleading-indentation,readability-misplaced-array-index,readability-non-const-parameter,readability-redundant-control-flow,readability-redundant-declaration,readability-redundant-function-ptr-dereference,readability-redundant-smartptr-get,readability-redundant-string-cstr,readability-redundant-string-init,readability-simplify-subscript-expr,readability-static-accessed-through-instance,readability-static-definition-in-anonymous-namespace,readability-string-compare,readability-uniqueptr-delete-release,readability-use-anyofallof,-misc-no-recursion" />
</inspection_tool>
<inspection_tool class="ConstructionIsNotAllowed" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="DanglingPointers" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="DuplicateSwitchCase" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="ImplicitPointerAndIntegerConversion" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="IncompatibleTypes" enabled="false" level="WARNING" enabled_by_default="false" />
@ -17,6 +16,7 @@
<inspection_tool class="MemberFunctionCanBeStatic" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="MemberVisibility" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="NotAssignable" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="NotImplementedFunctions" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="NotSuperclass" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="OCDFA" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="OCLoopDoesntUseConditionVariable" enabled="false" level="WARNING" enabled_by_default="false" />
@ -24,6 +24,7 @@
<inspection_tool class="OCUnusedIncludeDirective" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="OCUnusedMacro" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="OCUnusedStruct" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="OCUnusedTemplateParameter" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="OtherCpp" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="OtherObjC" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="PointerTypeRequired" enabled="false" level="ERROR" enabled_by_default="false" />
@ -58,5 +59,6 @@
<inspection_tool class="UnusedMacro" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="UnusedParameter" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="UnusedStruct" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="UnusedValue" enabled="false" level="WARNING" enabled_by_default="false" />
</profile>
</component>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/ballisticacore-cmake.iml" filepath="$PROJECT_DIR$/.idea/ballisticacore-cmake.iml" />
</modules>
</component>
</project>

View File

@ -1,5 +1,5 @@
<!-- THIS FILE IS AUTO GENERATED; DO NOT EDIT BY HAND -->
<h4><em>last updated on 2020-12-07 for Ballistica version 1.5.29 build 20258</em></h4>
<h4><em>last updated on 2020-12-10 for Ballistica version 1.5.29 build 20258</em></h4>
<p>This page documents the Python classes and functions in the 'ba' module,
which are the ones most relevant to modding in Ballistica. If you come across something you feel should be included here or could be better explained, please <a href="mailto:support@froemling.net">let me know</a>. Happy modding!</p>
<hr>

View File

@ -21,7 +21,7 @@
namespace ballistica {
// These are set automatically via script; don't change here.
const int kAppBuildNumber = 20258;
const int kAppBuildNumber = 20259;
const char* kAppVersion = "1.5.29";
// Our standalone globals.

View File

@ -16,10 +16,9 @@ BGDynamicsHeightCache::BGDynamicsHeightCache()
y_min_(-1.0f),
y_max_(1.0f),
z_min_(-1.0f),
z_max_(1.0f) {
grid_width_ = 1;
grid_height_ = 1;
}
z_max_(1.0f),
grid_width_(1),
grid_height_(1) {}
BGDynamicsHeightCache::~BGDynamicsHeightCache() {
if (shadow_ray_) {

View File

@ -109,12 +109,8 @@ class BGDynamicsServer::Terrain {
class BGDynamicsServer::Field {
public:
Field(BGDynamicsServer* t, const Vector3f& pos, float mag) : pos_(pos) {
rad_ = 5;
mag_ = mag;
birth_time_ = t->time();
lifespan_ = 500;
}
Field(BGDynamicsServer* t, const Vector3f& pos, float mag)
: pos_(pos), rad_(5), mag_(mag), birth_time_(t->time()), lifespan_(500) {}
~Field() = default;
auto rad() const -> dReal { return rad_; }
@ -231,24 +227,25 @@ class BGDynamicsServer::Tendril {
};
explicit Tendril(BGDynamicsServer* t)
: has_updated_(false), controller_(nullptr), emitting_(true) {
emit_rate_ = 0.8f + 0.4f * RandomFloat();
birth_time_ = t->time();
radius_ = 0.1f + RandomFloat() * 0.1f;
tex_coord_ = RandomFloat();
start_erode_ = 0.1f;
start_spread_ = 4.0f;
side_spread_rate_ = 1.0f;
point_rand_scale_ = 1.0f;
slice_rand_scale_ = 1.0f;
tex_change_rate_ = 1.0f;
emit_rate_falloff_rate_ = 1.0f;
start_brightness_max_ = 0.9f;
start_brightness_min_ = 0.3f;
brightness_rand_ = 0.5f;
start_fade_scale_ = 1.0f;
glow_scale_ = 1.0f;
}
: has_updated_{false},
controller_{nullptr},
emitting_{true},
emit_rate_{0.8f + 0.4f * RandomFloat()},
birth_time_{t->time()},
radius_{0.1f + RandomFloat() * 0.1f},
tex_coord_{RandomFloat()},
start_erode_{0.1f},
start_spread_{4.0f},
side_spread_rate_{1.0f},
point_rand_scale_{1.0f},
slice_rand_scale_{1.0f},
tex_change_rate_{1.0f},
emit_rate_falloff_rate_{1.0f},
start_brightness_max_{0.9f},
start_brightness_min_{0.3f},
brightness_rand_{0.5f},
start_fade_scale_{1.0f},
glow_scale_{1.0f} {}
void SetController(TendrilController* tc) {
assert((controller_ == nullptr) ^ (tc == nullptr));
controller_ = tc;
@ -360,8 +357,7 @@ class BGDynamicsServer::Tendril {
class BGDynamicsServer::TendrilController {
public:
explicit TendrilController(Tendril* t) {
tendril_ = t;
explicit TendrilController(Tendril* t) : tendril_{t} {
tendril_->SetController(this);
}
~TendrilController() {
@ -392,11 +388,12 @@ class BGDynamicsServer::Chunk {
type_(event.chunk_type),
dynamic_(dynamic),
can_die_(can_die),
tendril_controller_(nullptr) {
birth_time_ = t->time();
flicker_ = 1.0f;
flicker_scale_ = RandomFloat();
flicker_scale_ = 1.0f - (flicker_scale_ * flicker_scale_);
tendril_controller_(nullptr),
birth_time_{t->time()},
flicker_{1.0f},
flicker_scale_{1.0f} {
flicker_scale_ = RandomFloat(); // NOLINT
flicker_scale_ = 1.0f - (flicker_scale_ * flicker_scale_); // NOLINT
if (type_ != BGDynamicsChunkType::kFlagStand) {
if (type_ == BGDynamicsChunkType::kSplinter) {
size_[0] = event.scale * 0.15f * (0.4f + 0.6f * RandomFloat());
@ -675,6 +672,7 @@ BGDynamicsServer::BGDynamicsServer(Thread* thread)
BA_PRECONDITION(g_bg_dynamics_server == nullptr);
g_bg_dynamics_server = this;
// NOLINTNEXTLINE(cppcoreguidelines-prefer-member-initializer)
ode_world_ = dWorldCreate();
assert(ode_world_);
dWorldSetGravity(ode_world_, 0.0f, -20.0f, 0.0f);

View File

@ -12,7 +12,7 @@
namespace ballistica {
CollisionCache::CollisionCache() { test_box_ = dCreateBox(nullptr, 1, 1, 1); }
CollisionCache::CollisionCache() : test_box_{dCreateBox(nullptr, 1, 1, 1)} {}
CollisionCache::~CollisionCache() {
if (shadow_ray_) {

View File

@ -351,6 +351,7 @@ auto RigidBody::AddCallback(CollideCallbackFunc callbackIn, void* data_in)
auto RigidBody::CallCollideCallbacks(dContact* contacts, int count,
RigidBody* opposingbody) -> bool {
// NOLINTNEXTLINE(readability-use-anyofallof)
for (auto&& i : collide_callbacks_) {
if (!i.callback(contacts, count, this, opposingbody, i.data)) {
return false;

View File

@ -1935,6 +1935,7 @@ auto Game::IsPlayerBanned(const PlayerSpec& spec) -> bool {
&& banned_players_.front().first < current_time) {
banned_players_.pop_front();
}
// NOLINTNEXTLINE(readability-use-anyofallof)
for (auto&& test_spec : banned_players_) {
if (test_spec.second == spec) {
return true;

View File

@ -328,6 +328,7 @@ class Utils {
/// Return whether a sequence of some type pointer has nullptr members.
template <typename T>
static auto HasNullMembers(const T& sequence) -> bool {
// NOLINTNEXTLINE(readability-use-anyofallof)
for (auto&& i : sequence) {
if (i == nullptr) {
return true;

View File

@ -941,6 +941,7 @@ void TextGraphics::GetFontPagesForText(const std::string& text,
auto TextGraphics::HaveBigChars(const std::string& text) -> bool {
std::vector<uint32_t> unicode = Utils::UnicodeFromUTF8(text, "fnc93rh");
// NOLINTNEXTLINE(readability-use-anyofallof)
for (unsigned int val : unicode) {
if (GetBigGlyphIndex(val) == -1) {
// Don't count misses for newlines, spaces, etc.
@ -961,6 +962,7 @@ auto TextGraphics::HaveChars(const std::string& text) -> bool {
return true;
} else {
std::vector<uint32_t> unicode = Utils::UnicodeFromUTF8(text, "c957fj");
// NOLINTNEXTLINE(readability-use-anyofallof)
for (auto&& val : unicode) {
// There's a few special chars we have.
if (val >= kGlyphCount && !IsSpecialChar(val)) {

View File

@ -740,6 +740,7 @@ auto Input::GetLocalActiveInputDeviceCount() -> int {
auto Input::HaveControllerWithPlayer() -> bool {
assert(InGameThread());
// NOLINTNEXTLINE(readability-use-anyofallof)
for (auto& input_device : input_devices_) {
if (input_device.exists() && (*input_device).IsController()
&& (*input_device).attached_to_player()) {
@ -751,6 +752,7 @@ auto Input::HaveControllerWithPlayer() -> bool {
auto Input::HaveRemoteAppController() -> bool {
assert(InGameThread());
// NOLINTNEXTLINE(readability-use-anyofallof)
for (auto& input_device : input_devices_) {
if (input_device.exists() && (*input_device).IsRemoteApp()) {
return true;

View File

@ -148,6 +148,7 @@ class Matrix44f {
}
};
// NOLINTNEXTLINE(cert-err58-cpp)
const Matrix44f kMatrix44fIdentity{1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f,
0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f};

View File

@ -20,6 +20,7 @@ class Vector2f {
};
};
// NOLINTNEXTLINE(cert-err58-cpp)
const Vector2f kVector2f0{0.0f, 0.0f};
} // namespace ballistica

View File

@ -189,11 +189,11 @@ class Vector3f {
static auto Angle(const Vector3f& v1, const Vector3f& v2) -> float;
};
const Vector3f kVector3fX{1.0f, 0.0f, 0.0f};
const Vector3f kVector3fY{0.0f, 1.0f, 0.0f};
const Vector3f kVector3fZ{0.0f, 0.0f, 1.0f};
const Vector3f kVector3f0{0.0f, 0.0f, 0.0f};
const Vector3f kVector3f1{1.0f, 1.0f, 1.0f};
const Vector3f kVector3fX{1.0f, 0.0f, 0.0f}; // NOLINT(cert-err58-cpp)
const Vector3f kVector3fY{0.0f, 1.0f, 0.0f}; // NOLINT(cert-err58-cpp)
const Vector3f kVector3fZ{0.0f, 0.0f, 1.0f}; // NOLINT(cert-err58-cpp)
const Vector3f kVector3f0{0.0f, 0.0f, 0.0f}; // NOLINT(cert-err58-cpp)
const Vector3f kVector3f1{1.0f, 1.0f, 1.0f}; // NOLINT(cert-err58-cpp)
} // namespace ballistica

View File

@ -26,7 +26,7 @@ class Vector4f {
};
};
const Vector4f kVector4f0{0.0f, 0.0f, 0.0f, 0.0f};
const Vector4f kVector4f0{0.0f, 0.0f, 0.0f, 0.0f}; // NOLINT(cert-err58-cpp)
} // namespace ballistica

View File

@ -947,7 +947,7 @@ void Python::Reset(bool do_init) {
const char* ver = Py_GetVersion();
if (strncmp(ver, "3.8", 3)) {
if (strncmp(ver, "3.8", 3) != 0) {
throw Exception("We require Python 3.8.x; instead found "
+ std::string(ver));
}

View File

@ -50,7 +50,7 @@ UI::UI() {
g_app_globals->ui_scale = UIScale::kLarge;
} else {
// Use automatic val.
if (g_buildconfig.iircade_build()) {
if (g_buildconfig.iircade_build()) { // NOLINT(bugprone-branch-clone)
g_app_globals->ui_scale = UIScale::kMedium;
} else if (IsVRMode() || g_platform->IsRunningOnTV()) {
// VR and tv builds always use medium.

View File

@ -18,14 +18,13 @@
namespace ballistica {
ButtonWidget::ButtonWidget() {
ButtonWidget::ButtonWidget() : birth_time_{g_game->master_time()} {
text_ = Object::New<TextWidget>();
SetText("Button");
text_->set_valign(TextWidget::VAlign::kCenter);
text_->set_halign(TextWidget::HAlign::kCenter);
text_->SetWidth(0.0f);
text_->SetHeight(0.0f);
birth_time_ = g_game->master_time();
}
ButtonWidget::~ButtonWidget() = default;

View File

@ -31,7 +31,7 @@ void HScrollWidget::HandleRealTimerExpired(RealTimer<HScrollWidget>* t) {
if (!touch_is_scrolling_ && !touch_down_sent_) {
ContainerWidget::HandleMessage(
WidgetMessage(WidgetMessage::Type::kMouseDown, nullptr, touch_x_,
touch_y_, touch_held_click_count_));
touch_y_, static_cast<float>(touch_held_click_count_)));
touch_down_sent_ = true;
} else {
}

View File

@ -7,7 +7,7 @@
namespace ballistica {
ImageWidget::ImageWidget() { birth_time_ = g_game->master_time(); }
ImageWidget::ImageWidget() : birth_time_{g_game->master_time()} {}
ImageWidget::~ImageWidget() = default;