Commit Graph

1071 Commits

Author SHA1 Message Date
Lioncash 5d157e97b3 General: Use override where applicable 2019-08-21 18:20:07 -04:00
Phillip Stephens bcfea9a09a Merge pull request #10 from lioncash/cv
CVar: Remove redundant const return for toLiteral() and toWideLiteral()
2019-08-20 19:31:06 -07:00
Lioncash b9e5417a94 CVar: Remove redundant const return for toLiteral() and toWideLiteral()
This can actually inhibit copy elision
2019-08-20 10:15:14 -04:00
Phillip Stephens f9bda234fa Update submodules 2019-08-20 06:57:52 -07:00
Phillip Stephens 138ab07089 Merge pull request #9 from lioncash/cvar
CVarManager: Minor changes
2019-08-20 06:56:24 -07:00
Phillip Stephens 31e9ee50b9 Merge pull request #8 from lioncash/db
Database: Minor cleanup
2019-08-20 06:56:17 -07:00
Lioncash 645f20c308 CVarManager: Deduplicate repetitive names
We can just assign the repeated portion of the expression to a reference
instead of continually re-accessing the same variable, making it nicer
to read.
2019-08-20 06:29:17 -04:00
Lioncash cfced1bf0a CVarManager: Eliminate redundant map lookups
We can simply utilize the iterator of the previous existence check to
access the member instead of hashing through the map again.
2019-08-20 06:23:25 -04:00
Lioncash 4818198e41 CVarManager: Brace multi-line statements
Makes intentions explicit.
2019-08-20 06:10:23 -04:00
Lioncash a16327df68 CVarManager: Use std::any_of for restartRequired()
Same thing, but more concise.
2019-08-20 06:08:12 -04:00
Lioncash a1a18c6816 CVarManager: Use insert_or_assign where applicable
Avoids the need to create an initial entry in the map which is then
overwritten with the value being assigned to it.
2019-08-20 06:06:55 -04:00
Phillip Stephens 3795e0e72c Update boo 2019-08-20 01:08:25 -07:00
Phillip Stephens 6a78383d2a Update boo 2019-08-20 00:34:25 -07:00
Phillip Stephens 5659c46170 Merge pull request #7 from lioncash/override
driver: Minor general cleanup
2019-08-19 23:02:46 -07:00
Lioncash 9b735a853c Database: Silence -Wdocumentation warnings
Amends two Doxygen parameter references.
2019-08-19 23:22:03 -04:00
Lioncash 7635b9c6c1 Database: Remove unused includes
Quite a few includes aren't directly used anywhere within the header
itself. We can remove these to avoid unintentionally propagating them
into other source files.
2019-08-19 23:14:27 -04:00
Lioncash 263c0697bc Database: Use nullptr instead of NULL where applicable 2019-08-19 23:09:41 -04:00
Lioncash 66125c2b3b Database: Convert typedefs into using aliases 2019-08-19 23:08:35 -04:00
Lioncash 93ec114e0c Database: Use [[maybe_unused]] instead of (void)
Same behavior, but without the need to duplicate the variable name.
2019-08-19 23:06:57 -04:00
Lioncash 19f49e071d driver: Use nullptr instead of NULL where applicable
Same thing, but more typesafe, given all NULL is, is a literal 0.
2019-08-19 22:52:35 -04:00
Lioncash 789650d4c0 driver/ToolBase: Convert typedef into using alias
Same thing, but a little nicer to read.
2019-08-19 22:51:07 -04:00
Lioncash f746b30b03 driver: Make tool constructors explicit
Enforces being explicit when constructing instances of these types.
2019-08-19 22:49:27 -04:00
Lioncash 11364cbd53 driver/ToolBase: Make operator bool() explicit
Prevents error-prone conversions to bool.
2019-08-19 22:35:32 -04:00
Lioncash c390f3d489 driver: Add missing override specifiers where applicable
Adds missing override specifiers to enforce correct virtual member
function signatures.
2019-08-19 22:34:15 -04:00
Lioncash d3ac48715f driver/main: Use separate variables for error checking in main()
Avoids reusing the same variable for two different areas of behavior and
uses separately named variables. This can help debugging if the first
condition isn't true, but the tool run condition is true, as it provides
an error count to compare against.
2019-08-19 21:57:25 -04:00
Lioncash 7647fa3ca6 driver/main: Factor out argument handling to its own function
Factors out the ToolPassInfo construction to its own function keep the
code isolated from everything else. Also simplifies the assignment in
main().

We can also migrate the global cwdbuf into this function to narrow its
scope down.
2019-08-19 21:50:02 -04:00
Lioncash d76d776a0e driver/main: Factor out tool construction code to its own function
Isolates the tool construction code and also makes the assignment within
main more straightforward. While we're at it, we can also make use of
std::make_unique within the relocated function.
2019-08-19 21:38:23 -04:00
Lioncash fd61ba6cc7 driver/main: Factor out project finding code to its own function
Keeps the logic contained within its own function and makes the
assignment more straightforward within main().
2019-08-19 21:18:05 -04:00
Phillip Stephens 1fb18dbf26 Update boo 2019-08-18 18:49:27 -07:00
Phillip Stephens 269ca8a7ec Update boo 2019-08-17 22:59:38 -07:00
Phillip Stephens e4d66745f5 Update submodules 2019-08-16 18:38:25 -07:00
Phillip Stephens c411f6e784 Update athena 2019-08-15 16:08:31 -07:00
Phillip Stephens 5ae5edfc46 Update athena 2019-08-15 08:41:04 -07:00
Phillip Stephens fb529992ca Update athena 2019-08-15 07:52:37 -07:00
Phillip Stephens 401ef19682 Merge pull request #5 from lioncash/fcc
hecl/FourCC: Remove undefined behavior and make rest of interface constexpr where applicable
2019-08-15 07:47:29 -07:00
Phillip Stephens 23551de349 Merge pull request #3 from lioncash/str
hecl/hecl: Minor changes and improvements to string utilities
2019-08-15 07:47:17 -07:00
Lioncash 477645f15d hecl/FourCC: Amend clang-format discrepancies
These were formatting discrepancies that existed before all of the
previous changes. We may as well resolve them so that others don't run
into them.
2019-08-15 06:49:20 -04:00
Lioncash 64ac2e423e hecl/FourCC: Make use of constexpr constructors where applicable 2019-08-15 06:48:38 -04:00
Lioncash 9e7661eb7a hecl/FourCC: Make rest of FourCC interface constexpr where applicable
Finally, we can make the rest of the interface constexpr, except for
toString().
2019-08-15 06:48:38 -04:00
Lioncash 2f9010bc9f hecl/FourCC: Eliminate magic values in DNAFourCC 2019-08-15 06:48:38 -04:00
Lioncash 1382bbf365 hecl/FourCC: Implement operator!= in terms of operator==
Deduplicates the amount of written code. Now code only needs to ever
change in operator== to automatically reflect across the two functions.
2019-08-15 06:48:38 -04:00
Lioncash 06c436b68d hecl/FourCC: Eliminate undefined behavior within FourCC interface
Type punning like this isn't actually well-defined behavior. Only
casting to char/unsigned char is well defined. This presents a problem
when using FourCC instances in constexpr contexts, given constexpr
contexts are forbidden from having undefined behavior in them.

Because of that, any attempt to use the const char* constructor within a
constexpr context would always result in a compilation error.
2019-08-15 06:48:31 -04:00
Lioncash 0f74cce2ca hecl/FourCC: Tidy up constructors
Marks constructors as noexcept and explicitly defaults the copy
constructor/assignment and move constructor/assignment.
2019-08-15 05:28:11 -04:00
Lioncash 9ec19d99cd hecl/hecl: Make hash constructors explicit where applicable 2019-08-15 03:06:56 -04:00
Lioncash 06548409f8 hecl/hecl: Make Hash constexpr 2019-08-15 03:00:42 -04:00
Lioncash 216b038a7d hecl/SystemChar: Unify StrLen implementations and make constexpr
We can utilize std::char_traits to generically handle the defined
character type. Since C++17, std::char_traits' length() function is
constexpr, so we can also make StrLen constexpr.
2019-08-15 02:28:31 -04:00
Lioncash 58e0c7eaa7 hecl/SystemChar: Cast to unsigned char before calling tolower/toupper
Performed for the same reasons outlined within
b32f16b519eafacb9de4852855486270f73d5e2e (avoiding undefined behavior).
2019-08-15 02:28:31 -04:00
Lioncash b63d848846 hecl/hecl: Amend lingering formatting inconsistencies
Amends formatting issues that were pre-existing to get them out of the
way.
2019-08-15 02:28:09 -04:00
Lioncash 485782e3a7 hecl/hecl: Convert typedefs to using aliases
Same thing, but slightly nicer to read.
2019-08-15 02:26:12 -04:00
Lioncash eb872cdf88 hecl/hecl: Assign ResourceLock's good member in the initializer list
Same behavior, but more idiomatic. While we're at it, we can make said
constructor and the conversion operator explicit to make the class a
little less error-prone.
2019-08-15 02:26:12 -04:00