dolphin/Source/Core
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
..
AudioCommon
Common Common/IniFile: Make CaseInsensitiveStringCompare usable with heterogenous lookup 2019-06-16 18:20:03 -04:00
Core Merge pull request #8186 from lioncash/view 2019-06-16 16:20:02 +02:00
DiscIO Merge pull request #8134 from JosJuice/filesystem-string-view 2019-06-08 20:52:34 +10:00
DolphinNoGUI
DolphinQt Merge pull request #8130 from 8times9/more-text-fixes 2019-06-14 12:30:27 -07:00
InputCommon Merge pull request #8117 from weihuoya/threaded_env 2019-06-08 20:42:15 +10:00
MacUpdater
UICommon Merge pull request #8165 from lioncash/linkage 2019-06-08 20:56:13 +10:00
UpdaterCommon General: Migrate from deprecated mbedTLS functions 2019-06-07 22:51:58 -04:00
VideoBackends Merge pull request #8049 from stenzek/crop 2019-06-08 20:57:52 +10:00
VideoCommon VideoCommon/RenderBase: Reset scissor rectangle after ImGui rendering 2019-06-15 07:12:17 -04:00
WinUpdater
CMakeLists.txt