dolphin/Source
Lioncash de7e9557dc Common/IniFile: Make CaseInsensitiveStringCompare usable with heterogenous lookup
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.
2019-06-16 18:20:03 -04:00
..
Android Merge pull request #8165 from lioncash/linkage 2019-06-08 20:56:13 +10:00
Core Common/IniFile: Make CaseInsensitiveStringCompare usable with heterogenous lookup 2019-06-16 18:20:03 -04:00
DSPSpy DSPSpy: Add a test for accelerator loop 2017-09-22 20:17:38 +02:00
DSPTool Common/FileUtil: Make WriteStringToFile consistent with ReadFileToString 2019-05-29 07:06:53 -04:00
PCH CMake/Windows: Add PCH support 2019-05-15 19:28:04 +02:00
UnitTests Common/CommonFuncs: Remove now-unneccessary ArraySize function 2019-06-01 10:07:57 -04:00
VSProps VSProps: Add fmt directory to the list of additional includes 2019-06-14 13:48:39 -04:00
.clang-format clang-format: revert 'AfterCaseLabel' setting 2019-05-23 00:42:42 -04:00
CMakeLists.txt CMake/Windows: Add PCH support 2019-05-15 19:28:04 +02:00
dolphin-emu.sln Move Updater to WinUpdater 2019-04-10 10:46:49 +02:00