17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-29 15:07:29 +01:00

refactor(sonar): declare variables separately from their type definitions (cpp:S3646)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jerrrrycho
2026-10-10 16:33:12 +02:00
parent 319815cb0b
commit f19e64bc11
5 changed files with 19 additions and 9 deletions

View File

@@ -19,7 +19,7 @@ struct IMaterial
virtual texture_handle GetTexture(int slot) const = 0;
static IMaterial *null_material()
{
static struct NullMaterial : public IMaterial
struct NullMaterial : public IMaterial
{
void finalize(bool Loadnow) override { /* null implementation, nothing to do */ }
bool update() override
@@ -54,7 +54,8 @@ struct IMaterial
{
return 0;
}
} null_material{};
};
static NullMaterial null_material{};
return &null_material;
}
virtual ~IMaterial() = default;