mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +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 begin,
|
||||||
I end,
|
I end,
|
||||||
V& value) {
|
V& value) {
|
||||||
std::transform(str.begin(), str.end(), str.begin(),
|
str = Config::toLower(str);
|
||||||
[] (unsigned char c) { return (c >= 'A' && c <= 'Z') ? (c + 'a' - 'A') : c; });
|
|
||||||
|
|
||||||
for (auto i = begin; i != end; i++) {
|
for (auto i = begin; i != end; i++) {
|
||||||
if (str == i->first) {
|
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 Config getUserConfig();
|
||||||
|
|
||||||
|
static std::string toLower(std::string str);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
OptionMap m_options;
|
OptionMap m_options;
|
||||||
@ -149,4 +151,4 @@ namespace dxvk {
|
|||||||
option |= state == Tristate::True;
|
option |= state == Tristate::True;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user