From 49fe9f5db13f15460a49c5771ee0d2c6b8bfdc3c Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Tue, 12 Feb 2019 23:47:17 +0100 Subject: Use empty instead of size --- Source/Core/VideoCommon/PostProcessing.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Source/Core/VideoCommon/PostProcessing.cpp') 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; -- cgit v1.2.3