175 Commits

Author SHA1 Message Date
Amber Brault 3f5460a5ff Core: Implement automatic symbol demangling 2026-05-07 09:25:28 +02:00
Jordan Woyak 5588fe0022 Merge pull request #14308 from jordan-woyak/character-encoding
StringUtil: Make UTF16ToUTF8 and UTF8ToUTF16 use custom encoding/decoding implementation.
2026-04-25 14:59:27 -05:00
Jordan Woyak ff57599e67 StringUtil: Make UTF16ToUTF8 and UTF8ToUTF16 use custom encoding/decoding implementation to eliminate usage of deprecated std::wstring_convert. 2026-04-18 13:06:17 -05:00
Martino Fontana 95dec13203 Improve usage of std::move and const references parameters
Accomplished using `run-clang-tidy` with `performance-move-const-arg,performance-unnecessary-value-param,modernize-pass-by-value`.

Changed arguments to const references, removed them where inappropriate (e.g. sink parameters). Same with std::move.

Manually reviewed each change to make sure that it makes sense, and do something more appropriate if possible.
2026-04-17 12:39:46 +02:00
Jordan Woyak cbd43914a5 Network: Improve IPv4PortRange::ToString to support CIDR notation and only last octet difference. 2026-02-15 23:13:18 -06:00
Jordan Woyak 5545798e00 Common/Network: Add structs: IPv4Port, IPv4PortRange and functions: IPAddressToString, ParseIPv4PortRange. 2026-02-15 20:14:15 -06:00
Jordan Woyak 97ad5ad1a1 StringUtil: Add SplitStringIntoArray function template. 2026-02-15 20:14:15 -06:00
Jordan Woyak dd2b94cd4a Merge pull request #13594 from jordan-woyak/state-cleanups
State: Simplify interthread communication and general cleanups.
2026-02-03 16:50:52 -06:00
Martino Fontana a14c88ba67 Remove unused imports
Yellow squiggly lines begone!
Done automatically on .cpp files through `run-clang-tidy`, with manual corrections to the mistakes.
If an import is directly used, but is technically unnecessary since it's recursively imported by something else, it is *not* removed.
The tool doesn't touch .h files, so I did some of them by hand while fixing errors due to old recursive imports.
Not everything is removed, but the cleanup should be substantial enough.
Because this done on Linux, code that isn't used on it is mostly untouched.
(Hopefully no open PR is depending on these imports...)
2026-01-25 16:12:15 +01:00
Jordan Woyak 1d9e475123 Common: Add TransferableSharedMutex class and unit tests. 2026-01-19 21:56:59 -06:00
Sintendo 1e0473e44f Fix various typos and spelling mistakes 2026-01-17 20:11:38 +01:00
Jordan Woyak 405baed805 Common: Add a DirectIOFile class that allows for copies which are entirely thread safe. 2025-11-09 03:08:14 -06:00
JosJuice 958db7c78c Merge pull request #14020 from jordan-woyak/string-util-cleanups
StringUtil: Cleanups and add some character encoding conversion unit tests.
2025-11-08 17:36:54 +01:00
Jordan Woyak 46369ef1b1 Common: Add AtomicMutex and SpinMutex classes as faster alternatives to std::mutex. 2025-11-02 20:45:55 -06:00
Jordan Woyak 0ebc54a0fa UnitTests: Add some StringUtil character encoding conversion tests. 2025-11-02 00:36:04 -05:00
Martino Fontana f6e5448b43 Jit64: Dynamic length of regular jump instruction (for known addresses)
Conditional jumps already do that, so let's be consistent.
2025-10-08 00:15:57 +02:00
JMC47 fce5f7c74e Merge pull request #13874 from sepalani/bitcast-ptr
Common/BitUtils: Add operator[] to BitCastPtrType
2025-09-17 04:42:22 -04:00
Jordan Woyak da546bebb8 MathUtil: Simplify SaturatingCast implementation with std::cmp_less/cmp_greater and fix a floating point edge case.
Thanks to Dentomologist for catching the edge case.
2025-08-27 21:24:46 -05:00
Sepalani e9f58193a7 Common/BitUtils: Add operator[] to BitCastPtrType 2025-08-18 13:06:12 +04:00
Joshua Vandaële f8b85edd0c Qt: Better wayland detection to enforce xcb
In certain cases, the platform can be "wayland-egl", "wayland-xcomposite", and other values for which I haven't found a full list yet. Instead of matching only "wayland", we now look for "wayland" anywhere in the `QT_QPA_PLATFORM` string in a case-insensitive manner.

Acknowledgements:
`CaseInsensitiveContains`' implementation was heavily inspired by GNU's non-standard glibc `strcasestr` function, which can be found here licensed under GPLv2 or later: https://ftp.gnu.org/gnu/libc/
2025-08-04 19:34:31 +02:00
Joshua Vandaële 06882bd2dc Fix various warnings 2025-07-12 12:47:30 +02:00
Dr. Dystopia ca8f9b672b Source: Remove redundant lambda parameter lists 2025-06-14 10:19:31 +02:00
Dr. Dystopia 2102108b1a UnitTests: Remove redundant template type specifers 2025-05-16 21:09:52 +02:00
Dr. Dystopia 762555c984 UnitTests/Common: Use std::size for size calculation 2025-05-16 14:59:55 +02:00
Jordan Woyak 1c54583ae7 Merge pull request #13569 from tygyh/UnitTests-Use-constexpr
UnitTests: Use `constexpr`
2025-05-07 15:48:26 -05:00
Jordan Woyak e8b63fe090 UnitTests: Add tests for WorkQueueThread. 2025-04-30 14:31:51 -05:00
Tilka 805307f432 Merge pull request #13451 from vyuuui/numeric_labels
Add numeric label support to assembler
2025-04-25 01:56:43 +01:00
Dr. Dystopia 947bdea590 UnitTests: Use constexpr 2025-04-23 12:45:08 +02:00
Jordan Woyak af960651e8 Common: SPSCQueue cleanups and improvements. 2025-04-22 23:49:32 -05:00
vyuuui e34907025d Add numeric label support to assembler 2025-03-24 18:59:32 -07:00
Niel Lebeck e5e3944d55 Add a SplitPath unit test exercising Windows paths with drive letters 2025-01-29 22:07:19 -08:00
Sintendo 532e25be12 Fix several minor warnings 2025-01-06 11:31:39 +01:00
Niel Lebeck bae4616dd1 Add some unit test coverage of the SplitPath function 2024-12-26 11:42:01 -08:00
JMC47 aa8226fa88 Merge pull request #12744 from nlebeck/settingshandler-split-2
Split `SettingsHandler` into separate reader and writer classes
2024-10-27 19:23:05 -04:00
Admiral H. Curtiss c13c11d230 Add missing algorithm header in SettingsHandlerTest.cpp 2024-10-22 23:48:43 +02:00
Niel Lebeck 1d79991ec4 Split SettingsHandler into separate reader and writer classes 2024-10-21 20:20:15 -07:00
mitaclaw 249defa72b Modernize std::equal with ranges 2024-10-10 00:53:48 -07:00
mitaclaw 5f90673686 StringUtil: Remove JoinStrings
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-22 21:09:36 -07:00
Alfred Wingate d7c93d87be Add support for libfmt-11
fmt::join was moved into fmt/ranges.h

Signed-off-by: Alfred Wingate <parona@protonmail.com>
2024-08-22 16:54:35 +03:00
Niel Lebeck 9b0dcc83d1 Add some unit tests for the Rectangle class 2024-06-09 16:28:35 -07:00
JosJuice 2c91367429 Merge pull request #12737 from nlebeck/settingshandler-split
Eliminate SettingsHandler's `SetBytes` and `Reset` methods
2024-05-05 22:35:23 +02:00
Pokechu22 fbbfea8e8e Replace Common::BitCast with std::bit_cast 2024-05-03 18:43:51 -07:00
Niel Lebeck 36cdb4a544 Eliminate SettingsHandler's SetBytes and Reset methods
Also make the `Decrypt` method private.

As far as I can tell, the only motivation for exposing the `SetBytes`
and `Reset` methods is to allow `CBoot::SetupWiiMemory` to use the same
`SettingsHandler` instance to read settings data and then write it back.
It seems cleaner to just use two separate instances, and require a given
`SettingsHandler` instance to be used for either writing data to a
buffer or reading data from a buffer, but not both.

A natural next step is to split the `SettingsHandler` class into two
classes, one for writing data and one for reading data. I've deferred
that change for a future PR.
2024-04-23 17:19:01 -07:00
Niel Lebeck d2b96736e0 Pass SettingsHandler buffers by const ref instead of rvalue ref 2024-04-12 18:50:21 -07:00
Niel Lebeck 9029b7a082 Add SettingsHandler unit tests exercising the edge case in PR #8704 2024-03-06 22:08:30 -08:00
Niel Lebeck 0344ec6d79 Add simple unit tests for SettingsHandler 2024-03-01 20:52:45 -08:00
Dentomologist 7dbf463ddf BitSet64: Fix iterator incrementation
Use 1 of the same type as the stored value when shifting left. This
prevents undefined behavior caused by shifting an int more than 31 bits.

Previously iterator incrementation could either hang or prematurely
report it had reached the end of the bitset.
2024-01-01 00:41:48 -08:00
Dentomologist 58c5ae3de9 UnitTests: Refactor BitSetTest
Group numbers and their bitcounts together in pairs, which allows for
range-based loop iteration.
2023-12-31 12:10:50 -08:00
Tilka 773ffd04b8 Merge pull request #11497 from vyuuui/debugger_assembler_ui
Built-in assembler for debugger interface
2023-12-16 21:15:31 +00:00
vyuuui 00e94d3630 Added tests 2023-12-13 05:32:47 -08:00