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 Merge pull request #8135 from lioncash/cmake 2019-05-31 14:03:12 +02:00
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 Core/ConfigManager: Use forward declarations where applicable 2019-06-07 19:54:39 -04:00
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 Reformat repo to clang-format 7.0 rules 2019-05-06 18:48:04 +00:00
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 WinUpdater: Add CMakeLists.txt 2019-05-08 23:59:04 +02:00
CMakeLists.txt WinUpdater: Add CMakeLists.txt 2019-05-08 23:59:04 +02:00