Avoid copying large structs, prefer to pass by reference

This commit is contained in:
baldurk
2017-02-10 21:48:46 +00:00
parent 0dfe6e3a8e
commit 354a2707ae
6 changed files with 23 additions and 19 deletions
@@ -99,7 +99,7 @@ void ConstantBufferPreviewer::OnEventChanged(uint32_t eventID)
m_shader = m_Ctx.CurPipelineState.GetShader(m_stage);
QString entryPoint = m_Ctx.CurPipelineState.GetShaderEntryPoint(m_stage);
ShaderReflection *reflection = m_Ctx.CurPipelineState.GetShaderReflection(m_stage);
const ShaderReflection *reflection = m_Ctx.CurPipelineState.GetShaderReflection(m_stage);
updateLabels();
@@ -219,7 +219,7 @@ void ConstantBufferPreviewer::updateLabels()
needName = false;
}
ShaderReflection *reflection = m_Ctx.CurPipelineState.GetShaderReflection(m_stage);
const ShaderReflection *reflection = m_Ctx.CurPipelineState.GetShaderReflection(m_stage);
if(reflection != NULL)
{