17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 05:09:20 +02:00

refactor(sonar): use override instead of redundant virtual (cpp:S3471)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jerrrrycho
2026-10-10 14:55:56 +02:00
parent 79bd0c8e91
commit 8ce68e3d41
14 changed files with 213 additions and 213 deletions

View File

@@ -21,36 +21,36 @@ struct IMaterial
{
static struct NullMaterial : public IMaterial
{
virtual void finalize(bool Loadnow) override {}
virtual bool update() override
void finalize(bool Loadnow) override {}
bool update() override
{
return false;
}
virtual float get_or_guess_opacity() const override
float get_or_guess_opacity() const override
{
return 1.f;
}
virtual bool is_translucent() const override
bool is_translucent() const override
{
return false;
}
virtual glm::vec2 GetSize() const override
glm::vec2 GetSize() const override
{
return {-1.f, -1.f};
}
virtual std::string GetName() const override
std::string GetName() const override
{
return "";
}
virtual std::optional<float> GetSelfillum() const override
std::optional<float> GetSelfillum() const override
{
return std::nullopt;
}
virtual int GetShadowRank() const override
int GetShadowRank() const override
{
return 0;
}
virtual texture_handle GetTexture(int slot) const override
texture_handle GetTexture(int slot) const override
{
return 0;
}

View File

@@ -25,51 +25,51 @@ struct ITexture
{
static struct NullTexture : public ITexture
{
virtual bool create(bool Static = false) override
bool create(bool Static = false) override
{
return false;
}
virtual bool is_stub() const override
bool is_stub() const override
{
return false;
}
virtual int get_width() const override
int get_width() const override
{
return 1;
}
virtual int get_height() const override
int get_height() const override
{
return 1;
}
virtual size_t get_id() const override
size_t get_id() const override
{
return 0;
}
virtual void release() override {}
virtual void make_stub() override {}
virtual std::string_view get_traits() const override
void release() override {}
void make_stub() override {}
std::string_view get_traits() const override
{
return "";
}
virtual std::string_view get_name() const override
std::string_view get_name() const override
{
return "";
}
virtual std::string_view get_type() const override
std::string_view get_type() const override
{
return "";
}
virtual bool get_has_alpha() const override
bool get_has_alpha() const override
{
return false;
}
virtual bool get_is_ready() const override
bool get_is_ready() const override
{
return false;
}
virtual void set_components_hint(int hint) override {}
virtual void make_from_memory(size_t width, size_t height, const uint8_t *data) override {}
virtual void update_from_memory(size_t width, size_t height, const uint8_t *data) override {}
void set_components_hint(int hint) override {}
void make_from_memory(size_t width, size_t height, const uint8_t *data) override {}
void update_from_memory(size_t width, size_t height, const uint8_t *data) override {}
} null_texture{};
return &null_texture;
}