pass pointers instead of const references to be more idiomatic

This commit is contained in:
goeiecool9999 2024-12-16 15:10:33 +01:00
parent 40219e204a
commit 8512c1b474
2 changed files with 4 additions and 4 deletions

View file

@ -146,7 +146,7 @@ void RendererOutputShader::SetUniformParameters(const LatteTextureView& texture_
{
sint32 effectiveWidth, effectiveHeight;
texture_view.baseTexture->GetEffectiveSize(effectiveWidth, effectiveHeight, 0);
auto setUniforms = [&](const std::unique_ptr<RendererShader>& shader, const UniformLocations& locations){
auto setUniforms = [&](RendererShader* shader, const UniformLocations& locations){
float res[2];
if (locations.m_loc_textureSrcResolution != -1)
{
@ -169,8 +169,8 @@ void RendererOutputShader::SetUniformParameters(const LatteTextureView& texture_
shader->SetUniform2fv(locations.m_loc_outputResolution, res, 1);
}
};
setUniforms(m_vertex_shader, m_uniformLocations[0]);
setUniforms(m_fragment_shader, m_uniformLocations[1]);
setUniforms(m_vertex_shader.get(), m_uniformLocations[0]);
setUniforms(m_fragment_shader.get(), m_uniformLocations[1]);
}
RendererOutputShader* RendererOutputShader::s_copy_shader;

View file

@ -138,7 +138,7 @@ public:
// memory management
std::unique_ptr<VKRMemoryManager> memoryManager;
const std::unique_ptr<VKRMemoryManager>& GetMemoryManager() const { return memoryManager; };
VKRMemoryManager* GetMemoryManager() const { return memoryManager.get(); };
VkSupportedFormatInfo_t m_supportedFormatInfo;