summaryrefslogtreecommitdiff
path: root/Source/Core/Common
AgeCommit message (Collapse)Author
2025-01-01Simplify `std::find` with `Common::Contains`mitaclaw
In NandPaths.cpp, the `std::initializer_list<char>` of illegal characters has been turned into a `char[]` (similar to the one in GameList.cpp). The reverse iteration in ResourcePack.cpp seemed to provide no benefits, and doing without it it seemed to have no ill effects.
2025-01-01Common: Create "Contains.h" Algorithm Headermitaclaw
The new `Common::Contains` and `Common::ContainsSubrange` function objects mirror C++23's `std::ranges::contains` and `std::ranges::contains_subrange`, respectively.
2024-12-26Merge pull request #13116 from mitaclaw/ranges-modernization-8-trivial-ofJMC47
Ranges Algorithms Modernization - Of
2024-12-20Merge pull request #13091 from mitaclaw/ranges-modernization-2-returnsJMC47
Ranges Algorithms Modernization - Return
2024-12-15Modernize `std::none_of` with rangesmitaclaw
In JitRegCache.cpp, the lambda predicate were replaced by a pointer to member function because ranges algorithms are able to invoke those. In ConvertDialog.cpp, the `std::mem_fn` helper was removed because ranges algorithms are able to handle pointers to member functions as predicates. In BoundingBox.cpp, the lambda predicate was returning the bool element unchanged, so `std::identity` was a better fit.
2024-12-15Modernize `std::any_of` with rangesmitaclaw
In WiimoteReal.cpp, JitRegCache.cpp, lambda predicates were replaced by pointers to member functions because ranges algorithms are able invoke those. In ConvertDialog.cpp, the `std::mem_fn` helper was removed because ranges algorithms are able to handle pointers to member functions as predicates.
2024-12-15Modernize `std::all_of` with rangesmitaclaw
In DITSpecification.cpp, MaterialAsset.cpp, and ShaderAsset.cpp, lambda predicates were replaced by pointers to member functions because ranges algorithms are able invoke those. In NetPlayClient.cpp, the non-trivial `NetPlay::Player` elements were being passed by value in `NetPlayClient::DoAllPlayersHaveGame()`. This has been fixed. In WIABlob.cpp, the second example's predicate was returning the `std::optional` by value instead of implicitly converting it to a bool. This has been fixed.
2024-12-15StringUtil: More Wrappers For <cctype>mitaclaw
`Common::IsLower(char)` was omitted as nothing needed it.
2024-11-11Core: Store object name separately for symbolsAmber Brault
2024-10-27Merge pull request #12744 from nlebeck/settingshandler-split-2JMC47
Split `SettingsHandler` into separate reader and writer classes
2024-10-27Merge pull request #13096 from mitaclaw/ranges-modernization-7-rewriteJMC47
Ranges Algorithms Modernization - Rewrite
2024-10-21Split `SettingsHandler` into separate reader and writer classesNiel Lebeck
2024-10-19DolphinQt: JIT Widget Refreshmitaclaw
Fulfilling a certain six-year-old todo.
2024-10-19Move UICommon/Disassembler to Common/HostDisassemblermitaclaw
A preliminary commit for a cleaner diff and an easier review
2024-10-17Modernize `std::unique` with rangesmitaclaw
The new return value is `std::ranges::subrange`.
2024-10-15Merge pull request #13090 from mitaclaw/ranges-modernization-1-trivialJosJuice
Ranges Algorithms Modernization - Trivial
2024-10-11Merge pull request #13117 from mitaclaw/ranges-modernization-9-trivial-findTilka
Ranges Algorithms Modernization - Find
2024-10-10C++20: Synthesize `operator!=` From `operator==`mitaclaw
The inequality operator is automatically generated by the compiler if `operator==` is defined.
2024-10-10Modernize `std::find` with rangesmitaclaw
2024-10-10Modernize `std::sort` with rangesmitaclaw
2024-10-10Modernize `std::replace` with rangesmitaclaw
2024-10-10Modernize `std::transform` with rangesmitaclaw
In StringUtil.h, the lambdas wrapping `Common::ToLower(char)` and `Common::ToUpper(char)` were only necessary due to the function names being overloaded.
2024-10-10Modernize `std::copy` with rangesmitaclaw
2024-10-10Modernize `std::count_if` with rangesmitaclaw
2024-10-09Simplify `std::fill` with `std::array::fill`mitaclaw
2024-09-26Merge pull request #13068 from mitaclaw/redundant-case-insensitiveJMC47
IniFile: Migrate `Common::CaseInsensitiveLess` to StringUtil
2024-09-22StringUtil: Remove `JoinStrings`mitaclaw
With 12 uses of `JoinStrings` in the codebase vs 36 uses of `fmt::join`, fmtlib's range adapter for string concatenation with delimiters is clearly the preferred option.
2024-09-21IniFile: Migrate `Common::CaseInsensitiveLess` to StringUtilmitaclaw
Migrating `Common::CaseInsensitiveLess` to StringUtil.h will hopefully discourage rolling one's own solution in the future for case-insensitive associative containers when this (quite robust!) solution already exists. `Common::CaseInsensitiveStringCompare::IsEqual` was removed in favor of using the `Common::CaseInsensitiveEquals` function. The `a.size() != b.size()` condition in `Common::CaseInsensitiveEquals` can be removed, since `std::ranges::equal` already checks this condition (confirmed in libc++).
2024-08-31Merge pull request #13031 from parona-source/libfmt-11Admiral H. Curtiss
Add support for libfmt-11
2024-08-22TypeUtils: Remove Common::Fillmitaclaw
This temporary solution is no longer needed.
2024-08-22Add support for libfmt-11Alfred Wingate
fmt::join was moved into fmt/ranges.h Signed-off-by: Alfred Wingate <parona@protonmail.com>
2024-08-20Remove redundant semicolonsDr. Dystopia
2024-08-17Merge pull request #12889 from mitaclaw/constexpr-bitutils-1Tilka
BitUtils: Constexpr BitCastToArray, Remove BitCastFromArray
2024-08-16BitUtils: Constexpr BitCastToArray, Remove BitCastFromArraymitaclaw
`std::bit_cast` participates in overload resolution only if `sizeof(To) == sizeof(From)` and both `To` and `From` are *TriviallyCopyable* types, so the static assertions here can be removed. `[[nodiscard]]` was added as well.
2024-08-15UICommon: Remove Steam user directory logicOatmealDome
2024-08-14Merge pull request #12990 from tygyh/Use-contains-methodTilka
Use 'contains' method
2024-08-14Use 'contains' methodDr. Dystopia
2024-08-13Fix commentsDr. Dystopia
2024-08-07Merge pull request #12957 from Dentomologist/adjust_include_order_and_spacingTilka
Adjust order and spacing of various #includes
2024-07-26Adjust order and spacing of various #includesDentomologist
Move some #includes around to match the Contributing guidelines.
2024-07-23Cached Interpreter 2.0mitaclaw
It now supports variable-sized data payloads and memory range freeing. It's a little faster, too.
2024-07-21Emitters: Define Trivial Getters Inlinemitaclaw
2024-07-21Change OperandDesc variables to not be underscore-prefixed in order to ↵SimoneN64
comply with https://eel.is/c++draft/lex.name#3.1 (fixes compilation under newlib; e.g. devkitPro)
2024-07-07Implement File::GetExePath() for FreeBSDAdmiral H. Curtiss
2024-07-04Common/Crypto/SHA1: Use span and string_view for Context::Update()Admiral H. Curtiss
2024-07-04AchievementManager: Cache Badges on DiskLillyJadeKatrin
Badges are saved in /User/Cache/RetroAchievements on first download and reused from there instead of redownloaded.
2024-07-04Common/Crypto/SHA1: Add DigestToString() utility functionLillyJadeKatrin
2024-06-29ScmRevGen: Set commits ahead to zero when on a tagOatmealDome
2024-06-15Merge pull request #12798 from mitaclaw/branch-watch-tool-fixes-2Admiral H. Curtiss
Branch Watch Tool: Optimizations
2024-06-15Merge pull request #12818 from iwubcode/json_file_operationsAdmiral H. Curtiss
Common: add Json helper utilities for loading or saving to a file