Commit Graph

3892 Commits

Author SHA1 Message Date
Lioncash 60000c163b CElitePirate: Collapse indexing into back() calls where applicable
Same behavior, but more compact.
2020-04-02 00:24:24 -04:00
Lioncash 6e179bfa87 CElitePirate: Remove unnecessary reference qualifiers
Same behavior, but makes locations where copies occur much more
explicit.
2020-04-02 00:22:48 -04:00
Lioncash 6017e99aac CGrenadeLauncher: Remove stray reference qualifier on a copy operation
Same behavior, but more explicit about a copy needing to occur here.
2020-04-01 23:59:05 -04:00
Lioncash b95d84a570 CGrenadeLauncher: Resolve sign conversion warnings in constructor 2020-04-01 23:57:53 -04:00
Lioncash f10eb618bf CGrenadeLauncher: Remove reference qualifiers where unnecessary
While allowed by the standard, this obscures cases where actual copies
are occurring.
2020-04-01 23:56:07 -04:00
Lioncash e3775a8fca CRidley: qualify virtual function call in constructor
Signifies that we intentionally want to call this virtual function in
the constructor.
2020-04-01 23:09:11 -04:00
Lioncash 388e5f2e7f CRidley: Make use of std::make_unique where applicable 2020-04-01 23:08:08 -04:00
Luke Street de59ea45eb ScriptLoader: Zero out itemCounts 2020-04-01 21:17:05 -04:00
Luke Street a4a7888338
Merge pull request #287 from AxioDL/elitepirate
Elite Pirate implementation
2020-04-01 21:13:33 -04:00
Luke Street 62e58553c5 CBouncyGrenade/CGrenadeLauncher: Explicit constructor fixes 2020-04-01 15:32:38 -04:00
Luke Street 1e15e0d1f3 Merge remote-tracking branch 'origin/master' into elitepirate
# Conflicts:
#	Runtime/World/CPatterned.hpp
2020-04-01 15:02:56 -04:00
Luke Street 0c1f4fa738 CElitePirate/etc: Use prefix increment/decrement 2020-04-01 15:01:44 -04:00
Luke Street bb7699be46 CElitePirate/CShockWave: Renaming 2020-04-01 14:54:01 -04:00
Luke Street 162b232979 CElitePirate: Fix melee & contact damage 2020-04-01 03:39:05 -04:00
Luke Street d4ff239f91 CShockWave: Implement Touch 2020-04-01 02:41:31 -04:00
Luke Street 6e5c32abfd CBouncyGrenade: Pass bounding box to CPhysicsActor 2020-04-01 01:38:48 -04:00
Lioncash 233b2ccbbf CSegStatementSet: Make use of std::array
Same behavior, but without implicit array to pointer decay.
2020-04-01 00:36:50 -04:00
Lioncash c02d5a91b8 CSegStatementSet: Make x4_segData private
Accessors already exist to access the data individually, so we can just
use those instead.
2020-04-01 00:34:12 -04:00
Lioncash da75543c76 CRainSplashGenerator: Dehardcode line vector size in constructor
We can query the capacity instead.
2020-04-01 00:27:56 -04:00
Lioncash 254a96313a CSkinnedModel: Convert typedef into using alias
Same behavior, nicer to read.
2020-04-01 00:06:52 -04:00
Lioncash 7117e298d9 IVaryingAnimationTimeScale: Add virtual destructor
This is used in a polymorphic context, so we should be specifying a
virtual destructor to prevent undefined behavior when deleting instances
from the base class.
2020-03-31 23:55:15 -04:00
Luke Street deba91bfc0 CGrenadeLauncher: Fix rendering 2020-03-31 21:29:14 -04:00
Lioncash 4deb785fba CMakeLists: Enable several conformance flags on MSVC
Makes MSVC more standards compliant regarding various C++ constructs.
2020-03-31 21:26:59 -04:00
Lioncash 11c40415f5 TXTR: Mark constexpr functions static
Same behavior, but makes them internally linked.
2020-03-31 20:36:45 -04:00
Lioncash d3295cbb87 TXTR: Make use of const(typedefs) where applicable
Same behavior, but signifies read-only semantics.

Also resolves a few -Wcast-qual warnings.
2020-03-31 17:36:17 -04:00
Lioncash 8132375c69 TXTR: Eliminate variable shadowing 2020-03-31 17:02:55 -04:00
Lioncash d337327b97 DNACommon: Mark hash overloads as noexcept
These functions shouldn't throw at all.

By extension, also mark the UniqueID class interfaces as noexcept.
2020-03-31 16:55:19 -04:00
Luke Street ffd94d1106 COmegaPirate: Stub 2020-03-31 14:17:47 -04:00
Lioncash 96fa7af8b5 STRG: Convert file-scope std::vector to std::array
Eliminates a runtime-static constructor and heap allocation at program
start.
2020-03-31 14:15:09 -04:00
Lioncash 16c37abf79 DNAMP3: Prevent unnecessary copies 2020-03-31 13:24:34 -04:00
Lioncash 93f107cb79 STRG: Avoid unnecessary copies
Makes several functions significantly less copy intensive. See previous
commit for reason.
2020-03-31 13:23:21 -04:00
Lioncash 3d0270cf82 DNAMP2: Prevent unnecessary copies
Auto-deduces the exact type instead of using a similar, but slightly off
pair type (which causes a copy).
2020-03-31 13:19:50 -04:00
Lioncash d8ed1a5e79 RetroDataSpec: Convert typedefs to using aliases
Same behavior, but nicer to read.
2020-03-31 13:11:24 -04:00
Lioncash 9ef2fbba5a RetroDataSpec: Make use of make_unique where applicable
Same behavior, but without a mildly wonky way of performing it.
2020-03-31 13:06:27 -04:00
Lioncash 53694481e5 SpecMP2: Make use of emplace_back()'s return value
Same behavior, less code.
2020-03-31 12:46:20 -04:00
Lioncash e6f217bf25 SpecMP2: Prevent unnecessary copies in buildPaks()
Uses auto to properly deduce the intended return type in iteration (pair
with a const string), which prevents a copy from needing to be
generated.
2020-03-31 12:43:42 -04:00
Lioncash 97fd815afa SpecMP1: Make use of emplace_back() where applicable
Same behavior, but allows in-place construction.
2020-03-31 12:40:37 -04:00
Lioncash 9af90efb7d SpecMP1: Make use of emplace_back()'s return value
Same behavior, less code.
2020-03-31 12:38:31 -04:00
Lioncash 305262eb29 SpecMP1: Prevent unnecessary copies in buildPaks
Previously the type mismatched by a single const qualifier, which meant
a copy would have to occur.

Instead, we can use auto to avoid this issue from occurring and allowing
the proper type to be automatically deduced.
2020-03-31 12:36:18 -04:00
Lioncash ac28575e9d SpecMP3: Make use of emplace_back()'s return value
Same behavior, less code.
2020-03-31 12:33:51 -04:00
Lioncash be1d77f550 SpecMP3: Remove unnecessary initializer 2020-03-31 12:33:51 -04:00
Lioncash 94c4c0f102 SpecMP3: Prevent unnecessary copies
Prevents iterating over elements by value and also uses auto to ensure
the iterated item matches 1:1.
2020-03-31 12:32:57 -04:00
Lioncash 315becf1b5 ATBL: Collapse std::vector construction and resize into one another
Same behavior, less code.
2020-03-31 07:36:26 -04:00
Lioncash 3e084d2ae2 AROTBuilder: Convert defines into constexpr variables
Same behavior, but with concrete types.
2020-03-31 07:33:25 -04:00
Lioncash da4b1d5e7d AROTBuilder: Collapse manual loops into ranged for loops
Same behavior, minus the induction variable to follow
2020-03-31 07:31:04 -04:00
Lioncash 84141eeb25 AROTBuilder: Eliminate variable shadowing 2020-03-31 07:31:04 -04:00
Lioncash a2709f1d20 AROTBuilder: Make use of std::array where applicable
While we're at it, we can dehardcode some sizes.
2020-03-31 07:31:01 -04:00
Lioncash 47555c725b CAutoMapper: Eliminate usages of const_cast
Same behavior, but makes it explicit from the interface that
modifications are clearly going on from within the class.
2020-03-31 06:57:07 -04:00
Lioncash 12e42ba58a CMapWorld: Make use of std::array where applicable
Same behavior, stronger typing.
2020-03-31 06:18:58 -04:00
Lioncash 92833b185a CMapWorld: Move internally linked entities into an anonymous namespace
Same behavior, but prevents any potential ODR violations from occurring.
2020-03-31 06:16:07 -04:00