Morph
9950a388d2
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
e6ab1f673b
general: Enforce C4800 everywhere except in video_core
3 years ago
Liam White
afab6c143c
General: Fix compilation for GCC
4 years ago
Fernando Sahmkow
3cbe352c18
NVDRV: Refactor and add new NvMap.
4 years ago
Liam
a1c1ad096d
common: fix bitfield aliasing on GCC/Clang
4 years ago
Andrea Pappacoda
01cf05bc75
chore: add missing SPDX tags
Follow-up to 99ceb03a1c
4 years ago
ameerj
923decae5a
common: Reduce unused includes
4 years ago
Lioncash
df72480395
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
b724a4d90c
General: Tidy up clang-format warnings part 2
6 years ago
Lioncash
1c3490a8db
General: Tidy up clang-format warnings
6 years ago
Markus Wick
c499c22cf7
Fix -Werror=conversion error.
6 years ago
Rodrigo Locatti
8ed0d92e32
Revert "common/bit_field: Silence sign-conversion warnings"
6 years ago
Lioncash
14581e4a59
common/bit_field: Silence sign-conversion warnings
We can just use numeric_limits instead of relying on wraparound behavior
here.
6 years ago
bunnei
1bdae0fe29
common_func: Use std::array for INSERT_PADDING_* macros.
- Zero initialization here is useful for determinism.
6 years ago
Tobias
a81987a7cb
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.
7 years ago
Lioncash
109b78a6d6
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
e99a148628
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
efd83570bd
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
6b81ceb060
common/bitfield: make it endianness-aware
7 years ago
Weiyi Wang
786995a81e
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
63c2e32e20
Port #4182 from Citra: "Prefix all size_t with std::"
8 years ago
Lioncash
36090521ce
bit_field: Convert ToBool() into explicit operator bool
Gets rid of a TODO that is long overdue.
8 years ago
bunnei
e59126809c
bit_field: Remove is_pod check, add is_trivially_copyable_v.
8 years ago
bunnei
0315fe8c3d
bit_field: Make all methods constexpr.
8 years ago
Yuri Kunde Schlesner
c1a9e94068
Common: Clean up meta-template logic in BitField
9 years ago
Yuri Kunde Schlesner
a75145a2c6
Make BitField and ResultCode constexpr-initializable
9 years ago
Emmanuel Gil Peyrot
ebdae19fd2
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
dc8479928c
Sources: Run clang-format on everything.
10 years ago
Emmanuel Gil Peyrot
691a42fe98
VideoCore: Run include-what-you-use and fix most includes.
10 years ago
MerryMage
8b00954ec7
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
6c71858c5c
BitField: Make trivially copyable and remove assignment operator
10 years ago
Lioncash
845ac621b3
bit_field: Re-enable code on MSVC
11 years ago
archshift
d1ae413ffd
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.
12 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