<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dolphin/Source/Core/Common/IniFile.h, branch 2512</title>
<subtitle>GameCube and Wii emulator</subtitle>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/'/>
<entry>
<title>IniFile: Migrate `Common::CaseInsensitiveLess` to StringUtil</title>
<updated>2024-09-22T06:15:42+00:00</updated>
<author>
<name>mitaclaw</name>
<email>140017135+mitaclaw@users.noreply.github.com</email>
</author>
<published>2024-09-22T05:32:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=508ccc2054590a9efa89054e742b74521f272063'/>
<id>508ccc2054590a9efa89054e742b74521f272063</id>
<content type='text'>
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++).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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++).
</pre>
</div>
</content>
</entry>
<entry>
<title>Common/IniFile: Move interface into Common namespace</title>
<updated>2023-04-13T14:19:28+00:00</updated>
<author>
<name>Lioncash</name>
<email>mai.iam2048@gmail.com</email>
</author>
<published>2023-04-13T13:38:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=e4caace6bb6213851b979cdd76f9f44ef6d9cd09'/>
<id>e4caace6bb6213851b979cdd76f9f44ef6d9cd09</id>
<content type='text'>
Gets this out of the global namespace and into the Common namespace
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Gets this out of the global namespace and into the Common namespace
</pre>
</div>
</content>
</entry>
<entry>
<title>Use Common::ToLower and Common::ToUpper</title>
<updated>2022-01-17T01:00:12+00:00</updated>
<author>
<name>Pokechu22</name>
<email>Pokechu022@gmail.com</email>
</author>
<published>2022-01-17T00:38:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=6e5f4125e32f545a61e611720fd30c051b691d62'/>
<id>6e5f4125e32f545a61e611720fd30c051b691d62</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: convert GPLv2+ license info to SPDX tags</title>
<updated>2021-07-05T02:35:56+00:00</updated>
<author>
<name>Pierre Bourdon</name>
<email>delroth@gmail.com</email>
</author>
<published>2021-07-05T01:22:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=e149ad4f0a9874f354221a7fc76d8f1841e47808'/>
<id>e149ad4f0a9874f354221a7fc76d8f1841e47808</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Common: Move 'GetSection' functions to be public</title>
<updated>2021-02-27T18:21:23+00:00</updated>
<author>
<name>iwubcode</name>
<email>iwubcode@users.noreply.github.com</email>
</author>
<published>2021-02-27T18:21:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=158674c274228fc88cec318959d28a3661126a99'/>
<id>158674c274228fc88cec318959d28a3661126a99</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Common/IniFile: Add Exists function for section name only</title>
<updated>2020-02-29T06:39:36+00:00</updated>
<author>
<name>Techjar</name>
<email>tecknojar@gmail.com</email>
</author>
<published>2020-02-29T06:37:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=08c95883e9c9f367902ccf188576d03abcac2731'/>
<id>08c95883e9c9f367902ccf188576d03abcac2731</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Common/Core: Minor rvalue reference related cleanups.</title>
<updated>2020-01-24T04:58:23+00:00</updated>
<author>
<name>Jordan Woyak</name>
<email>jordan.woyak@gmail.com</email>
</author>
<published>2020-01-24T04:58:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=732032cdb26e919b153f16ca07f8d7fa709c11e8'/>
<id>732032cdb26e919b153f16ca07f8d7fa709c11e8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>StringUtil: Use std::string_view more</title>
<updated>2019-07-23T12:49:12+00:00</updated>
<author>
<name>JosJuice</name>
<email>josjuice@gmail.com</email>
</author>
<published>2019-07-08T11:35:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=a2a1e04fc9c26c7d4ae8af5d1229a906c0ae066d'/>
<id>a2a1e04fc9c26c7d4ae8af5d1229a906c0ae066d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Common/IniFile: Make use of std::string_view where applicable</title>
<updated>2019-06-16T22:20:08+00:00</updated>
<author>
<name>Lioncash</name>
<email>mathew1800@gmail.com</email>
</author>
<published>2019-06-16T21:28:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=78d171625186eb1018f8827d48e3cc3a9185bca2'/>
<id>78d171625186eb1018f8827d48e3cc3a9185bca2</id>
<content type='text'>
Now that the std::map less-than comparitor is capable of being used with
heterogenous lookup, we're able to convert many of the querying
functions that took std::string references over to std::string_view.

Now these functions may be used without potentially allocating a
std::string instance unnecessarily.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that the std::map less-than comparitor is capable of being used with
heterogenous lookup, we're able to convert many of the querying
functions that took std::string references over to std::string_view.

Now these functions may be used without potentially allocating a
std::string instance unnecessarily.
</pre>
</div>
</content>
</entry>
<entry>
<title>Common/IniFile: Make CaseInsensitiveStringCompare usable with heterogenous lookup</title>
<updated>2019-06-16T22:20:03+00:00</updated>
<author>
<name>Lioncash</name>
<email>mathew1800@gmail.com</email>
</author>
<published>2019-06-16T20:57:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=de7e9557dceb29de00b301a56df81a6ca419c772'/>
<id>de7e9557dceb29de00b301a56df81a6ca419c772</id>
<content type='text'>
Previously, when performing find() operations or indexing operations on
the section map, it would need to operate on a std::string key.

This means cases like:

map.find(some_string_view)

aren't usable, which kind of sucks, especially given for most cases, we
use regular string literals to perform operations in calling code.
However, since C++14, it's possible to use heterogenous lookup to avoid
needing to construct exact key types. In otherwords, we can perform the
above or use string literals without constructing a std::string instance
around them implicitly.

We simply need to specify a member type within our comparison struct
named is_transparent, to allow std::map to perform automatic type
deduction.

We also slightly alter the algorithm to an equivalent compatible with
std::string_view (which need not be null-terminated), as strcasecmp
requires null-terminated strings.

While we're at it, we can also provide a helper function to the struct
for comparing string equality rather than only less than. This allows
removing other usages of strcasecmp in other functions, allowing for the
transition of them to std::string_view.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, when performing find() operations or indexing operations on
the section map, it would need to operate on a std::string key.

This means cases like:

map.find(some_string_view)

aren't usable, which kind of sucks, especially given for most cases, we
use regular string literals to perform operations in calling code.
However, since C++14, it's possible to use heterogenous lookup to avoid
needing to construct exact key types. In otherwords, we can perform the
above or use string literals without constructing a std::string instance
around them implicitly.

We simply need to specify a member type within our comparison struct
named is_transparent, to allow std::map to perform automatic type
deduction.

We also slightly alter the algorithm to an equivalent compatible with
std::string_view (which need not be null-terminated), as strcasecmp
requires null-terminated strings.

While we're at it, we can also provide a helper function to the struct
for comparing string equality rather than only less than. This allows
removing other usages of strcasecmp in other functions, allowing for the
transition of them to std::string_view.
</pre>
</div>
</content>
</entry>
</feed>
