mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-12 13:08:50 +01:00
[util] Move toLower transform to function
This commit is contained in:
parent
11f8b8ba44
commit
eb9dfcedbd
@ -635,8 +635,7 @@ namespace dxvk {
|
||||
I begin,
|
||||
I end,
|
||||
V& value) {
|
||||
std::transform(str.begin(), str.end(), str.begin(),
|
||||
[] (unsigned char c) { return (c >= 'A' && c <= 'Z') ? (c + 'a' - 'A') : c; });
|
||||
str = Config::toLower(str);
|
||||
|
||||
for (auto i = begin; i != end; i++) {
|
||||
if (str == i->first) {
|
||||
@ -708,4 +707,10 @@ namespace dxvk {
|
||||
}
|
||||
}
|
||||
|
||||
std::string Config::toLower(std::string str) {
|
||||
std::transform(str.begin(), str.end(), str.begin(),
|
||||
[] (unsigned char c) { return (c >= 'A' && c <= 'Z') ? (c + 'a' - 'A') : c; });
|
||||
return str;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -102,6 +102,8 @@ namespace dxvk {
|
||||
*/
|
||||
static Config getUserConfig();
|
||||
|
||||
static std::string toLower(std::string str);
|
||||
|
||||
private:
|
||||
|
||||
OptionMap m_options;
|
||||
@ -149,4 +151,4 @@ namespace dxvk {
|
||||
option |= state == Tristate::True;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user