Lioncash
50c1158d21
common_funcs: Add missing XOR operators to DECLARE_ENUM_FLAG_OPERATORS
Ensures that the full set of bitwise operators are available for types
that make use of this macro.
5 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.
5 years ago
bunnei
f9a8cc03c3
common: common_funcs: Add a macro for defining enum flag operators.
6 years ago
Lioncash
51d9e22b7e
common_funcs: Remove semicolons from INSERT_PADDING_* macros
Makes code that uses the macros consistent by requiring the lines to be
terminated with a semicolon.
6 years ago
Lioncash
ae15e162be
common_funcs: silence sign-conversion warnings in MakeMagic()
We can trivially resolve these by casting the characters to unsigned
values and then shifting the bits.
6 years ago
bunnei
fe02b9f968
common_func: Use std::array for INSERT_PADDING_* macros.
- Zero initialization here is useful for determinism.
6 years ago
bunnei
da2cf661f1
Revert "common_func: Use std::array for INSERT_PADDING_* macros."
6 years ago
bunnei
388a651346
common_func: Use std::array for INSERT_PADDING_* macros.
- Zero initialization here is useful for determinism.
6 years ago
Fernando Sahmkow
c3c7215820
texture_cache: Address Feedback
7 years ago
Fernando Sahmkow
20e97604f1
Reduce amount of size calculations.
7 years ago
Cameron Cawley
edf024592e
Port #3732 from Citra: "common: Fix compilation on ARM"
8 years ago
Lioncash
3ec8aa2bb9
common/common_funcs: Remove unused rotation functions
These are unused and essentially don't provide much benefit either. If
we ever need rotation functions, these can be introduced in a way that
they don't sit in a common_* header and require a bunch of ifdefing to
simply be available
8 years ago
Lioncash
03d8c78199
common/misc: Deduplicate code in GetLastErrorMsg()
Android and macOS have supported thread_local for quite a while, but
most importantly is that we don't even really need it. Instead of using
a thread-local buffer, we can just return a non-static buffer as a
std::string, avoiding the need for that quality entirely.
8 years ago
fearlessTobi
365753a98c
Port #3579 from Citra
8 years ago
Lioncash
c9f5ae4fcc
common_funcs: Remove ARRAY_SIZE macro
C++17 has non-member size() which we can just call where necessary.
8 years ago
Lioncash
4b0e4421f4
common_funcs: Remove check for VS versions that we don't even support
We don't support any VS versions that don't already have snprintf in the
standard library implementation.
8 years ago
bunnei
5e11c12766
core: Refactor MakeMagic usage and remove dead code.
8 years ago
Yuri Kunde Schlesner
8b55ffb74a
Common: Fix some out-of-style includes
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.
9 years ago
Yuri Kunde Schlesner
1e4a5da9f4
Manually tweak source formatting and then re-run clang-format
9 years ago
Emmanuel Gil Peyrot
628ed4376a
Sources: Run clang-format on everything.
9 years ago
MerryMage
b7b02d0177
common_funcs: Provide rotr and rotl for MSVC
10 years ago
Emmanuel Gil Peyrot
c39a267974
VideoCore: Run include-what-you-use and fix most includes.
10 years ago
Lioncash
f932c2f4ac
Common: Get rid of alignment macros
The gl rasterizer already uses alignas,
so we may as well move everything over.
10 years ago
bunnei
2fd9b1999f
gl_rasterizer: Use MMH3 hash for shader cache hey.
- Includes a check to confirm no hash collisions.
10 years ago
bunnei
eefabd6b7d
renderer_opengl: Refactor shader generation/caching to be more organized + various cleanups.
10 years ago
darkf
8d212ff881
Fix building under MinGW
11 years ago
bunnei
4ffc095fa3
Rename ARCHITECTURE_X64 definition to ARCHITECTURE_x86_64.
11 years ago
bunnei
f9e3228caa
x64: Refactor to remove fake interfaces and general cleanups.
11 years ago
bunnei
3d35d53b8d
Common: Ported over boilerplate x86 JIT code from Dolphin/PPSSPP.
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
Apology11
af18572491
don´t define snprintf on Visual Studio 2015
Visual Studio 2015 defines this in stdio now
11 years ago
Emmanuel Gil Peyrot
1775adc34c
Common: Remove unused ROUND_UP_POW2 macro.
11 years ago
Emmanuel Gil Peyrot
2d044a67c9
Common: Cleanup memory and misc includes.
11 years ago
Yuri Kunde Schlesner
b700b55696
Common: Remove the BIT macro
When the macro was introduced in 326ec51261
it wasn't noticed that it conflicted in name with a heavily used macro
inside of dyncom. This causes some compiler warnings. Since it's only
lightly used, it was opted to simply remove the new macro.
11 years ago
Yuri Kunde Schlesner
326ec51261
Common: Add BIT macro
11 years ago
Yuri Kunde Schlesner
fae5933ad6
Common: Add proper macros to test for architecture pointer size
The old system of just defining macros available in some other platform
was susceptible to silently using the wrong code if you forgot to
include a particular header. This fixes a crash on non-Windows platforms
introduced by e1fbac3ca1 .
11 years ago
Yuri Kunde Schlesner
1bd1a13a02
Common: Move alignment macros to common_funcs.h
11 years ago
Yuri Kunde Schlesner
a594fdb66e
Common: Remove more unused compatibility defines
11 years ago
Yuri Kunde Schlesner
f3c096951b
Common: Move IO-specific compatibility macros to file_util.cpp
11 years ago
Yuri Kunde Schlesner
bf12f270b3
Common: Remove many unnecessary cross-platform compatibility macros
11 years ago
archshift
e011acaa84
Removed swap code redundancy and moved common swap code to swap.h
11 years ago
archshift
0420a4d1de
Added information reporting from ThrowFatalError
This was RE'd from the errdisp applet.
11 years ago
archshift
4fb75d220a
Misc cleanup of common and related functions
11 years ago
archshift
302f0b32f5
Remove duplication of INSERT_PADDING_WORDS between pica.h and gpu.h
11 years ago
purpasmart96
c3c309f33d
ConfigMem: Clean up the Config memory to be more like the shared page and moved
the helper macro for padding to common_funcs.h
11 years ago
archshift
ef24e72b26
Asserts: break/crash program, fit to style guide; log.h->assert.h
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time)
As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing)
Also removed some GEKKO cruft.
11 years ago
Yuri Kunde Schlesner
fc11aff955
Common: Fix SCOPE_EXIT to actually create unique identifiers.
11 years ago
purpasmart96
ebfd831ccb
License change
11 years ago
Yuri Kunde Schlesner
eda30c36ee
Added missing include in common_funcs.h
11 years ago