summaryrefslogtreecommitdiff
path: root/src/common/bit_field.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-05-28externals: Update to fmt 10 and add format_as formatter for BitFieldGravatar Morph1-0/+5
Implicit conversions are now disallowed in fmt 10. Use format_as to convert to the underlying type.
2022-10-22general: Enforce C4800 everywhere except in video_coreGravatar Morph1-4/+11
2022-10-06General: Fix compilation for GCCGravatar Liam White1-8/+5
2022-10-06NVDRV: Refactor and add new NvMap.Gravatar Fernando Sahmkow1-5/+8
2022-07-09common: fix bitfield aliasing on GCC/ClangGravatar Liam1-0/+9
2022-04-28chore: add missing SPDX tagsGravatar Andrea Pappacoda1-29/+3
Follow-up to 99ceb03a1cfcf35968cab589ea188a8c406cda52
2022-03-19common: Reduce unused includesGravatar ameerj1-1/+0
2020-08-15common: Make use of [[nodiscard]] where applicableGravatar Lioncash1-13/+6
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.
2020-08-13General: Tidy up clang-format warnings part 2Gravatar Lioncash1-1/+1
2020-08-08General: Tidy up clang-format warningsGravatar Lioncash1-1/+1
2020-04-24Fix -Werror=conversion error.Gravatar Markus Wick1-1/+1
2019-11-16Revert "common/bit_field: Silence sign-conversion warnings"Gravatar Rodrigo Locatti1-3/+2
2019-11-15common/bit_field: Silence sign-conversion warningsGravatar Lioncash1-2/+3
We can just use numeric_limits instead of relying on wraparound behavior here.
2019-11-03common_func: Use std::array for INSERT_PADDING_* macros.Gravatar bunnei1-0/+7
- Zero initialization here is useful for determinism.
2019-11-03common/bit_field: Remove FORCE_INLINE calls Gravatar Tobias1-2/+2
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.
2019-03-20common/bit_util: Fix bad merge duplicating the copy constructorGravatar Lioncash1-2/+0
Introduced as a result of #2090, we already define the copy constructor further down below, so this isn't needed.
2019-03-07common/bit_field: Make BitField trivially copyableGravatar Lioncash1-9/+7
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.
2019-02-13Make bitfield assignment operator publicGravatar fearlessTobi1-6/+2
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
2019-02-06common/bitfield: make it endianness-awareGravatar Weiyi Wang1-3/+9
2018-11-16Common/Bitfield: store value as unsigned typeGravatar Weiyi Wang1-9/+10
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
2018-09-15Port #4182 from Citra: "Prefix all size_t with std::"Gravatar fearlessTobi1-2/+2
2018-08-21bit_field: Convert ToBool() into explicit operator boolGravatar Lioncash1-2/+1
Gets rid of a TODO that is long overdue.
2018-04-17bit_field: Remove is_pod check, add is_trivially_copyable_v.Gravatar bunnei1-6/+1
2018-04-13bit_field: Make all methods constexpr.Gravatar bunnei1-5/+5
2017-05-24Common: Clean up meta-template logic in BitFieldGravatar Yuri Kunde Schlesner1-3/+3
2017-05-24Make BitField and ResultCode constexpr-initializableGravatar Yuri Kunde Schlesner1-23/+42
2016-09-21Remove empty newlines in #include blocks.Gravatar Emmanuel Gil Peyrot1-1/+0
This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
2016-09-18Sources: Run clang-format on everything.Gravatar Emmanuel Gil Peyrot1-16/+10
2016-04-30VideoCore: Run include-what-you-use and fix most includes.Gravatar Emmanuel Gil Peyrot1-1/+1
2016-02-21AudioCore: Skeleton ImplementationGravatar MerryMage1-1/+1
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.
2016-02-12BitField: Make trivially copyable and remove assignment operatorGravatar MerryMage1-24/+20
2015-10-01bit_field: Re-enable code on MSVCGravatar Lioncash1-11/+0
2015-08-11Stop defining GCC always_inline attributes as __forceinlineGravatar archshift1-6/+6
__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.
2015-07-10Common: Remove redundant masking in BitFieldGravatar Yuri Kunde Schlesner1-1/+1
For the signed case, the shifts already remove the rest of the value, so ANDing by the mask is redundant.
2015-07-10Common: Fix mask generation in BitFieldGravatar Yuri Kunde Schlesner1-1/+1
Fixes #913
2015-06-28Common: Cleanup key_map includes.Gravatar Emmanuel Gil Peyrot1-0/+1
2015-05-07Common: Remove common.hGravatar Yuri Kunde Schlesner1-1/+1
2014-12-21More warning cleanupsGravatar Chin1-0/+6
2014-12-20License changeGravatar purpasmart961-1/+1
2014-12-20BitField: Add an explicit Assign method.Gravatar Tony Wasserka1-1/+5
This is useful when doing crazy stuff like inheriting from BitField.
2014-10-25bit_field: Fix a typo in the sample usage.Gravatar Lioncash1-1/+1
2014-07-16BitField: Cast enum values to proper integer type.Gravatar Tony Wasserka1-1/+1
2014-07-16BitField: Add a static_assert.Gravatar Tony Wasserka1-0/+1
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.
2014-07-16BitField: Delete copy assignment to prevent obscure bugs.Gravatar Tony Wasserka1-0/+16
Cf. https://github.com/dolphin-emu/dolphin/pull/483
2014-07-16BitField: Add an explicit evaluation method.Gravatar Tony Wasserka1-0/+5
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.
2014-05-08removed incorrect dolphin copyright lineGravatar bunnei1-1/+0
2014-05-07fixed include of common in bit_field.hGravatar bunnei1-1/+1
2014-05-07added BitField to commonGravatar bunnei1-0/+173