c0688de578
Merge branch 'typedvariant-fix'
2020-04-19 19:32:35 -04:00
Lioncash
c4e1d11f35
TypedVariant: Test
2020-04-19 00:54:18 -04:00
219211d9a7
CVarCommons: Fix variableDt cvar type
2020-04-18 06:08:48 -04:00
89a1cedba1
Move Editor cvars to CVarCommons
2020-04-14 15:20:00 -04:00
aba42eba52
Add variableDt cvar
2020-04-14 14:40:03 -04:00
Jack Andersen
6a8714c1f3
Update fmtlib
2020-04-11 12:48:11 -10:00
Jack Andersen
7ce829d134
Fix PyOutStream streambuf for MS STL
2020-04-10 18:58:06 -10:00
Jack Andersen
8fd6664984
Additional addon features for MP3
2020-04-09 17:19:33 -10:00
Lioncash
57fa706311
hecl: Allow Time instances to be constexpr
...
Some constructors accept primitive values. These can be made constexpr.
2020-04-05 09:35:31 -04:00
Lioncash
b5a26d5136
VertexBufferPool: Make Token move constructor and move assignment noexcept
...
Same behavior, but allows the type to be used nicely with containers and
move facilities that rely on std::move_if_noexcept.
2020-04-05 09:28:05 -04:00
Lioncash
caca49b3bd
UniformBufferPool: Make Token move constructor and move assignment noexcept
...
Allows the type to be used with containers and facilities that make use
of std::move_if_noexcept, etc.
2020-04-05 09:26:29 -04:00
Lioncash
c48303c2c2
Database: Add missing const qualifier
2020-04-05 09:21:58 -04:00
Lioncash
613b503cd6
FourCC: Remove constexpr from IStreamReader constructor
...
IStreamReader isn't constexpr, so this will result in a compilation
error if used.
2020-04-05 09:13:29 -04:00
Jack Andersen
e7f17d56c2
Add IStreamReader overloaded constructor to DNAFourCC
2020-03-28 18:10:55 -10:00
Lioncash
eebb25a39c
hecl/hecl: Allow CaseInsensitiveCompare to be used with heterogenous lookup
...
It's quite common to see maps or sets that make use of a string->object
association, usually as <std::string, T>. However, this can result in
inefficient code when performing lookups or indexing, as something like:
std::map<std::string, T> some_map;
...
auto iter = some_map.find("Name");
...
will result in a std::string instance being constructed around "Name",
which is less than ideal.
With a heterogenous comparator, however (such as std::less<>), like:
std::map<std::string, T, std::less<>>
we allow the container to do automatic type deduction and comparisons.
This allows types comparable to the key type to be used in find calls,
etc, without actually needing to construct the key type around the other
type.
The main way to enable containers to perform such behavior is by
defining a type named is_transparent within the comparator type.
2020-02-24 04:31:55 -05:00
Lioncash
a0e6ec0de7
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
12d6a5ce05
Console: Make isOpen() a const member function
...
This member function doesn't modify internal member state, so it can be
turned into a const qualified member function.
2019-10-21 01:49:23 -04:00
Lioncash
c8eab43489
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
5d2987588b
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
Jack Andersen
dfcad01c2f
Fix TypedVariant building with MSVC
2019-10-18 15:31:54 -10:00
Jack Andersen
72fabc9329
Minor blender exception detection bug fix
2019-10-12 18:54:07 -10:00
Jack Andersen
88e68e8aa3
Merge branch 'master' of ssh://git.axiodl.com:6431/AxioDL/hecl
2019-09-30 21:30:17 -10:00
Jack Andersen
8a73a8ee48
Code style improvements
2019-09-30 21:23:35 -10:00
Lioncash
9138ad691c
FourCC: Make rest of interface noexcept where applicable
...
Makes the interface consistent and allows their use within noexcept
contexts.
2019-09-30 03:13:08 -04:00
6b56f2e6a4
Minor fixes
2019-09-29 08:17:01 -07:00
7fd54effc9
Various fixes and improvements to CVars
2019-09-29 05:44:01 -07:00
Lioncash
72732a1ea7
TypedVariant: Be explicit about athena's Endian type
...
Allows this code to still compile if the Endian enum is ever changed
into an enum class.
2019-09-20 17:56:15 -04:00
Lioncash
8814ecbc4c
TypedVariant: Apply formatting to macros
...
Applies clang-format to the macros to prevent the changes from being
placed into the following change.
2019-09-20 17:52:28 -04:00
Lioncash
aaf5bae201
General: Be explicit about athena's Endian type
...
Allows this code to build if the enumeration is ever changed into a
strongly-typed enumeration.
2019-09-14 10:59:39 -04:00
Lioncash
9901653634
Backend: Make ExtensionSlot's constructor constexpr
...
These are used within a file-scope lookup table in urde. Without this,
technically those constructors are runtime static constructors.
This allows the compiler to initialize them at compile-time.
2019-09-11 01:52:26 -04:00
822227a1ca
Temporary xxhash fixes, update submodules
2019-09-06 23:30:53 -07:00
Lioncash
5e66bee28c
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
fbb5b86401
Compile fixes
2019-08-31 01:59:38 -07:00
Lioncash
4ca9a57540
hecl/hecl: Remove windows ifdef in CaseInsensitiveCompare
...
This is technically still usable for non-Windows systems, given there's
nothing directly Windows-specific about the operator overload
2019-08-25 21:22:44 -04:00
Lioncash
3dc10e7473
CVar: std::move listeners within addListener()
...
std::function is allowed to heap allocate in order to hold any necessary
captures, so we should be std::move-ing instances here in order to avoid
potentially performing reallocations.
2019-08-24 16:27:29 -04:00
52f9922820
Merge pull request #18 from lioncash/noexcept
...
hecl/hecl: noexcept correctness changes
2019-08-24 00:47:45 -07:00
Lioncash
7088235bc4
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
Lioncash
a7bd496698
hecl/hecl: Remove pointer casts from Hash constructor interface
...
The interface accepts const void* as the input type, so there's no need
to explicitly pointer cast the input data.
2019-08-24 02:55:09 -04:00
Lioncash
e127fed0fd
hecl/hecl: Mark Hash interface as noexcept
...
These are utilized within some hash implementations, which shouldn't
throw, so these member functions can be marked as noexcept.
2019-08-24 02:52:27 -04:00
Lioncash
09fe937bc3
hecl/hecl: Make hash_combine_impl noexcept
...
This is used to implement hashes, and since hash implementations
shouldn't throw, these shouldn't as well.
2019-08-24 02:46:47 -04:00
Lioncash
f957dd594b
hecl/hecl: Mark byte swapping functions as noexcept
...
These are frequently used within hash implementations, which should be
noexcept by default. Given it doesn't make sense to throw exceptions
from these functions anyways, they can be made noexcept.
2019-08-24 02:46:44 -04:00
e12e0057c3
Minor compile fixes
2019-08-23 16:58:15 -07:00
ff7e95546b
Merge pull request #16 from lioncash/string
...
hecl/Compilers: Amend minor string related code
2019-08-23 16:36:53 -07:00
Lioncash
11b3bf0889
Connection: Alphabetize friend class/struct declarations
2019-08-23 13:44:33 -04:00
Lioncash
6492117d60
Connection: Remove <iostream> include
...
Avoids injecting a static constructor into translation units including
this source file, even if nothing in the source file uses the iostream
facilities.
Instead, we can replace this with an ostream include. While we're at it,
we can make sure we include everything necessary within the source file.
2019-08-23 13:44:30 -04:00
Lioncash
877ca7ad87
Connection: Make use of std::array where applicable
...
Uses std::array in place of C arrays where not used as a buffer.
2019-08-23 12:44:55 -04:00
Lioncash
a3caa28483
Connection: Collapse definition of operator== for Vert
...
This can be collapsed down to a single tie comparison
2019-08-23 12:32:13 -04:00
Lioncash
3b60cee576
hecl/Compilers: Make name strings constexpr
...
Same behavior (as of C++17), without the need to duplicate the variable
name.
2019-08-23 11:42:12 -04:00
e691b95cbf
Merge pull request #15 from lioncash/file
...
hecl/hecl: Introduce FopenUnique
2019-08-21 23:16:25 -07:00
Lioncash
fb9e4df372
hecl: Make use of FopenUnique
...
Makes use of the introduced API function to eliminate the need to
explicit fclose FILE* instances.
2019-08-22 01:16:48 -04:00