diff options
| author | Léo Lam <leo@innovatetechnologi.es> | 2018-05-11 20:34:39 +0200 |
|---|---|---|
| committer | Léo Lam <leo@innovatetechnologi.es> | 2018-05-12 14:30:18 +0200 |
| commit | 7dca7c237eb9ae40765e581317df6df4b4fc1ad4 (patch) | |
| tree | 05b455cac6424a82939198cbc423bcb837c78bd2 /Source/Core/DolphinWX/Frame.cpp | |
| parent | f0c5b761865946f273b6b6937aa47f8b10c745a5 (diff) | |
Config: Fix template deduction for implicit conversions
This excludes the second argument from template deduction.
Otherwise, it is required to manually cast the second argument to
the ConfigInfo type (because implicit conversions won't work).
e.g. to set the value for a ConfigInfo<std::string> from a string
literal, you'd need a ugly `std::string("yourstring")`.
Diffstat (limited to 'Source/Core/DolphinWX/Frame.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/Frame.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 57b9aadb3a..212c32430d 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -1524,7 +1524,7 @@ void CFrame::ParseHotkeys() // turned off when selecting other stereoscopy modes. if (g_Config.sPostProcessingShader == "dubois") { - Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string("")); + Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, ""); } Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(StereoMode::SBS)); } @@ -1539,7 +1539,7 @@ void CFrame::ParseHotkeys() { if (g_Config.sPostProcessingShader == "dubois") { - Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string("")); + Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, ""); } Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(StereoMode::TAB)); } @@ -1555,12 +1555,12 @@ void CFrame::ParseHotkeys() // Setting the anaglyph mode also requires a specific // post-processing shader to be activated. Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(StereoMode::Anaglyph)); - Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string("dubois")); + Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, "dubois"); } else { Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(StereoMode::Off)); - Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string("")); + Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, ""); } } if (IsHotkey(HK_TOGGLE_STEREO_3DVISION)) @@ -1569,7 +1569,7 @@ void CFrame::ParseHotkeys() { if (g_Config.sPostProcessingShader == "dubois") { - Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string("")); + Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, ""); } Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(StereoMode::Nvidia3DVision)); } |
