summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2020-08-27Merge pull request #4530 from Morph1984/mjolnir-p1bunnei
Project Mjölnir: Part 1 - Input Rewrite
2020-08-27Merge pull request #4577 from lioncash/assertsbunnei
common/assert: Make use of C++ attribute syntax
2020-08-26Project Mjölnir: Part 1Morph
Co-authored-by: James Rowe <jroweboy@gmail.com> Co-authored-by: Its-Rei <kupfel@gmail.com>
2020-08-25Merge pull request #4548 from lioncash/colorbunnei
common/color: Migrate code over to the Common namespace
2020-08-24common/assert: Make use of C++ attribute syntaxLioncash
Normalizes the syntax used for attributes
2020-08-22web_service: Move web_result.h into web_serviceLioncash
This is the only place it's actively used. It's also more appropriate for web-related structures to be within the web service target. Especially given this one doesn't rely on anything in the common library.
2020-08-20Merge pull request #4546 from lioncash/telemetrybunnei
common/telemetry: Migrate namespace into the Common namespace
2020-08-19Merge pull request #4547 from lioncash/header-conceptbunnei
common/concepts: Move <type_traits> include out of the Common namespace
2020-08-19Revert "common/time_zone: Simplify GetOsTimeZoneOffset()"bunnei
2020-08-18Merge pull request #4539 from lioncash/discbunnei
common: Silence two discarded result warnings
2020-08-18common/telemetry: Migrate namespace into the Common namespaceLioncash
Migrates the Telemetry namespace into the Common namespace to make the code consistent with the rest of our common code.
2020-08-18common/color: Migrate code over to the Common namespaceLioncash
No external code makes use of this header, so we can freely change the namespace.
2020-08-18common/concepts: Move <type_traits> include out of the Common namespaceLioncash
This is a compiler/linker error waiting to happen.
2020-08-17Merge pull request #4535 from lioncash/fileutilbunnei
common/fileutil: Convert namespace to Common::FS
2020-08-16common/fileutil: Convert namespace to Common::FSLioncash
Migrates a remaining common file over to the Common namespace, making it consistent with the rest of common files. This also allows for high-traffic FS related code to alias the filesystem function namespace as namespace FS = Common::FS; for more concise typing.
2020-08-16common: Silence two discarded result warningsLioncash
These are intentionally discarded internally, since the rest of the public API allows querying success. We want all non-internal uses of these functions to be explicitly checked, so we can signify that we intentionally want to discard the return values here.
2020-08-16common/time_zone: Simplify GetOsTimeZoneOffset()Lioncash
We can simplify this function down into a single line with the use of fmt. A benefit with the fmt approach is that the fmt variant of localtime is thread-safe as well, making GetOsTimeZoneOffset() thread-safe as well.
2020-08-15common/compression: Roll back std::span changesLioncash
Seems like all compilers don't support std::span yet.
2020-08-15common: Make use of [[nodiscard]] where applicableLioncash
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-15Merge pull request #4416 from lioncash/spanbunnei
lz4_compression/zstd_compression: Make use of std::span in interfaces
2020-08-13Merge pull request #4511 from lioncash/build2LC
General: Tidy up clang-format warnings part 2
2020-08-13General: Tidy up clang-format warnings part 2Lioncash
2020-08-11Merge pull request #4493 from jbeich/dragonflybunnei
common/virtual_buffer: drop unused includes
2020-08-08General: Tidy up clang-format warningsLioncash
2020-08-07common/concepts: Rename IsBaseOf to DerivedFromLioncash
This makes it more inline with its currently unavailable standardized analogue std::derived_from. While we're at it, we can also make the template match the requirements of the standardized variant as well.
2020-08-06Merge pull request #4483 from lioncash/constexpr-hexbunnei
partition_data_manager: Make data arrays constexpr
2020-08-06partition_data_manager: Make data arrays constexprLioncash
Previously the constructor for all of these would run at program startup, consuming time before the application can enter main(). This is also particularly dangerous, given the logging system wouldn't have been initialized properly yet, yet the program would use the logs to signify an error. To rectify this, we can replace the literals with constexpr functions that perform the conversion at compile-time, completely eliminating the runtime cost of initializing these arrays.
2020-08-05Merge pull request #4477 from lioncash/log-desigbunnei
logging/backend: Make use of designated initializers
2020-08-05common/virtual_buffer: drop unused includesJan Beich
On DragonFly and NetBSD build fails with src/common/virtual_buffer.cpp src/common/virtual_buffer.cpp:16:10: fatal error: sys/sysinfo.h: No such file or directory #include <sys/sysinfo.h> ^~~~~~~~~~~~~~~
2020-08-05Merge pull request #4444 from lioncash/volatilebunnei
common/atomic_ops: Don't cast away volatile from pointers
2020-08-03logging/backend: Make use of designated initializersLioncash
Same behavior, less code.
2020-08-03ipc: Allow all trivially copyable objects to be passed directly into ↵David
WriteBuffer (#4465) * ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer With the support of C++20, we can use concepts to deduce if a type is an STL container or not. * More agressive concept for stl containers * Add -fconcepts * Move to common namespace * Add Common::IsBaseOf
2020-08-03Merge pull request #4263 from lat9nq/fix-screencaps-2David
screenshots: Option to save screenshots immediately in a specified directory + Linux workaround
2020-07-28common/atomic_ops: Don't cast away volatile from pointersLioncash
Preserves the volatility of the pointers being casted.
2020-07-25Merge pull request #4415 from lioncash/maybebunnei
virtual_buffer: Mark size parameter of FreeMemoryPages() as [[maybe_unused]]
2020-07-25common/string_util: Remove unimplemented function prototype (#4414)LC
This function was relocated to log.h as a constexpr function, so this can be removed.
2020-07-25lz4_compression: Make use of std::span in interfacesLioncash
Allows compressing the data and size parameters into one.
2020-07-25zstd_compression: Make use of std::span in interfacesLioncash
Allows condensing the data and size parameters into a single argument.
2020-07-25virtual_buffer: Mark size parameter of FreeMemoryPages() as [[maybe_unused]]Lioncash
This isn't used on Windows, but is used on non-Windows operating systems.
2020-07-20common: Add a screenshots directorylat9nq
Adds a screenshots directory as a path managed by FileUtil.
2020-07-18alignment: explicitly include <new> after 723edb4c0659Jan Beich
In file included from src/core/hle/kernel/memory/page_table.cpp:5: src/./common/alignment.h:67:68: error: no member named 'align_val_t' in namespace 'std' return static_cast<T*>(::operator new (n * sizeof(T), std::align_val_t{Align})); ~~~~~^ src/./common/alignment.h:71:51: error: no member named 'align_val_t' in namespace 'std' ::operator delete (p, n * sizeof(T), std::align_val_t{Align}); ~~~~~^
2020-07-17alignment: Simplify AlignmentAllocator implementationLioncash
With C++20, much of the allocator interface has been simplified, so we can make the same adjustments.
2020-07-14common/swap: Make use of std::endianLioncash
Allows removing a bunch of defines in favor of a two liner.
2020-07-12common/alignment: Fix compilation errors (#4303)Tobias
2020-07-11Revert "Port citra-emu/citra#5441: "Common: remove a mod from AlignUp""bunnei
2020-07-11Common: remove a mod from AlignUp (#5441)Marshall Mohror
In cases where the size is not a known constant when inlining, AlignUp<std::size_t> currently generates two 64-bit div instructions. This generates one div and a cmov which is significantly cheaper.
2020-07-10cmake: Fix libfmt linking errorsDavid Marcec
2020-07-09cmake: fix fmt linking when foundJohn Galt
This is a new attempt at #4206 that shouldn't break windows builds. If someone else could test on windows, it would be much appreciated. Previously, the build bot passed but the actual builds failed.
2020-07-02Revert "cmake: fix fmt linking"bunnei
2020-07-02Merge pull request #4206 from RealJohnGalt/linkfixbunnei
cmake: fix fmt linking