Browse files

PostProcessing: Default constructor and destructor of PostProcessingS…


Also ensure that all members of the class are initialized on
construction as well. Previously the bool indicating if options are
dirty wouldn't be initialized, which could be read uninitialized if an
instance was constructed and then IsDirty() is called.
  • Loading branch information...
lioncash committed May 21, 2018
1 parent 42a1545 commit f9c20571ab3b0be276e17593abbbd7fe6795daa9
Showing with 8 additions and 3 deletions.
  1. +4 −0 Source/Core/VideoCommon/PostProcessing.cpp
  2. +4 −3 Source/Core/VideoCommon/PostProcessing.h
@@ -63,6 +63,10 @@ std::vector<std::string> PostProcessingShaderImplementation::GetAnaglyphShaderLi
return {};
PostProcessingShaderConfiguration::PostProcessingShaderConfiguration() = default;
PostProcessingShaderConfiguration::~PostProcessingShaderConfiguration() = default;
std::string PostProcessingShaderConfiguration::LoadShader(std::string shader)
// Load the shader from the configuration if there isn't one sent to us.
@@ -48,8 +48,9 @@ class PostProcessingShaderConfiguration
typedef std::map<std::string, ConfigurationOption> ConfigMap;
PostProcessingShaderConfiguration() : m_current_shader("") {}
virtual ~PostProcessingShaderConfiguration() {}
virtual ~PostProcessingShaderConfiguration();
// Loads the configuration with a shader
// If the argument is "" the class will load the shader from the g_activeConfig option.
// Returns the loaded shader source from file
@@ -69,7 +70,7 @@ class PostProcessingShaderConfiguration
void SetOptionb(const std::string& option, bool value);
bool m_any_options_dirty;
bool m_any_options_dirty = false;
std::string m_current_shader;
ConfigMap m_options;

0 comments on commit f9c2057

Please sign in to comment.