summaryrefslogtreecommitdiff
path: root/Source/Core/Common/BitField.h
AgeCommit message (Collapse)Author
2025-11-15Common/BitField: Silence two warnings:Jordan Woyak
warning: definition of implicit copy constructor for 'BitField<2, 2, ColorChannel>' is deprecated because it has a user-declared copy assignment operator [-Wdeprecated-copy] Redundant access specifier has the same accessibility as the previous access specifier.
2025-05-05Common/BitField: Make deleted functions public.Jordan Woyak
2025-05-05Common: Replace enable_if with concepts and other minor modernizations.Jordan Woyak
2024-08-20Remove redundant semicolonsDr. Dystopia
2022-01-13Make all custom fmt::formatter's format functions constPokechu22
fmt 8.0.0 requires this.
2021-11-17VideoCommon: Add signed version of BitfieldExtractPokechu22
2021-07-05treewide: convert GPLv2+ license info to SPDX tagsPierre Bourdon
SPDX standardizes how source code conveys its copyright and licensing information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX tags are adopted in many large projects, including things like the Linux kernel.
2021-06-03msvc: remove workarounds for old compiler issuesShawn Hoffman
2021-05-07Change BitfieldExtract to use a pointer to the bitfield memberPokechu22
2021-03-06Create BitFieldArrayPokechu22
2021-03-06Add fmt support to BitFieldPokechu22
2021-03-06Allow specifying StorageType for BitFieldPokechu22
This is useful for BitFields that are bools.
2020-05-13Externals: Add zstdJosJuice
I had to rename Source/Common/Compiler.h because the VS build confuses it with Externals/zstd/lib/common/compiler.h otherwise.
2018-06-09Compiler: Rename __forceinline define to DOLPHIN_FORCE_INLINELioncash
This is much better as prefixed double underscores are reserved for the implementation when it comes to identifiers. Another reason its better, is that, on Windows, where __forceinline is a compiler built-in, with the previous define, header inclusion software that detects unnecessary includes will erroneously flag usages of Compiler.h as unnecessary (despite being necessary on other platforms). So we define a macro that's used by Windows and other platforms to ensure this doesn't happen.
2018-06-09Common: Add header for compiler-specificsLioncash
Instead of globbing things under an ambiguous Common.h header, move compiler-specifics over to Compiler.h. This gives us a dedicated home for anything related to compilers that we want to make functional across all compilers that we support. This moves us a little closer to eliminating Common.h entirely.
2018-04-12Reformat all the things!spycrab
2017-11-13Don't delete BitField copy assignment operator on VSJosJuice
2017-09-11Bitfield: Cast value to storage type in assignment operatorStenzek
This allows us to use enum classes in bitfields.
2017-09-09Common: Move version strings to their own headerLioncash
Ideally Common.h wouldn't be a header in the Common library, and instead be renamed to something else, like PlatformCompatibility.h or something, but even then, there's still some things in the header that don't really fall under that label This moves the version strings out to their own version header that doesn't dump a bunch of other unrelated things into scope, like what Common.h was doing. This also places them into the Common namespace, as opposed to letting them sit in the global namespace.
2017-07-30BitField: Add StartBit() and NumBits() accessorsStenzek
2017-03-23BitField: Get rid of a C-style castLioncash
This can simply be the max value of the unsigned type.
2017-03-23BitField: Convert typedefs to using aliasesLioncash
2017-03-23BitField: Make mostly constexpr capableLioncash
Makes the constructor and retrieval functions constexpr.
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2015-10-03Merge pull request #2738 from lioncash/bitfieldshuffle2
Common: Fix BitField mask generation.
2015-09-03BitField: Enable ifdef'd out code for WindowsLioncash
2015-07-11Common: Remove redundant masking in BitFieldYuri Kunde Schlesner
For the signed case, the shifts already remove the rest of the value, so ANDing by the mask is redundant.
2015-07-11Common: Fix mask generation in BitFieldYuri Kunde Schlesner
2015-05-25Update license headers to GPLv2+Tillmann Karras
2015-02-25Formatting/Whitespace CleanupStevoisiak
Various fixes to formatting and whitespace
2015-01-23Fix Intellisense error spam on Visual Studio.magumagu
Intellisense doesn't like defines in PCH files, and it doesn't like the deleted constructor for BitField. (I think it's being overly strict about the "must have no non-default constructors" rule for classes in unions.)
2014-10-24BitField: Fix a typo in the sample usage.Lioncash
2014-06-11BitField: Add an explicit getter function for retrieving the BitField value.Tony Wasserka
Sometimes (in particular when using non-typesafe functions) it can be convenient to have a getter method rather than performing a potentially lengthy explicit cast.
2014-06-11BitField: Delete copy assignment to prevent obscure bugs.Tony Wasserka
2014-04-14BitField: Fix alignment issues.Tony Wasserka
At least one platform (ARM with NEON instructions enabled) generates SIGBUSes if BitField objects aren't aligned properly.
2014-04-13BitField: Optimize generated assembly by forcing inlining.Tony Wasserka
2014-03-25Common: Add a generic class for accessing bitfields in a fast and ↵Tony Wasserka
endianness-independent way. The underlying storage type of a bitfield can be any intrinsic integer type, but also any enumeration. Custom storage types are supported if the following things are defined on the storage type: - casting 0 to the storage type - bit shift operators (in both directions) - bitwise & operator - bitwise ~ operator - std::make_unsigned specialization