mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-29 03:41:31 +00:00
FIX: remove some warnings
jira: [none] Change-Id: I0e74b7316d0efe38c65e1f695b2a09eb09103552 (cherry picked from commit 766c6e004145325bcc7a6addfce27842ee9504de)
This commit is contained in:
@@ -33,8 +33,9 @@ struct ExtrusionLayer
|
||||
|
||||
enum class ExtrusionLayersType { INFILL, PERIMETERS, SUPPORT, WIPE_TOWER };
|
||||
|
||||
struct ExtrusionLayers : public std::vector<ExtrusionLayer>
|
||||
class ExtrusionLayers : public std::vector<ExtrusionLayer>
|
||||
{
|
||||
public:
|
||||
ExtrusionLayersType type;
|
||||
};
|
||||
|
||||
|
||||
@@ -2186,7 +2186,7 @@ void PresetBundle::set_num_filaments(unsigned int n, std::vector<std::string> ne
|
||||
}
|
||||
void PresetBundle::set_num_filaments(unsigned int n, std::string new_color)
|
||||
{
|
||||
int old_filament_count = this->filament_presets.size();
|
||||
unsigned old_filament_count = this->filament_presets.size();
|
||||
if (n > old_filament_count && old_filament_count != 0)
|
||||
filament_presets.resize(n, filament_presets.back());
|
||||
else {
|
||||
@@ -2205,7 +2205,7 @@ void PresetBundle::set_num_filaments(unsigned int n, std::string new_color)
|
||||
//BBS set new filament color to new_color
|
||||
if (old_filament_count < n) {
|
||||
if (!new_color.empty()) {
|
||||
for (int i = old_filament_count; i < n; i++) {
|
||||
for (unsigned i = old_filament_count; i < n; i++) {
|
||||
filament_color->values[i] = new_color;
|
||||
filament_multi_color->values[i] = new_color;
|
||||
filament_color_type->values[i] = "1"; // default color type
|
||||
@@ -2218,7 +2218,7 @@ void PresetBundle::set_num_filaments(unsigned int n, std::string new_color)
|
||||
|
||||
void PresetBundle::update_num_filaments(unsigned int to_del_flament_id)
|
||||
{
|
||||
int old_filament_count = this->filament_presets.size();
|
||||
unsigned old_filament_count = this->filament_presets.size();
|
||||
assert(to_del_flament_id < old_filament_count);
|
||||
filament_presets.erase(filament_presets.begin() + to_del_flament_id);
|
||||
|
||||
@@ -2778,7 +2778,7 @@ Preset *PresetBundle::get_similar_printer_preset(std::string printer_model, std:
|
||||
//BBS: check whether this is the only edited filament
|
||||
bool PresetBundle::is_the_only_edited_filament(unsigned int filament_index)
|
||||
{
|
||||
int n = this->filament_presets.size();
|
||||
unsigned n = this->filament_presets.size();
|
||||
if (filament_index >= n)
|
||||
return false;
|
||||
|
||||
@@ -2787,7 +2787,7 @@ bool PresetBundle::is_the_only_edited_filament(unsigned int filament_index)
|
||||
if (edited_preset.name != name)
|
||||
return false;
|
||||
|
||||
int index = 0;
|
||||
unsigned index = 0;
|
||||
while (index < n)
|
||||
{
|
||||
if (index == filament_index) {
|
||||
|
||||
@@ -4123,7 +4123,7 @@ static void convert_layer_region_from_json(const json& j, LayerRegion& layer_reg
|
||||
if (!ret) {
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format(":error parsing thin_fills found at layer %1%, print_z %2%") %layer_region.layer()->id() %layer_region.layer()->print_z;
|
||||
char error_buf[1024];
|
||||
::sprintf(error_buf, "Error while parsing thin_fills at layer %zd, print_z %f", layer_region.layer()->id(), layer_region.layer()->print_z);
|
||||
::sprintf(error_buf, "Error while parsing thin_fills at layer %zu, print_z %f", layer_region.layer()->id(), layer_region.layer()->print_z);
|
||||
throw Slic3r::FileIOError(error_buf);
|
||||
}
|
||||
}
|
||||
@@ -4178,7 +4178,7 @@ static void convert_layer_region_from_json(const json& j, LayerRegion& layer_reg
|
||||
if (!ret) {
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format(": error parsing perimeters found at layer %1%, print_z %2%") %layer_region.layer()->id() %layer_region.layer()->print_z;
|
||||
char error_buf[1024];
|
||||
::sprintf(error_buf, "Error while parsing perimeters at layer %zd, print_z %f", layer_region.layer()->id(), layer_region.layer()->print_z);
|
||||
::sprintf(error_buf, "Error while parsing perimeters at layer %zu, print_z %f", layer_region.layer()->id(), layer_region.layer()->print_z);
|
||||
throw Slic3r::FileIOError(error_buf);
|
||||
}
|
||||
}
|
||||
@@ -4193,7 +4193,7 @@ static void convert_layer_region_from_json(const json& j, LayerRegion& layer_reg
|
||||
if (!ret) {
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format(": error parsing fills found at layer %1%, print_z %2%") %layer_region.layer()->id() %layer_region.layer()->print_z;
|
||||
char error_buf[1024];
|
||||
::sprintf(error_buf, "Error while parsing fills at layer %zd, print_z %f", layer_region.layer()->id(), layer_region.layer()->print_z);
|
||||
::sprintf(error_buf, "Error while parsing fills at layer %zu, print_z %f", layer_region.layer()->id(), layer_region.layer()->print_z);
|
||||
throw Slic3r::FileIOError(error_buf);
|
||||
}
|
||||
}
|
||||
@@ -4274,7 +4274,7 @@ void extract_support_layer(const json& support_layer_json, SupportLayer& support
|
||||
if (!ret) {
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format(": error parsing fills found at support_layer %1%, print_z %2%")%support_layer.id() %support_layer.print_z;
|
||||
char error_buf[1024];
|
||||
::sprintf(error_buf, "Error while parsing fills at support_layer %zd, print_z %f", support_layer.id(), support_layer.print_z);
|
||||
::sprintf(error_buf, "Error while parsing fills at support_layer %zu, print_z %f", support_layer.id(), support_layer.print_z);
|
||||
throw Slic3r::FileIOError(error_buf);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8718,7 +8718,7 @@ void DynamicPrintConfig::update_values_to_printer_extruders(DynamicPrintConfig&
|
||||
auto opt_nozzle_volume_type = dynamic_cast<const ConfigOptionEnumsGeneric*>(printer_config.option("nozzle_volume_type"));
|
||||
std::vector<int> variant_index;
|
||||
|
||||
if (extruder_id > 0 && extruder_id <= extruder_count) {
|
||||
if (extruder_id > 0 && extruder_id <= static_cast<unsigned> (extruder_count)) {
|
||||
variant_index.resize(1);
|
||||
ExtruderType extruder_type = (ExtruderType)(opt_extruder_type->get_at(extruder_id - 1));
|
||||
NozzleVolumeType nozzle_volume_type = (NozzleVolumeType)(opt_nozzle_volume_type->get_at(extruder_id - 1));
|
||||
|
||||
Reference in New Issue
Block a user