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

refactor: sonar c++20 changes (#185)

This commit is contained in:
jerrrrycho
2026-09-28 21:08:15 +02:00
committed by GitHub
parent 4137f5504a
commit 176427f96b
18 changed files with 111 additions and 106 deletions

View File

@@ -281,7 +281,7 @@ void ui::scenerylist_panel::draw_trainset(trainset_desc &trainset)
for (auto &dyn_desc : trainset.vehicles) {
deferred_image *mini = nullptr;
if (dyn_desc.skin && dyn_desc.skin->mini.get() != -1)
if (dyn_desc.skin && dyn_desc.skin->mini.get() != (GLuint)-1)
mini = &dyn_desc.skin->mini;
else
mini = &placeholder_mini;

View File

@@ -270,7 +270,7 @@ bool ui::vehiclepicker_panel::selectable_image(const char *desc, bool selected,
}
GLuint tex = image->get();
if (tex != -1) {
if (tex != (GLuint)-1) {
glm::ivec2 size = image->size();
float width = 30.0f / size.y * size.x;
ImGui::SameLine(ImGui::GetContentRegionAvail().x - width);