mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 17:27:52 -06:00
perglue.cpp - use static_cast instead of dynamic_cast if possible,
use switch instead of plenty of ifs, export clone<DynamicPrintConfig> to Perl XS.
This commit is contained in:
parent
746afbd790
commit
b9d57483d8
4 changed files with 150 additions and 166 deletions
|
@ -38,7 +38,7 @@ Fill* Fill::new_from_type(const InfillPattern type)
|
|||
|
||||
Fill* Fill::new_from_type(const std::string &type)
|
||||
{
|
||||
static t_config_enum_values enum_keys_map = ConfigOptionEnum<InfillPattern>::get_enum_values();
|
||||
const t_config_enum_values &enum_keys_map = ConfigOptionEnum<InfillPattern>::get_enum_values();
|
||||
t_config_enum_values::const_iterator it = enum_keys_map.find(type);
|
||||
return (it == enum_keys_map.end()) ? nullptr : new_from_type(InfillPattern(it->second));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue