34 Commits
Author SHA1 Message Date
Luke Street 604d32d7a2 Updates for fmtlib 7
Update submodules & tracking branches
2021-04-06 12:55:40 -04:00
Jack Andersen f64ed44fe8 Update fmtlib 2020-04-11 12:48:11 -10:00
Phillip Stephens db15125e59 Add missing brace (where the heck did it go?) 2019-10-24 22:49:41 -07:00
Phillip Stephens cf45015616 Minor string fix 2019-10-24 22:43:45 -07:00
Lioncash c00f41580e Console: Make State enum an enum class
Makes the enum strongly typed and impervious to implicit conversions.
2019-10-21 01:53:05 -04:00
Lioncash c22df5e8db Console: Make truncation explicit within proc()
Makes floating-point truncation explicit.
2019-10-21 01:40:34 -04:00
Lioncash 124a467556 Console: Use std::move within vreport()
Avoids redundant copies when emplacing into the log container.
2019-10-21 01:37:07 -04:00
Lioncash d1fc6224b7 Console: Make commandExists() a const qualified member function
This doesn't modify internal console state, so it can be turned into a
const qualified member function.
2019-10-21 01:30:19 -04:00
Lioncash c64c1a94eb Console: Eliminate redundant strlen call in commandExists()
By using the std::string_view constructor for std::string, we can avoid
the char* constructor, which would require a strlen call in order to
determine the string size. This also allows it to work with
non-null-terminated strings.
2019-10-21 01:28:22 -04:00
Lioncash 6b39b6289a Console: Avoid unnecessary copies and lookups within executeCommand()
We can make use of the result of a find() call to avoid performing two
redundant lookups into the command map and also use std::move to avoid
performing potentially reallocating copies.
2019-10-21 01:26:21 -04:00
Lioncash b785b15eea Console: Reuse iterator in unregisterCommand()
We can use the result of the first lookup to avoid doing another
redundant lookup to perform the erasure.

While we're at it, we can use std::string's std::string_view constructor
in order to avoid an unnecessary strlen() call.
2019-10-21 01:07:41 -04:00
Lioncash 9e2cf2a0e7 Console: Use emplace in registerCommand()
Allows avoiding a redundant initial element. We can also remove the
const from the std::function rvalue to allow a std::move to take effect.

We can also use the std::string_view constructor for std::string to
avoid an unnecessary strlen() call.
2019-10-21 01:03:30 -04:00
Lioncash 88e01413f5 Console: Convert std::bind to lambda functions
Same behavior, but more efficient than wrapping the function.
2019-10-21 00:53:15 -04:00
Phillip Stephens a8b2d5d64e Minor fixes 2019-09-29 08:17:01 -07:00
Phillip Stephens c430ed66b3 Various fixes and improvements to CVars 2019-09-29 05:44:01 -07:00
Lioncash ff920958a9 General: Include necessary includes
Ensures all necessary includes are included and also removes headers
that aren't necessary
2019-09-04 19:23:55 -04:00
Lioncash d0430a6842 hecl: Correct fmt formatting specifiers
These should be using {}-style formatting specifiers instead of printf
style. While we're at it, std::move the std::string instances where
applicable to potentially avoid reallocations.
2019-08-24 03:21:16 -04:00
Jack Andersen bd781e15bd Massive fmtlib refactor 2019-07-19 18:22:58 -10:00
Jack Andersen 05e4c65848 Add True and False tests for bitwise enums 2019-04-02 18:29:04 -10:00
Phillip Stephens 395cf73e46 Minor Console fixes 2018-12-09 21:12:10 -08:00
Jack Andersen 6013faad97 New code style refactor 2018-12-07 19:18:42 -10:00
Jack Andersen 4bbe520a32 Huge shader infrastructure refactor 2018-10-06 16:53:57 -10:00
Phillip Stephens 01d4e0621e Add support for string literals in Console::executeString, add implicit get/set for CVars 2018-06-12 19:03:29 -07:00
Phillip Stephens 5fc99fe58c Fix windows build 2018-05-01 17:41:51 -07:00
Phillip Stephens 71e620386d Add ability to flag commands 2018-04-29 20:11:37 -07:00