fix warn:
../src/libslic3r/CutSurface.cpp:1798:12: warning: variable 'is_same' set but not used [-Wunused-but-set-variable] ../src/libslic3r/CutSurface.cpp:1837:12: warning: unused variable 'distance_sq' [-Wunused-variable] ../src/libslic3r/CutSurface.cpp:2795:22: warning: unused variable 'def_value' [-Wunused-variable] ../tests/libslic3r/test_aabbindirect.cpp:122:12: warning: variable 'distance_sq' set but not used [-Wunused-but-set-variable] ../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:1336:17: warning: unused variable 'was_opened' [-Wunused-variable] ../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:1336:17: warning: 'was_opened' defined but not used [-Wunused-variable] ../src/slic3r/GUI/Jobs/EmbossJob.cpp:398:12: warning: unused variable 'biggest_index' [-Wunused-variable] ../src/slic3r/GUI/Jobs/EmbossJob.cpp:352:43: warning: 'const Slic3r::GUI::UseSurfaceData::ModelSource* get_biggest(const ModelSources&)' defined but not used [-Wunused-function]
This commit is contained in:
parent
011aa53c5a
commit
20a94c015c
@ -1795,7 +1795,8 @@ uint32_t priv::get_closest_point_index(const SearchData &sd,
|
||||
size_t point_index = sd.cvt[line_idx];
|
||||
|
||||
// Lambda used only for check result
|
||||
auto is_same = [&s2i, &shapes](const Vec2d &p, size_t i) -> bool {
|
||||
[[maybe_unused]] auto is_same = [&s2i, &shapes]
|
||||
(const Vec2d &p, size_t i) -> bool {
|
||||
auto id = s2i.calc_id(i);
|
||||
const ExPolygon &shape = shapes[id.expolygons_index];
|
||||
const Polygon &poly = (id.polygon_index == 0) ?
|
||||
@ -1834,7 +1835,8 @@ uint32_t priv::find_closest_point_index(const Point &p,
|
||||
size_t line_idx = std::numeric_limits<size_t>::max();
|
||||
Vec2d hit_point;
|
||||
Vec2d p_d = p.cast<double>();
|
||||
double distance_sq = AABBTreeLines::squared_distance_to_indexed_lines(
|
||||
[[maybe_unused]] double distance_sq =
|
||||
AABBTreeLines::squared_distance_to_indexed_lines(
|
||||
sd.lines, sd.tree, p_d, line_idx, hit_point);
|
||||
assert(distance_sq > 0);
|
||||
|
||||
@ -2792,8 +2794,6 @@ void priv::divide_patch(size_t i, SurfacePatches &patches) {
|
||||
assert(patch.just_cliped);
|
||||
patch.just_cliped = false;
|
||||
|
||||
constexpr size_t def_value = std::numeric_limits<size_t>::max();
|
||||
|
||||
CutMesh& cm = patch.mesh;
|
||||
assert(!cm.faces().empty());
|
||||
std::string patch_number_name = "f:patch_number";
|
||||
|
@ -1333,7 +1333,6 @@ void GLGizmoEmboss::draw_font_list()
|
||||
const char * selected = (!actual_face_name.empty()) ?
|
||||
actual_face_name.ToUTF8().data() : " --- ";
|
||||
wxString del_facename;
|
||||
static bool was_opened = false;
|
||||
if (ImGui::BeginCombo("##font_selector", selected)) {
|
||||
if (!m_face_names.is_init) init_face_names();
|
||||
init_texture();
|
||||
|
@ -349,22 +349,6 @@ UseSurfaceJob::UseSurfaceJob(UseSurfaceData &&input)
|
||||
assert(priv::check(m_input, true));
|
||||
}
|
||||
|
||||
static const UseSurfaceData::ModelSource* get_biggest(
|
||||
const UseSurfaceData::ModelSources &sources)
|
||||
{
|
||||
const UseSurfaceData::ModelSource *biggest = nullptr;
|
||||
for (const UseSurfaceData::ModelSource &s : sources) {
|
||||
if (biggest == nullptr) {
|
||||
biggest = &s;
|
||||
continue;
|
||||
}
|
||||
if (biggest->mesh->its.indices.size() < s.mesh->its.indices.size()) {
|
||||
biggest = &s;
|
||||
}
|
||||
}
|
||||
return biggest;
|
||||
}
|
||||
|
||||
void UseSurfaceJob::process(Ctl &ctl) {
|
||||
if (!priv::check(m_input))
|
||||
throw std::runtime_error("Bad input data for UseSurfaceJob.");
|
||||
@ -395,7 +379,6 @@ void UseSurfaceJob::process(Ctl &ctl) {
|
||||
double shape_scale = Emboss::get_shape_scale(fp, ff);
|
||||
|
||||
size_t biggest_count = 0;
|
||||
size_t biggest_index = 0;
|
||||
const UseSurfaceData::ModelSource *biggest = nullptr;
|
||||
std::vector<size_t> s_to_itss(m_input.sources.size(), std::numeric_limits<size_t>::max());
|
||||
std::vector<indexed_triangle_set> itss;
|
||||
|
@ -119,7 +119,8 @@ TEST_CASE("Find the closest point from ExPolys", "[ClosestPoint]") {
|
||||
|
||||
size_t hit_idx_out = std::numeric_limits<size_t>::max();
|
||||
Vec2d hit_point_out;
|
||||
double distance_sq = AABBTreeLines::squared_distance_to_indexed_lines(
|
||||
[[maybe_unused]] double distance_sq =
|
||||
AABBTreeLines::squared_distance_to_indexed_lines(
|
||||
lines, tree, p, hit_idx_out, hit_point_out, 0.24/* < (0.5*0.5) */);
|
||||
CHECK(hit_idx_out == std::numeric_limits<size_t>::max());
|
||||
distance_sq = AABBTreeLines::squared_distance_to_indexed_lines(
|
||||
|
Loading…
Reference in New Issue
Block a user