mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
Fix Compile Warnings (#5963)
* Fix calls to depreciated wxPen constructor * Fix use of wxTimerEvent * Fix unrecognized character escape sequence * Fix signed/unsigned mismatch At least as much as possible without significantly altering parts of the application * Clean unreferenced variables * fix mistyped namespace selector * Update deprecated calls * Fix preprocessor statement * Remove empty switch statements * Change int vector used as bool to bool vector * Remove empty control statements and related unused code * Change multi character constant to string constant * Fix discarded return value json::parse was being called on the object, rather than statically like it should be. Also, the value was not being captured. * Rename ICON_SIZE def used by MultiMachine By having the definition in the header, it causes issues when other files define ICON_SIZE. By renaming it to MM_ICON_SIZE, this lessens the issue. It would probably be ideal to have the definitions in the respective .cpp that use them, but it would make it less convenient to update the values if needed in the future. * Remove unused includes * Fix linux/macOS compilation * Hide unused-function errors on non-Windows systems * Disable signed/unsigned comparison mismatch error * Remove/Disable more unused variables Still TODO: check double for loop in Print.cpp * Remove unused variable that was missed * Remove unused variables in libraries in the src folder * Apply temporary fix for subobject linkage error * Remove/Disable last set of unused variables reported by GCC * remove redundant for loop * fix misspelled ifdef check * Update message on dialog * Fix hard-coded platform specific modifier keys * Remove duplicate for loop * Disable -Wmisleading-indentation warning * disable -Wswitch warning * Remove unused local typedefs * Fix -Wunused-value * Fix pragma error on Windows from subobject linkage fix * Fix -Waddress * Fix null conversions (-Wconversion-null) --------- Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
parent
b40853af94
commit
b83e16dbdd
187 changed files with 494 additions and 1101 deletions
|
@ -442,7 +442,7 @@ ModelObject* Model::add_object(const ModelObject &other)
|
|||
this->objects.push_back(new_object);
|
||||
// BBS: backup
|
||||
if (need_backup) {
|
||||
if (auto model = other.get_model()) {
|
||||
if (other.get_model()) {
|
||||
auto iter = object_backup_id_map.find(other.id().id);
|
||||
if (iter != object_backup_id_map.end()) {
|
||||
object_backup_id_map.emplace(new_object->id().id, iter->second);
|
||||
|
@ -2615,7 +2615,7 @@ size_t ModelVolume::split(unsigned int max_extruders)
|
|||
size_t ivolume = std::find(this->object->volumes.begin(), this->object->volumes.end(), this) - this->object->volumes.begin();
|
||||
const std::string name = this->name;
|
||||
|
||||
unsigned int extruder_counter = 0;
|
||||
// unsigned int extruder_counter = 0;
|
||||
const Vec3d offset = this->get_offset();
|
||||
|
||||
for (TriangleMesh &mesh : meshes) {
|
||||
|
@ -2930,9 +2930,6 @@ bool Model::obj_import_vertex_color_deal(const std::vector<unsigned char> &verte
|
|||
std::cout << "error";
|
||||
}
|
||||
};
|
||||
auto calc_tri_area = [](const Vec3f &v0, const Vec3f &v1, const Vec3f &v2) {
|
||||
return std::abs((v0 - v1).cross(v0 - v2).norm()) / 2;
|
||||
};
|
||||
auto volume = obj->volumes[0];
|
||||
volume->config.set("extruder", first_extruder_id);
|
||||
auto face_count = volume->mesh().its.indices.size();
|
||||
|
@ -3032,7 +3029,6 @@ bool Model::obj_import_face_color_deal(const std::vector<unsigned char> &face_fi
|
|||
volume->mmu_segmentation_facets.reserve(face_count);
|
||||
if (volume->mesh().its.indices.size() != face_filament_ids.size()) { return false; }
|
||||
for (size_t i = 0; i < volume->mesh().its.indices.size(); i++) {
|
||||
auto face = volume->mesh().its.indices[i];
|
||||
auto filament_id = face_filament_ids[i];
|
||||
if (filament_id <= 1) { continue; }
|
||||
std::string result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue