diff options
| author | Filip Gawin <filip.gawin@zoho.com> | 2019-02-12 23:47:17 +0100 |
|---|---|---|
| committer | Filip Gawin <filip.gawin@zoho.com> | 2019-02-13 00:03:49 +0100 |
| commit | 49fe9f5db13f15460a49c5771ee0d2c6b8bfdc3c (patch) | |
| tree | d5bbc9e6df9ade7cd4e6917af5cc0f286eaa91ff /Source/Core/VideoCommon/PostProcessing.cpp | |
| parent | 363ce67459fd48253d2a38cf2528c7465db49911 (diff) | |
Use empty instead of size
Diffstat (limited to 'Source/Core/VideoCommon/PostProcessing.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/PostProcessing.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/Core/VideoCommon/PostProcessing.cpp b/Source/Core/VideoCommon/PostProcessing.cpp index 756bcea5e0..a83469e451 100644 --- a/Source/Core/VideoCommon/PostProcessing.cpp +++ b/Source/Core/VideoCommon/PostProcessing.cpp @@ -70,7 +70,7 @@ PostProcessingShaderConfiguration::~PostProcessingShaderConfiguration() = defaul std::string PostProcessingShaderConfiguration::LoadShader(std::string shader) { // Load the shader from the configuration if there isn't one sent to us. - if (shader == "") + if (shader.empty()) shader = g_ActiveConfig.sPostProcessingShader; m_current_shader = shader; @@ -81,7 +81,7 @@ std::string PostProcessingShaderConfiguration::LoadShader(std::string shader) std::string code; std::string path = File::GetUserPath(D_SHADERS_IDX) + sub_dir + shader + ".glsl"; - if (shader == "") + if (shader.empty()) { code = s_default_shader; } @@ -150,7 +150,7 @@ void PostProcessingShaderConfiguration::LoadOptions(const std::string& code) } #endif - if (line.size() > 0) + if (!line.empty()) { if (line[0] == '[') { @@ -171,7 +171,7 @@ void PostProcessingShaderConfiguration::LoadOptions(const std::string& code) std::string key, value; IniFile::ParseLine(line, &key, &value); - if (!(key == "" && value == "")) + if (!(key.empty() && value.empty())) current_strings->m_options.emplace_back(key, value); } } @@ -272,7 +272,7 @@ void PostProcessingShaderConfiguration::LoadOptionsConfiguration() { std::string value; ini.GetOrCreateSection(section)->Get(it.second.m_option_name, &value); - if (value != "") + if (!value.empty()) TryParseVector(value, &it.second.m_integer_values); } break; @@ -280,7 +280,7 @@ void PostProcessingShaderConfiguration::LoadOptionsConfiguration() { std::string value; ini.GetOrCreateSection(section)->Get(it.second.m_option_name, &value); - if (value != "") + if (!value.empty()) TryParseVector(value, &it.second.m_float_values); } break; |
