17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-18 09:09:19 +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

@@ -29,7 +29,7 @@ struct semaphore : public map_object
std::vector<basic_event *> events;
TMemCell *memcell = nullptr;
virtual gfx::basic_vertex vertex() override {
gfx::basic_vertex vertex() override {
bool stop_signal = memcell->IsVelocity() && (memcell->Value1() == 0.0);
return gfx::basic_vertex(location, glm::vec3(),
(!stop_signal) ? glm::vec2(0.0f, 0.2f) : glm::vec2(0.2f, 0.4f));
@@ -47,7 +47,7 @@ struct launcher : public map_object
level_crossing
} type;
virtual gfx::basic_vertex vertex() {
gfx::basic_vertex vertex() override {
return gfx::basic_vertex(location, glm::vec3(),
type == track_switch ? glm::vec2(0.4f, 0.6f) : glm::vec2(0.6f, 0.8f));
}
@@ -60,7 +60,7 @@ struct track_switch : public map_object
std::array<char[4], 4> preview;
std::array<TTrack*, 4> track = { nullptr };
virtual gfx::basic_vertex vertex() {
gfx::basic_vertex vertex() override {
return gfx::basic_vertex(location, glm::vec3(), glm::vec2(0.4f, 0.6f));
}
};
@@ -70,7 +70,7 @@ struct obstacle : public map_object
{
std::string model_name;
virtual gfx::basic_vertex vertex() {
gfx::basic_vertex vertex() override {
return gfx::basic_vertex(location, glm::vec3(), glm::vec2(0.8f, 1.0f));
}
};