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
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
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
Lioncash
91f75a4c60
IAnimReader: Add missing override specifiers
2020-03-31 06:11:08 -04:00
Lioncash
2f0d774ed8
General: Make use of emplace_back where applicable
2020-03-31 05:33:10 -04:00
Lioncash
7b9018dbf0
CModelData: Initialize m_drawInstCount to zero
...
Allows for deterministic initial state to make debugging nicer.
2020-03-31 04:53:04 -04:00
Lioncash
1415265ef2
Runtime: Default destructors where applicable
...
Same behavior, but allows the destructors to be trivial, etc.
2020-03-31 04:50:26 -04:00
Phillip Stephens
d167293552
Merge pull request #291 from lioncash/name
...
IAnimReader: Make use of std::string_view where applicable
2020-03-31 01:20:20 -07:00
Phillip Stephens
7b0c043721
Merge pull request #288 from lioncash/explicit
...
Runtime: Add more usages of explicit
2020-03-31 01:19:40 -07:00
Lioncash
67f6666ea1
Runtime: Add more usages of explicit
...
Prevents error-prone implicit conversions where applicable.
This targets the regular RuntimeCommon target this time around.
2020-03-31 03:53:49 -04:00
Lioncash
2c36b0bb83
IAnimReader: Make use of std::string_view where applicable
...
Same behavior, but allows interoperating with different string types in
a more straightforward manner.
2020-03-31 03:13:02 -04:00
Luke Street
13ce419554
Merge pull request #290 from lioncash/call
...
CAnimTreeDoubleChild: Correct call to VGetBoolPOIState() in VGetInt32POIState()
2020-03-31 02:53:13 -04:00
Lioncash
aa8d147350
CAnimTreeDoubleChild: Correct call to VGetBoolPOIState() in VGetInt32POIState()
...
Like the previous change, it's awfully suspect to be interpreting all
integer values as bools.
2020-03-31 02:43:48 -04:00
Luke Street
5161bc2988
Merge pull request #289 from lioncash/call
...
CAnimTreeAnimReaderContainer: Correct call to VGetBoolPOIState() within VGetInt32POIState()
2020-03-31 02:20:01 -04:00
Lioncash
03c0a8a5f6
CAnimTreeAnimReaderContainer: Correct call to VGetBoolPOIState() within VGetInt32POIState()
...
It seems quite suspect to read all integral values as bools.
2020-03-31 02:06:56 -04:00
Lioncash
260dbaca7d
CAnimData: Rename IceModel() to GetIceModel()
...
Allows const overloading to work and prevents compilation errors from
occuring if the const qualifier on an instance changes over refactoring.
2020-03-31 01:26:00 -04:00
Lioncash
3e4731bf7f
CWallCrawlerSwarm: Minor tidying changes
...
- Amends formatting according to clang-format.
- Makes use of const where applicable
- More consistent bracing
2020-03-30 19:05:48 -04:00
Lioncash
e5a0959ef0
CWallCrawlerSwarm: Make use of size_t where applicable
...
Avoids unnecessary upper register clearing.
2020-03-30 19:05:48 -04:00
Lioncash
e1273faa68
CWallCrawlerSwarm: Eliminate some sign conversion warnings
...
Same behavior, less warnings.
2020-03-30 19:05:48 -04:00
Luke Street
cc8603fbec
Merge pull request #286 from lioncash/const-cast
...
CIOWin: Make Draw() non-const
2020-03-30 18:40:40 -04:00
Jack Andersen
76fc829c6b
Merge branch 'new-particle-metaclass'
2020-03-30 11:38:01 -10:00
Lioncash
7ff3d29794
CWallCrawlerSwarm: Mark static const data as constexpr
...
Same behavior, but allows elision of initializers. While we're at it, we
can convert an array over to std::array.
2020-03-30 05:44:35 -04:00
Lioncash
312b8f219a
CWorld: Dehardcode magic number in CheckWorldComplete()
...
Same behavior, no magic number.
2020-03-30 00:58:03 -04:00
Lioncash
802ac13812
CWorld: Make use of std::array where applicable
2020-03-30 00:54:38 -04:00
Lioncash
79b1e26052
IGameArea: Amend formatting of EChain
...
Makes for nicer visual scanning.
2020-03-30 00:47:29 -04:00
Lioncash
6ae935924b
IRenderer/CBooRenderer: Add parameter names to function prototypes
...
Makes the interface more self-documenting and allows IDEs to perform
better parameter introspection
2020-03-30 00:34:38 -04:00
Lioncash
111f0c3d3a
IRenderer: Convert typedef to using alias
...
Same behavior, but nicer to read.
2020-03-30 00:18:38 -04:00
Lioncash
6dce70895c
CIOWin: Make Draw() non-const
...
Allows removing several const_cast usages within the codebase.
2020-03-29 21:56:49 -04:00