1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-12 16:58:39 +00:00

Code style: Use non-static member initialisation instead of member initialiser lists for shader uniform names

Before this change,
the member type and member name are at one place,
and the member name and uniform name are at another place.
If the uniform name is written directly at the member declaration,
the member type, member name and uniform name are all at one place,
which leads to shorter code and may be easier to read.
This commit is contained in:
HybridDog 2024-01-07 18:54:31 +01:00 committed by Lars Müller
parent d98ea7fdb6
commit 345e93d19c
5 changed files with 82 additions and 136 deletions

View file

@ -47,10 +47,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
class CAOShaderConstantSetter : public IShaderConstantSetter
{
public:
CAOShaderConstantSetter():
m_emissive_color_setting("emissiveColor")
{}
~CAOShaderConstantSetter() override = default;
void onSetConstants(video::IMaterialRendererServices *services) override
@ -74,7 +70,8 @@ public:
private:
video::SColor m_emissive_color;
CachedPixelShaderSetting<float, 4> m_emissive_color_setting;
CachedPixelShaderSetting<float, 4>
m_emissive_color_setting{"emissiveColor"};
};
class CAOShaderConstantSetterFactory : public IShaderConstantSetterFactory