mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 15:07:31 -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
|
@ -519,7 +519,7 @@ bool CalibUtils::calib_flowrate(int pass, const CalibInfo &calib_info, wxString
|
|||
const ConfigOptionFloats *nozzle_diameter_config = printer_config.option<ConfigOptionFloats>("nozzle_diameter");
|
||||
assert(nozzle_diameter_config->values.size() > 0);
|
||||
float nozzle_diameter = nozzle_diameter_config->values[0];
|
||||
float xyScale = nozzle_diameter / 0.6;
|
||||
// float xyScale = nozzle_diameter / 0.6;
|
||||
// scale z to have 7 layers
|
||||
double first_layer_height = print_config.option<ConfigOptionFloat>("initial_layer_print_height")->value;
|
||||
double layer_height = nozzle_diameter / 2.0; // prefer 0.2 layer height for 0.4 nozzle
|
||||
|
@ -1067,7 +1067,6 @@ bool CalibUtils::process_and_store_3mf(Model *model, const DynamicPrintConfig &f
|
|||
{
|
||||
GLVolumeCollection glvolume_collection;
|
||||
std::vector<ColorRGBA> colors_out(1);
|
||||
unsigned char rgb_color[4] = {255, 255, 255, 255};
|
||||
ColorRGBA new_color {1.0f, 1.0f, 1.0f, 1.0f};
|
||||
colors_out.push_back(new_color);
|
||||
|
||||
|
@ -1080,9 +1079,9 @@ bool CalibUtils::process_and_store_3mf(Model *model, const DynamicPrintConfig &f
|
|||
const ModelObject &model_object = *model->objects[obj_idx];
|
||||
|
||||
for (int volume_idx = 0; volume_idx < (int)model_object.volumes.size(); ++ volume_idx) {
|
||||
const ModelVolume &model_volume = *model_object.volumes[volume_idx];
|
||||
// const ModelVolume &model_volume = *model_object.volumes[volume_idx];
|
||||
for (int instance_idx = 0; instance_idx < (int)model_object.instances.size(); ++ instance_idx) {
|
||||
const ModelInstance &model_instance = *model_object.instances[instance_idx];
|
||||
// const ModelInstance &model_instance = *model_object.instances[instance_idx];
|
||||
glvolume_collection.load_object_volume(&model_object, obj_idx, volume_idx, instance_idx, "volume", true, false, true);
|
||||
glvolume_collection.volumes.back()->set_render_color(new_color);
|
||||
glvolume_collection.volumes.back()->set_color(new_color);
|
||||
|
@ -1128,11 +1127,11 @@ bool CalibUtils::process_and_store_3mf(Model *model, const DynamicPrintConfig &f
|
|||
|
||||
store_params.strategy = SaveStrategy::Silence | SaveStrategy::WithGcode | SaveStrategy::SplitModel | SaveStrategy::SkipModel;
|
||||
|
||||
bool success = Slic3r::store_bbs_3mf(store_params);
|
||||
Slic3r::store_bbs_3mf(store_params);
|
||||
|
||||
store_params.strategy = SaveStrategy::Silence | SaveStrategy::SplitModel | SaveStrategy::WithSliceInfo | SaveStrategy::SkipAuxiliary;
|
||||
store_params.path = config_3mf_path.c_str();
|
||||
success = Slic3r::store_bbs_3mf(store_params);
|
||||
Slic3r::store_bbs_3mf(store_params);
|
||||
|
||||
release_PlateData_list(plate_data_list);
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue