Fix warnings

This commit is contained in:
Filip Sykala - NTB T15p 2022-08-02 13:29:30 +02:00
parent 2fdcdad796
commit 7770034492
5 changed files with 6 additions and 18 deletions

View File

@ -2986,7 +2986,7 @@ std::vector<bool> priv::select_patches(
if (d.patch_index == std::numeric_limits<uint32_t>::max()) continue;
if (result[d.patch_index]) continue;
// Add all connected patches
// This is way to add patche without source shape point
// This is way to add patche(from other models) without source shape point
// 1. Patches inside of shape
// 2. Patches crossing outline between shape points
@ -3008,7 +3008,6 @@ std::vector<bool> priv::select_patches(
if (patch.shape_id != patch2.shape_id) continue;
BoundingBoxf3 bb2 = extend_bb(patch2.bb);
if (!bb.intersects(bb2)) continue;
if (!in_distances[patch_index2]) {
// TODO: check that really exist shared outline between patches

View File

@ -1,4 +1,5 @@
#include "NSVGUtils.hpp"
#include "ClipperUtils.hpp"
using namespace Slic3r;

View File

@ -1607,7 +1607,6 @@ void GLGizmoEmboss::draw_style_save_as_popup() {
void GLGizmoEmboss::draw_style_add_button()
{
bool start_save_as = false;
bool only_add_style = !m_style_manager.exist_stored_style();
bool can_add = true;
if (only_add_style &&
@ -1726,7 +1725,7 @@ void GLGizmoEmboss::draw_delete_style_button() {
void GLGizmoEmboss::discard_changes_in_style()
{
assert(m_style_manager.exist_stored_style());
if (!m_style_manager.exist_stored_style()) return;
FontItem &font_item = m_style_manager.get_font_item();
const FontItem* stored_fi = m_style_manager.get_stored_font_item();
@ -1852,17 +1851,6 @@ void GLGizmoEmboss::draw_style_list() {
ImGui::SameLine();
draw_style_rename_button();
// Is style changed against stored one
FontItem &font_item = m_style_manager.get_font_item();
const FontItem *stored_fi = nullptr;
if (m_style_manager.exist_stored_style())
stored_fi = m_style_manager.get_stored_font_item();
bool is_stored = stored_fi != nullptr;
bool is_changed = (is_stored) ? !(*stored_fi == font_item) : true;
// TODO: check order of font items in list to allowe save actual order
ImGui::SameLine();
draw_style_save_button();

View File

@ -108,8 +108,8 @@ void CreateFontStyleImagesJob::process(Ctl &ctl)
// bigger value create darker image
unsigned char gray_level = 5;
size_t size {static_cast<size_t>(w*h)};
assert((offset.x() + width) <= w);
assert((offset.y() + height) <= h);
assert((offset.x() + width) <= (size_t)w);
assert((offset.y() + height) <= (size_t)h);
const unsigned char *ptr2 = (const unsigned char *) ptr;
for (size_t x = 0; x < width; ++x)
for (size_t y = 0; y < height; ++y) {

View File

@ -480,7 +480,7 @@ bool priv::check(const EmbossDataCreateVolume &input, bool is_main_thread) {
assert(input.object_idx >= 0);
res &= input.object_idx >= 0;
if (is_main_thread)
assert(input.object_idx < wxGetApp().model().objects.size());
assert((size_t)input.object_idx < wxGetApp().model().objects.size());
assert(input.screen_coor.x() >= 0.);
res &= input.screen_coor.x() >= 0.;
assert(input.screen_coor.y() >= 0.);