mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-03 02:22:46 +00: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:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user