| Age | Commit message (Collapse) | Author |
|
|
|
In StringUtil.h, the lambdas wrapping `Common::ToLower(char)` and `Common::ToUpper(char)` were only necessary due to the function names being overloaded.
|
|
|
|
IniFile: Migrate `Common::CaseInsensitiveLess` to StringUtil
|
|
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.
|
|
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++).
|
|
fmt::join was moved into fmt/ranges.h
Signed-off-by: Alfred Wingate <parona@protonmail.com>
|
|
NetBSD doesn't put packages in /usr/local like /CMakeLists.txt thought.
The `#ifdef __NetBSD__` around iconv was actually breaking compilation
on NetBSD when using the system libiconv (there's also a GNU iconv
package)
A C program included from C++ source broke on NetBSD specifically, work
around it.
This doesn't fix compilation on NetBSD, which is currently broken, but
is closer to correct.
|
|
|
|
|
|
Now superseded by Common::FromChars
|
|
|
|
|
|
|
|
|
|
|
|
There's nothing really about this that would need to constrain it to
only std::string instances.
|
|
Obsoletes these functions in favor of the standard member functions
added in C++20.
|
|
just use std::filesystem
|
|
CPUDetect: improve win/arm64 support
|
|
read brand_string on macos/arm64
remove unused flags
report family/model info instead of vendor name
|
|
StripWhitespace maintains old behavior
|
|
forward slashes on Windows.
|
|
|
|
|
|
|
|
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
|
|
|
|
The control expression editor allows line breaks, but the serialization was
losing anything after the first line break (/r /n).
Instead of opting to encode them and decode them on serialization
(which I tried but was not safe, as it would lose /n written in the string by users),
I opted to replace them with a space.
|
|
|
|
Continues the migration of our code over to the fmt logger.
|
|
CommandLineParse expects UTF-8 strings. (QApplication, on the
other hand, seems to be designed so that you can pass in the
char** argv untouched on Windows and get proper Unicode handling.)
|
|
Android: Use correct encoding when converting strings
|
|
Ridiculously long nicknames cause UI silliness, so 30 characters seems
like a reasonable limit, as it's the same as the forum.
|
|
The functions with "UTF" in the name use "modified UTF-8" rather
than the standard UTF-8 which Dolphin uses, at least according
to Oracle's documentation, so it is incorrect for us to use them.
This change fixes the problem by converting between UTF-8 and
UTF-16 manually instead of letting JNI do it for us.
|
|
Probably not something we would run into in practice since
Windows uses a separate implementation, but let's do it
for the sake of correctness.
|
|
This function does *not* always convert from UTF-16. It converts
from UTF-16 on Windows and UTF-32 on other operating systems.
Also renaming UTF8ToUTF16 for consistency, even though it
technically doesn't have the same problem since it only was
implemented on Windows.
|
|
|
|
|
|
Add a function that safely returns whether a character is printable
i.e. whether 0x20 <= c <= 0x7e is true.
This is done in several places in our codebase and it's easy to run
into undefined behaviour if the C version defined in <cctype>
is used instead of this one, since its behaviour is undefined
if the character is not representable as an unsigned char.
This fixes MemoryViewWidget.
|
|
|
|
where possible.
This removes std::iostream from the inheritance chain, which reduces
overhead slightly.
|
|
|
|
|
|
|
|
|
|
Begins the transition to using fmt for string formatting where
applicable. Given fmt supports formatting std::string instances out of
the box, we can remove now-unnecessary calls to .c_str() and .data().
Note that this change does not touch the actual logging subsystem aside
from converting the final StringFromFormat call in the process over to
fmt::format. Given our logging system is heavily used throughout the
entire codebase, and converting that over will be quite a large change
by itself, this will be tackled near the end of the conversion process.
|
|
|
|
|
|
Doesn't make a lot of sense to have a function that gives the string
representation for a string.
|