Morph
ef9b1765fa
externals: Update to fmt 10 and add format_as formatter for BitField
Implicit conversions are now disallowed in fmt 10. Use format_as to convert to the underlying type.
3 years ago
Morph
9fba74d245
general: Enforce C4800 everywhere except in video_core
3 years ago
Liam White
6df0663a57
General: Fix compilation for GCC
4 years ago
Fernando Sahmkow
3991518f74
NVDRV: Refactor and add new NvMap.
4 years ago
Liam
b7b77ea2ac
common: fix bitfield aliasing on GCC/Clang
4 years ago
Andrea Pappacoda
b2eb103829
chore: add missing SPDX tags
Follow-up to 2b87305d31
4 years ago
ameerj
e70b4f3fc5
common: Reduce unused includes
4 years ago
Lioncash
2ef7815422
common: Make use of [[nodiscard]] where applicable
Now that clang-format makes [[nodiscard]] attributes format sensibly, we
can apply them to several functions within the common library to allow
the compiler to complain about any misuses of the functions.
6 years ago
Lioncash
78ddcbe3ba
General: Tidy up clang-format warnings part 2
6 years ago
Lioncash
14874f0b67
General: Tidy up clang-format warnings
6 years ago
Markus Wick
ac24f0506c
Fix -Werror=conversion error.
6 years ago
Rodrigo Locatti
893648dbd0
Revert "common/bit_field: Silence sign-conversion warnings"
6 years ago
Lioncash
95ed7df791
common/bit_field: Silence sign-conversion warnings
We can just use numeric_limits instead of relying on wraparound behavior
here.
6 years ago
bunnei
fe02b9f968
common_func: Use std::array for INSERT_PADDING_* macros.
- Zero initialization here is useful for determinism.
6 years ago
Tobias
9b5cffaa36
common/bit_field: Remove FORCE_INLINE calls
See bunneis comment here https://github.com/citra-emu/citra/pull/4629#discussion_r258533167 .
They were supposed to be removed by him, but he missed them.
6 years ago
Lioncash
9d504a4f9b
common/bit_util: Fix bad merge duplicating the copy constructor
Introduced as a result of #2090 , we already define the copy constructor
further down below, so this isn't needed.
7 years ago
Lioncash
b20657a36f
common/bit_field: Make BitField trivially copyable
This makes the class much more flexible and doesn't make performing
copies with classes that contain a bitfield member a pain.
Given BitField instances are only intended to be used within unions, the
fact the full storage value would be copied isn't a big concern (only
sizeof(union_type) would be copied anyways).
While we're at it, provide defaulted move constructors for consistency.
7 years ago
fearlessTobi
8c9234f34c
Make bitfield assignment operator public
This change needs to be made to get the code compiling again. It was suggested after a conversation with Lioncash.
The conversation can be seen here: https://user-images.githubusercontent.com/20753089/45064197-b6107800-b0b2-11e8-9db8-f696299fb86a.PNG
8 years ago
Weiyi Wang
a2fa901591
common/bitfield: make it endianness-aware
7 years ago
Weiyi Wang
aff2753df8
Common/Bitfield: store value as unsigned type
Storing signed type causes the following behaviour: extractValue can do overflow/negative left shift. Now it only relies on two implementation-defined behaviours (which are almost always defined as we want): unsigned->signed conversion and signed right shift
7 years ago
fearlessTobi
1190ea6ddb
Port #4182 from Citra: "Prefix all size_t with std::"
8 years ago
Lioncash
d6812d9e92
bit_field: Convert ToBool() into explicit operator bool
Gets rid of a TODO that is long overdue.
8 years ago
bunnei
33a0dddf78
bit_field: Remove is_pod check, add is_trivially_copyable_v.
8 years ago
bunnei
7112683376
bit_field: Make all methods constexpr.
8 years ago
Yuri Kunde Schlesner
0ba04b2166
Common: Clean up meta-template logic in BitField
9 years ago
Yuri Kunde Schlesner
a786199c4b
Make BitField and ResultCode constexpr-initializable
9 years ago
Emmanuel Gil Peyrot
1138ec0d49
Remove empty newlines in #include blocks.
This makes clang-format useful on those.
Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
10 years ago
Emmanuel Gil Peyrot
628ed4376a
Sources: Run clang-format on everything.
10 years ago
Emmanuel Gil Peyrot
c39a267974
VideoCore: Run include-what-you-use and fix most includes.
10 years ago
MerryMage
d2710b784a
AudioCore: Skeleton Implementation
This commit:
* Adds a new subproject, audio_core.
* Defines structures that exist in DSP shared memory.
* Hooks up various other parts of the emulator into audio core.
This sets the foundation for a later HLE DSP implementation.
10 years ago
MerryMage
867c111e99
BitField: Make trivially copyable and remove assignment operator
10 years ago
Lioncash
03af08ae81
bit_field: Re-enable code on MSVC
11 years ago
archshift
58e2d19f08
Stop defining GCC always_inline attributes as __forceinline
__forceinline is a MSVC extension, which may confuse some people working on the codebase.
Furthermore, the C++ standard dictates that all names which contain adjacent underscores are reserved.
11 years ago
Yuri Kunde Schlesner
d5b5280501
Common: Remove redundant masking in BitField
For the signed case, the shifts already remove the rest of the value, so
ANDing by the mask is redundant.
11 years ago
Yuri Kunde Schlesner
d7f9529bdd
Common: Fix mask generation in BitField
Fixes #913
11 years ago
Emmanuel Gil Peyrot
596b7c4f63
Common: Cleanup key_map includes.
11 years ago
Yuri Kunde Schlesner
e1fbac3ca1
Common: Remove common.h
11 years ago
Chin
0199a7d9ef
More warning cleanups
11 years ago
purpasmart96
ebfd831ccb
License change
11 years ago
Tony Wasserka
95be6a09b2
BitField: Add an explicit Assign method.
This is useful when doing crazy stuff like inheriting from BitField.
11 years ago
Lioncash
2dce9b2ead
bit_field: Fix a typo in the sample usage.
11 years ago
Tony Wasserka
0da8e2eacc
BitField: Cast enum values to proper integer type.
12 years ago
Tony Wasserka
cd1d5786d9
BitField: Add a static_assert.
Being able to store BitField within unions requires BitField to be of standard layout, which in turn is only given if the underlying type is also has standard layout.
12 years ago
Tony Wasserka
15ab5382a5
BitField: Delete copy assignment to prevent obscure bugs.
Cf. https://github.com/dolphin-emu/dolphin/pull/483
12 years ago
Tony Wasserka
47a001722d
BitField: Add an explicit evaluation method.
Sometimes it can be beneficial to use this in places where an explicit cast needs to happen otherwise. By using the evaluation method, it's not necessary anymore to explicitly write the underlying type in this case.
12 years ago
bunnei
a6b047ec3b
removed incorrect dolphin copyright line
12 years ago
bunnei
a713bd1bad
fixed include of common in bit_field.h
12 years ago
bunnei
e7a0283625
added BitField to common
12 years ago