summaryrefslogtreecommitdiffstats
path: root/src/common/swap.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-02-24Remove GCC version checkstgsm1-3/+3
Citra can't be compiled using GCC <7 because of required C++17 support, so these version checks don't need to exist anymore.
2019-02-06common/swap: remove default value for swap type internal storageWeiyi Wang1-1/+1
This is compromise for swap type being used in union. A union has deleted default constructor if it has at least one variant member with non-trivial default constructor, and no variant member of T has a default member initializer. In the use case of Bitfield, all variant members will be the swap type on endianness mismatch, which would all have non-trivial default constructor if default value is specified, and non of them can have member initializer
2019-02-06common/swap: use template and tag for LE/BE specificationWeiyi Wang1-39/+91
The tag can be useful for other type-generic templates like BitFields to forward the endianness specification
2019-02-06common/swap: add swap template for enumWeiyi Wang1-0/+52
2018-07-29Port #3732 from Citra: "common: Fix compilation on ARM"Cameron Cawley1-1/+1
2018-07-19common/swap: Remove unnecessary const on return value of swap()Lioncash1-1/+1
2018-07-19common/swap: Use static_cast where applicableLioncash1-16/+16
2018-07-19common/swap: Use using aliases where applicableLioncash1-33/+33
2018-07-07Port #3579 from CitrafearlessTobi1-1/+1
2018-04-02common: fix swap functions on Bitrig and OpenBSDDaniel Lim Wee Soong1-1/+13
swap{16,32,64} are defined as macros on the two, but client code tries to invoke them as Common::swap{16,32,64}, which naturally doesn't work. This hack redefines the macros as inline functions in the Common namespace: the bodies of the functions are the same as the original macros, but relying on OS-specific implementation details like this is of course brittle.
2016-10-28common: use system bswap* functions on more BSDsJan Beich1-2/+5
2016-09-21Remove empty newlines in #include blocks.Emmanuel Gil Peyrot1-2/+0
This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
2016-09-19Manually tweak source formatting and then re-run clang-formatYuri Kunde Schlesner1-2/+1
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot1-140/+191
2016-05-09swap: Get rid of pointer casting for swapping structsLioncash1-5/+5
These shouldn't haphazardly convert types
2016-05-09swap: Get rid of undefined behavior in swapf and swapdLioncash1-14/+18
This isn't well-defined in C++.
2016-05-09swap: Remove unused methodsLioncash1-28/+0
Also gets rid of pointer data variants as this prevents the use of the regular swapping routines as unary predicates in std lib functions. They also cast to stricter alignment types, which is undefined behavior.
2015-09-11common: Get rid of a cast in swap.hLioncash1-2/+2
2015-06-28Common: Cleanup memory and misc includes.Emmanuel Gil Peyrot1-3/+7
2015-05-29Remove every trailing whitespace from the project (but externals).Emmanuel Gil Peyrot1-1/+1
2015-03-06Removed swap code redundancy and moved common swap code to swap.harchshift1-14/+97
2015-01-06Common: Remove dead platform #ifdefs to make the code more readable.Emmanuel Gil Peyrot1-4/+0
Symbian, Xbox, Blackberry and iOS got removed. FreeBSD and Android kept due to them potentially being able to run Citra in the future. The iOS specific part also got removed from PPSSPP in order to fix a bug there.
2014-10-26Fix compile errors in ClangYuri Kunde Schlesner1-1/+0
2014-04-23fixes to build on linuxbunnei1-13/+13
2014-04-09got rid of 'src' folders in each sub-projectbunnei1-0/+0
2014-04-02convert tabs to spacesbunnei1-335/+335
2013-09-19added swap types to commonShizZy1-0/+535