Commit Graph

1390 Commits

Author SHA1 Message Date
Jordan Woyak
65f3ba70f5
Merge pull request #13522 from tygyh/Enforce-overriding-destructor-style-Core&UnitTests
Core & UnitTests: Make overriding explicit and remove redundant virtual specifiers on overriding destructors
2025-06-07 17:55:14 -05:00
JMC47
8def02072b
Merge pull request #13379 from JoshuaVandaele/system-ng
Use minizip-ng in non-compatibility mode
2025-06-04 15:21:05 -04:00
JosJuice
66f181a621 Hide DirectoryBlob header.bin files from game list
This is a continuation of 552b6da. That commit hid sys/boot.bin, but not
disc/header.bin, which is only present for Wii games.

Fixes https://bugs.dolphin-emu.org/issues/13810.
2025-05-25 20:37:52 +02:00
Joshua Vandaële
2ed5f16600
minizip-ng: Stop using compatibility mode 2025-05-22 12:51:55 +02:00
Dr. Dystopia
9dfcbcecff DiscIO: Make functions constant 2025-05-16 19:11:39 +02:00
Jordan Woyak
921ffe153d
Merge pull request #13542 from tygyh/DiscIO-Pass-parameters-by-constant-reference
DiscIO: Pass parameters by constant reference
2025-05-07 15:50:11 -05:00
JMC47
757e6aba46
Merge pull request #13597 from JosJuice/hide-boot-bin
Hide DirectoryBlob boot.bin files from game list
2025-05-01 21:30:10 -04:00
Dr. Dystopia
f240e20e3f Make overriding explicit and remove redundant virtual specifiers on overriding destructors - Core & UnitTests 2025-05-01 15:00:37 +02:00
JosJuice
552b6da9c4 Hide DirectoryBlob boot.bin files from game list
Extracted games contain a boot.bin file that contains the disc header.
These boot.bin files are considered valid volumes by Dolphin, since
Dolphin only checks the disc header to determine if something is a valid
GC/Wii disc. Running them doesn't make any sense, though.

boot.bin files used to not be scanned by Dolphin due to their file
extension, but .bin was added to the list of file extensions to scan for
in 494e2c0. To stop them from showing up in the game list, let's update
the ShouldHideFromGameList mechanism.
2025-04-26 20:54:32 +02:00
Joshua Vandaële
2c54ee94c1
linter: Apply clang-format 19.1 formatting
find ./Source/ -name '*.cpp' -o -name '*.h' | xargs clang-format-19 -i
2025-04-23 11:19:20 +02:00
Jordan Woyak
31a3de819d
Merge pull request #13540 from tygyh/DiscIO-Remove-redundant-qualifiers
DiscIO: Remove redundant qualifiers
2025-04-22 20:00:03 -05:00
Dr. Dystopia
ecafd8058f DiscIO: Remove redundant qualifiers 2025-04-22 13:54:10 +02:00
Zopolis4
8d94d25203
Implement Triforce ID parsing 2025-04-21 22:05:25 +10:00
Zopolis4
71f654cdc4
Add Triforce platform and preliminary boot.id parsing 2025-04-21 22:05:25 +10:00
Tilka
7e7b75c1e6
Merge pull request #13537 from tygyh/DiscIO-Make-variables-constexpr
DiscIO: Make variables constexpr
2025-04-21 00:52:18 +01:00
Tilka
9504916f72
Merge pull request #13538 from tygyh/DiscIO-Use-default-to-define-a-trivial-destructor
DiscIO: Use `= default` to define a trivial destructor
2025-04-20 22:32:12 +01:00
Tilka
45ed4b2be9
Merge pull request #13541 from tygyh/DiscIO-Remove-redundant-zero-initializers-in-aggregate-initializations
DiscIO: Remove redundant zero initializers in aggregate initializations
2025-04-20 22:07:58 +01:00
Dr. Dystopia
07ad189b4f DiscIO: Pass parameters by constant reference 2025-04-20 08:26:09 +02:00
Dr. Dystopia
77b4270981 DiscIO: Remove redundant zero initializers in aggregate initializations 2025-04-19 22:04:50 +02:00
Dr. Dystopia
7123fcd19b DiscIO: Use = default to define a trivial destructor 2025-04-19 17:43:18 +02:00
Dr. Dystopia
f6ba69f99a DiscIO: Make variables constexpr 2025-04-19 17:17:02 +02:00
Dr. Dystopia
301cc5ee63 DiscIO: Make classes final 2025-04-19 09:05:22 +02:00
Dr. Dystopia
3bb925c1c7 DiscIO/Volume: Fix Partition struct comparison operators 2025-04-15 12:18:23 +02:00
JMC47
9819d66a47
Merge pull request #13221 from mitaclaw/nrvo-fails-1
GCC: Remedy NRVO Fails
2025-03-29 03:26:46 -04:00
mitaclaw
433c6ce0f2 GCC: Remedy NRVO Fails
Using the `-Wnrvo` flag introduced by GCC 14, I identified a few places where NRVO was clearly intended, but is fumbled.
2025-03-10 12:38:03 -07:00
mitaclaw
c9f589faa5 Modernize std::stable_sort with ranges and projections 2025-03-09 13:26:38 -07:00
mitaclaw
8b9f92a0af Modernize std::sort with ranges and projections
In PPCTables.cpp, the code is currently unused so I was unable to test it.

In CustomPipeline.cpp, a pointer to member function cannot be used due to 16.4.5.2.1 of the C++ Standard regarding "addressable functions". https://eel.is/c++draft/namespace.std#6

In Fs.cpp and DirectoryBlob.cpp, these examples used projections in a previous iteration of this commit, but no longer do. Still, they remain in this commit because the PR they would actually belong to is already merged.
2025-03-09 13:26:38 -07:00
mitaclaw
62b2b939b5 Simplify std::find_if with std::ranges::find and projections
In LabelMap.cpp, the code is currently unused so I was unable to test it.

In WiiUtils.cpp, the magic value `1u` was replaced by the constant value `DiscIO::PARTITION_UPDATE`.
2025-03-09 13:26:35 -07:00
Joshua Vandaële
fa442dc90b
Fix build with minizip-ng 4.0.8 2025-01-19 10:30:41 +01:00
mitaclaw
527841f1df Simplify std::search with Common::ContainsSubrange 2025-01-01 09:52:03 -08:00
mitaclaw
110d32729e Simplify std::find with Common::Contains
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-01 09:52:03 -08:00
JMC47
532a8621da
Merge pull request #13116 from mitaclaw/ranges-modernization-8-trivial-of
Ranges Algorithms Modernization - Of
2024-12-26 16:51:53 -05:00
mitaclaw
140252ffc0 Modernize std::any_of with ranges
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-15 19:54:16 -08:00
mitaclaw
860e6cf5cb Modernize std::all_of with ranges
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-15 19:50:34 -08:00
mitaclaw
826e2bbf98 StringUtil: More Wrappers For <cctype>
`Common::IsLower(char)` was omitted as nothing needed it.
2024-12-15 19:50:34 -08:00
mitaclaw
4fde0f2868 Modernize std::search with ranges
The new return value is `std::ranges::subrange`.
2024-10-17 18:38:34 -07:00
JosJuice
07605bf67c
Merge pull request #13090 from mitaclaw/ranges-modernization-1-trivial
Ranges Algorithms Modernization - Trivial
2024-10-15 17:08:55 +02:00
Jordan Woyak
23ba1c9133 DolphinQt: Restrict size of banner image in game properties info tab. 2024-10-11 22:56:33 -05:00
Tilka
d2a56b321f
Merge pull request #13095 from mitaclaw/ranges-modernization-6-n
Ranges Algorithms Modernization - N
2024-10-11 20:28:06 +01:00
Tilka
c1832d17f6
Merge pull request #13117 from mitaclaw/ranges-modernization-9-trivial-find
Ranges Algorithms Modernization - Find
2024-10-11 20:27:18 +01:00
mitaclaw
e8d5fb89e4 C++20: Synthesize operator!= From operator==
The inequality operator is automatically generated by the compiler if `operator==` is defined.
2024-10-10 20:23:55 -07:00
mitaclaw
e4fb837f4b Modernize std::find_if with ranges
In BTEmu.cpp, `std::mem_fn` was not necessary for the predicate to compile.
2024-10-10 15:28:11 -07:00
mitaclaw
728663bdc0 Modernize std::binary_search with ranges
In VolumeVerifier.cpp, constructing a `std::string_view` of the volume's GameID is unnecessary, as `std::`(`ranges::`)`binary_search` supports heterogeneous lookup. The usage in GameFile.cpp is a perfect example.
2024-10-10 00:53:48 -07:00
mitaclaw
ebf7cebc32 Modernize std::sort with ranges 2024-10-10 00:53:48 -07:00
mitaclaw
b6ec8ddc20 Simplify std::fill with std::fill_n 2024-10-07 15:34:56 -07:00
mitaclaw
7c96762f5f Simplify std::copy with std::copy_n
+ a surprise `std::memcpy` in VolumeVerifier.cpp.
2024-10-07 15:34:56 -07:00
mitaclaw
c60accc96d VolumeVerifier: Promote DEBUG_ASSERT to static_assert
This runtime assertion was added before `std::is_sorted` became constexpr in the codebase.
2024-09-28 23:12:12 -07:00
JosJuice
e72b23df91 DiscIO: Fix a typo in an RVZPack comment 2024-09-08 12:38:10 +02:00
Ferdinand Bachmann
6245dcd57d RVZ: Fix undefined behaviour when copying 0 bytes to a null pointer
A vector of length 0 can have a null data pointer, which causes UB when
passed to memcpy, so only copy when we actually have data to copy. This
caused crashes in certain cases when compiling Dolphin with Clang and
LTO enabled.
2024-08-27 18:16:43 +02:00
Dr. Dystopia
9602f36248 Remove redundant semicolons 2024-08-20 14:59:54 +02:00