Chris Robinson
6a9fe1e2c1
Rename lerp to avoid conflicts with C++20's std::lerp
2022-04-06 17:41:24 -07:00
Chris Robinson
abfb584f14
Simplify al::byte
...
It's just an alias for unsigned char now, and no longer strongly-typed like
std::byte.
2022-03-30 15:52:15 -07:00
Chris Robinson
a033f8c274
Add missing include
2022-03-30 01:44:09 -07:00
Chris Robinson
51796ccbed
Move assume_aligned to opthelpers.h and define force_inline
2022-03-30 01:33:32 -07:00
Chris Robinson
1410a8e03a
Slightly improve code flow for ASSUME
2022-03-29 22:13:34 -07:00
Glyn Leine
a752d920d1
constexpr functions are not allowed to have static variables, and if they are constexpr anyways then them being static has no benifit ( #677 )
2022-03-29 08:46:49 -07:00
Chris Robinson
b9ff9fa6d9
Avoid a variable to subscript an array in offsetof
2022-03-26 17:25:57 -07:00
Chris Robinson
6d0bd1a532
Simplify some move assignments
2022-03-25 16:36:46 -07:00
Chris Robinson
b80dc50495
Protect intrusive_ptr and ComPtr from moving to itself
2022-03-25 03:47:43 -07:00
Chris Robinson
1ee34556a6
Try to improve assume_aligned for other compilers
2022-03-25 00:13:06 -07:00
Chris Robinson
88d5c47e37
Simplify a couple offsetof statements
2022-03-24 16:12:23 -07:00
Chris Robinson
843a5aac6b
Forward the (un)likely expression being cast to bool
2022-02-24 06:43:14 -08:00
Chris Robinson
b1559227b0
Make some structs nested
2022-02-23 10:37:09 -08:00
Chris Robinson
2564a3750f
Remove unused atomic_invflag
2022-02-23 06:42:09 -08:00
Chris Robinson
625b0d380a
Use function overloading to handle pthread_setname_np differences
2022-02-23 05:56:29 -08:00
Chris Robinson
598c1aa224
Default initialize a union
...
To silence an errant GCC warning
2022-02-23 03:03:20 -08:00
Chris Robinson
cadf0d1de5
Make some local constexpr variables static
2022-02-23 01:29:28 -08:00
Chris Robinson
7176247529
Avoid an implicit char-to-bool conversion
2022-02-23 00:04:29 -08:00
Chris Robinson
d06ed618d3
Avoid using an if_constexpr macro
...
It doesn't actually use if constexpr, and compilers are smart enough to
optimize. Some functions can use templates instead.
2022-02-22 03:03:44 -08:00
Chris Robinson
72ddb6351e
Rename some variables to show the relevant bit pattern
2022-02-22 00:53:58 -08:00
Chris Robinson
6c643e59e9
Make a couple more operator bools explicit
2022-02-20 22:04:19 -08:00
Chris Robinson
0e26e0809d
Fix gain_to_level_mb
2022-02-20 00:02:56 -08:00
Chris Robinson
f9ed6f85c8
Don't implicitly convert optionals to bools
2022-02-14 03:05:35 -08:00
Chris Robinson
278792eae7
Remove an unnecessary template parameter hack
2022-02-14 01:01:19 -08:00
Chris Robinson
784929f36d
Inherit the atomic_flag constructors in atomic_invflag
2022-02-06 11:08:34 -08:00
Chris Robinson
816bd8ab30
Move ALSOFT_EAX definition to config.h
...
And disable it by default for non-Windows targets
2022-01-30 05:42:44 -08:00
Chris Robinson
c9d59ebc4a
Simplify FFT complex arg handling a bit
2022-01-30 04:55:13 -08:00
Boris I. Bendovsky
19ed994dc3
Add EAX extensions (EAX 2.0-5.0, X-RAM) ( #632 )
...
* Add EAX extensions (EAX 2.0-5.0, X-RAM)
* Comment out C++17 leftovers
* Remove everything related to patching
* Update alsoftrc.sample
* Rewrite integration
* Fix GCC compilation under Linux
* Always reset EAX effect properties when loading it into FX slot
2022-01-30 04:47:32 -08:00
Chris Robinson
619249371a
Remove math_defs.h
2022-01-27 04:04:41 -08:00
Chris Robinson
f8ac1ffe80
Get rid of MathDefs
2022-01-27 02:59:07 -08:00
Chris Robinson
1bbea9cd30
Start and use a standard-like numbers header
2022-01-27 01:38:39 -08:00
Chris Robinson
423888b816
Use precalculated lookup tables to swap FFT elements
...
Rather than going through the whole array, calculating the bit-reversed index
of each element, and not doing anything for more than half of them.
2022-01-27 00:39:36 -08:00
Chris Robinson
7ac336b078
Remove a couple unnecessary overloads
2022-01-04 19:27:29 -08:00
Chris Robinson
ad3095a03d
Avoid duplicate definitions of the same wrapper functions
2022-01-04 19:27:29 -08:00
Chris Robinson
ad9c2d77c8
Add a couple more methods to al::optional
2021-12-31 15:28:47 -08:00
Chris Robinson
a88803f21e
Simplify and combine a couple macros
2021-12-18 05:19:22 -08:00
Chris Robinson
bdc9d6955f
Workaround a GCC bug with noexcept(this->...)
2021-11-14 05:59:06 -08:00
Chris Robinson
ad3d82c3f4
Fix up some al::optional ops
2021-11-08 16:48:33 -08:00
Chris Robinson
c06abe2dfe
Make al::optional constexpr
2021-11-07 01:24:57 -08:00
Chris Robinson
837652624b
Remove an unnecessary noexcept
2021-10-23 08:14:30 -07:00
Chris Robinson
ed3e40c22d
Add more noexcept
2021-10-14 12:44:05 -07:00
Chris Robinson
8305973e7a
Properly noexcept the destroy methods
2021-10-14 12:44:05 -07:00
Chris Robinson
6a3c4c09f8
Explicitly declare optional_storage's default constructor
...
This should help MSVC
2021-10-10 05:12:24 -07:00
Chris Robinson
87e88e97e2
Try again to satisfy MSVC
2021-10-09 08:41:08 -07:00
Chris Robinson
85d98e32ed
Explicitly initialize the first union member
2021-10-09 05:56:39 -07:00
Chris Robinson
2d3b501fd8
Add more noexcept when possible
...
And try to fix MSVC missing a constructor
2021-10-09 05:30:16 -07:00
Chris Robinson
c893ca0491
Always define optional::operator=.
...
MSVC doesn't seem to like using enable_if for special member functions.
2021-10-09 03:39:33 -07:00
Chris Robinson
720bedb455
Make optional more trivial when possible
2021-10-08 18:08:48 -07:00
Chris Robinson
e3b8f8fe27
Make a construct_at method amd use it
2021-10-08 11:05:36 -07:00
Chris Robinson
8da4eaff29
Add the gnu::malloc attribute to al_malloc and al_calloc
...
This helps the compiler know the returned pointer won't alias another pointer
or existing object, since it's a fresh allocation, and is unlikely to return
nullptr.
2021-10-07 13:37:47 -07:00