mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-19 12:47:50 -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
|
@ -28,7 +28,6 @@ inline Grids line_rasterization(const Line &line, int64_t xdist = scale_(1), int
|
|||
Point rayStart = line.a;
|
||||
Point rayEnd = line.b;
|
||||
IndexPair currentVoxel = point_map_grid_index(rayStart, xdist, ydist);
|
||||
IndexPair firstVoxel = currentVoxel;
|
||||
IndexPair lastVoxel = point_map_grid_index(rayEnd, xdist, ydist);
|
||||
|
||||
Point ray = rayEnd - rayStart;
|
||||
|
|
|
@ -3454,7 +3454,6 @@ void GCodeProcessor::process_G2_G3(const GCodeReader::GCodeLine& line)
|
|||
arc_length = ((int)line.p()) * 2 * PI * (start_point - m_arc_center).norm();
|
||||
//BBS: Attention! arc_onterpolation does not support P mode while P is not 1.
|
||||
arc_interpolation(start_point, end_point, m_arc_center, (m_move_path_type == EMovePathType::Arc_move_ccw));
|
||||
float radian = ArcSegment::calc_arc_radian(start_point, end_point, m_arc_center, (m_move_path_type == EMovePathType::Arc_move_ccw));
|
||||
Vec3f start_dir = Circle::calc_tangential_vector(start_point, m_arc_center, (m_move_path_type == EMovePathType::Arc_move_ccw));
|
||||
Vec3f end_dir = Circle::calc_tangential_vector(end_point, m_arc_center, (m_move_path_type == EMovePathType::Arc_move_ccw));
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
#include "../ClipperUtils.hpp"
|
||||
#include "../Layer.hpp"
|
||||
#include "../Polyline.hpp"
|
||||
|
||||
#include "RetractWhenCrossingPerimeters.hpp"
|
||||
|
||||
|
|
|
@ -9,6 +9,14 @@
|
|||
|
||||
namespace Slic3r {
|
||||
|
||||
#ifndef _WIN32
|
||||
// Currently on Linux/macOS, this class spits out large amounts of subobject linkage
|
||||
// warnings because of the flowModel field. tk::spline is in an anonymous namespace which
|
||||
// causes this issue. Until the issue can be solved, this is a temporary solution.
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wsubobject-linkage"
|
||||
#endif
|
||||
|
||||
class SmallAreaInfillFlowCompensator
|
||||
{
|
||||
public:
|
||||
|
@ -31,6 +39,10 @@ private:
|
|||
double max_modified_length() { return eLengths.back(); }
|
||||
};
|
||||
|
||||
#ifndef _WIN32
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
#endif /* slic3r_GCode_SmallAreaInfillFlowCompensator_hpp_ */
|
||||
|
|
|
@ -307,7 +307,6 @@ ToolOrdering::ToolOrdering(const Print &print, unsigned int first_extruder, bool
|
|||
std::vector<unsigned int> ToolOrdering::generate_first_layer_tool_order(const Print& print)
|
||||
{
|
||||
std::vector<unsigned int> tool_order;
|
||||
int initial_extruder_id = -1;
|
||||
std::map<int, double> min_areas_per_extruder;
|
||||
|
||||
for (auto object : print.objects()) {
|
||||
|
@ -336,7 +335,6 @@ std::vector<unsigned int> ToolOrdering::generate_first_layer_tool_order(const Pr
|
|||
}
|
||||
}
|
||||
|
||||
double max_minimal_area = 0.;
|
||||
for (auto ape : min_areas_per_extruder) {
|
||||
auto iter = tool_order.begin();
|
||||
for (; iter != tool_order.end(); iter++) {
|
||||
|
@ -369,7 +367,6 @@ std::vector<unsigned int> ToolOrdering::generate_first_layer_tool_order(const Pr
|
|||
std::vector<unsigned int> ToolOrdering::generate_first_layer_tool_order(const PrintObject& object)
|
||||
{
|
||||
std::vector<unsigned int> tool_order;
|
||||
int initial_extruder_id = -1;
|
||||
std::map<int, double> min_areas_per_extruder;
|
||||
auto first_layer = object.get_layer(0);
|
||||
for (auto layerm : first_layer->regions()) {
|
||||
|
@ -394,7 +391,6 @@ std::vector<unsigned int> ToolOrdering::generate_first_layer_tool_order(const Pr
|
|||
}
|
||||
}
|
||||
|
||||
double max_minimal_area = 0.;
|
||||
for (auto ape : min_areas_per_extruder) {
|
||||
auto iter = tool_order.begin();
|
||||
for (; iter != tool_order.end(); iter++) {
|
||||
|
|
|
@ -1072,8 +1072,6 @@ void WipeTower::toolchange_Wipe(
|
|||
const float target_speed = is_first_layer() ? std::min(m_first_layer_speed * 60.f, 4800.f) : 4800.f;
|
||||
float wipe_speed = 0.33f * target_speed;
|
||||
|
||||
float start_y = writer.y();
|
||||
|
||||
#if 0
|
||||
// if there is less than 2.5*m_perimeter_width to the edge, advance straightaway (there is likely a blob anyway)
|
||||
if ((m_left_to_right ? xr-writer.x() : writer.x()-xl) < 2.5f*m_perimeter_width) {
|
||||
|
@ -1132,8 +1130,6 @@ void WipeTower::toolchange_Wipe(
|
|||
m_left_to_right = !m_left_to_right;
|
||||
}
|
||||
|
||||
float end_y = writer.y();
|
||||
|
||||
// We may be going back to the model - wipe the nozzle. If this is followed
|
||||
// by finish_layer, this wipe path will be overwritten.
|
||||
//writer.add_wipe_point(writer.x(), writer.y())
|
||||
|
@ -1422,7 +1418,6 @@ void WipeTower::plan_tower()
|
|||
// If wipe tower height is between the current and next member, set the min_depth as linear interpolation between them
|
||||
auto next_height_to_depth = *iter;
|
||||
if (next_height_to_depth.first > m_wipe_tower_height) {
|
||||
float height_base = curr_height_to_depth.first;
|
||||
float height_diff = next_height_to_depth.first - curr_height_to_depth.first;
|
||||
float min_depth_base = curr_height_to_depth.second;
|
||||
float depth_diff = next_height_to_depth.second - curr_height_to_depth.second;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue