Fixing GCC warnings 1

This commit is contained in:
Lukas Matena 2021-01-11 10:23:56 +01:00
parent a2a0a86138
commit b5280fbed9
9 changed files with 107 additions and 129 deletions

View file

@ -1145,33 +1145,26 @@ size_t PresetBundle::load_configbundle(const std::string &path, unsigned int fla
for (const auto &section : tree) {
PresetCollection *presets = nullptr;
std::vector<std::string> *loaded = nullptr;
std::string preset_name;
PhysicalPrinterCollection *ph_printers = nullptr;
std::string ph_printer_name;
if (boost::starts_with(section.first, "print:")) {
presets = &this->prints;
loaded = &loaded_prints;
preset_name = section.first.substr(6);
} else if (boost::starts_with(section.first, "filament:")) {
presets = &this->filaments;
loaded = &loaded_filaments;
preset_name = section.first.substr(9);
} else if (boost::starts_with(section.first, "sla_print:")) {
presets = &this->sla_prints;
loaded = &loaded_sla_prints;
preset_name = section.first.substr(10);
} else if (boost::starts_with(section.first, "sla_material:")) {
presets = &this->sla_materials;
loaded = &loaded_sla_materials;
preset_name = section.first.substr(13);
} else if (boost::starts_with(section.first, "printer:")) {
presets = &this->printers;
loaded = &loaded_printers;
preset_name = section.first.substr(8);
} else if (boost::starts_with(section.first, "physical_printer:")) {
ph_printers = &this->physical_printers;
loaded = &loaded_physical_printers;
ph_printer_name = section.first.substr(17);
} else if (section.first == "presets") {
// Load the names of the active presets.