Fixed warnings

This commit is contained in:
enricoturri1966 2023-03-09 09:49:55 +01:00
parent f1b4181cd1
commit 9ab132ca44
3 changed files with 4 additions and 7 deletions

View File

@ -494,7 +494,7 @@ int GLVolumeCollection::load_wipe_tower_preview(
height = 0.1f; height = 0.1f;
static const float brim_height = 0.2f; static const float brim_height = 0.2f;
const float scaled_brim_height = brim_height / height; // const float scaled_brim_height = brim_height / height;
TriangleMesh mesh; TriangleMesh mesh;
ColorRGBA color = ColorRGBA::DARK_YELLOW(); ColorRGBA color = ColorRGBA::DARK_YELLOW();

View File

@ -7137,11 +7137,10 @@ const ModelVolume *get_model_volume(const GLVolume &v, const Model &model)
{ {
const ModelVolume * ret = nullptr; const ModelVolume * ret = nullptr;
if (v.object_idx() < model.objects.size()) { if (v.object_idx() < (int)model.objects.size()) {
const ModelObject *obj = model.objects[v.object_idx()]; const ModelObject *obj = model.objects[v.object_idx()];
if (v.volume_idx() < obj->volumes.size()) { if (v.volume_idx() < (int)obj->volumes.size())
ret = obj->volumes[v.volume_idx()]; ret = obj->volumes[v.volume_idx()];
}
} }
return ret; return ret;

View File

@ -58,7 +58,7 @@ std::string GLGizmoScale3D::get_tooltip() const
static int constraint_id(int grabber_id) static int constraint_id(int grabber_id)
{ {
static const std::vector<int> id_map = { 1, 0, 3, 2, 5, 4, 8, 9, 6, 7 }; static const std::vector<int> id_map = { 1, 0, 3, 2, 5, 4, 8, 9, 6, 7 };
return (0 <= grabber_id && grabber_id < id_map.size()) ? id_map[grabber_id] : -1; return (0 <= grabber_id && grabber_id < (int)id_map.size()) ? id_map[grabber_id] : -1;
} }
bool GLGizmoScale3D::on_mouse(const wxMouseEvent &mouse_event) bool GLGizmoScale3D::on_mouse(const wxMouseEvent &mouse_event)
@ -157,8 +157,6 @@ void GLGizmoScale3D::on_dragging(const UpdateData& data)
void GLGizmoScale3D::on_render() void GLGizmoScale3D::on_render()
{ {
const Selection& selection = m_parent.get_selection();
glsafe(::glClear(GL_DEPTH_BUFFER_BIT)); glsafe(::glClear(GL_DEPTH_BUFFER_BIT));
glsafe(::glEnable(GL_DEPTH_TEST)); glsafe(::glEnable(GL_DEPTH_TEST));