mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-19 04:37:52 -06:00
As an example of using the enum_bitmask infrastructure for type safe
sets of optional boolean parameters, the cut function "keep upper", "keep lower" and "flip lower" boolean parameters were converted into a single type safe enum_bitmask. Such a coding style is certainly wordier than the original code, but much safer and more readable than the error prone "boolean, boolean, boolean" function call parameter list.
This commit is contained in:
parent
0f3cabb5d9
commit
e4e8c5df12
6 changed files with 38 additions and 26 deletions
|
@ -376,7 +376,7 @@ int CLI::run(int argc, char **argv)
|
|||
o->cut(Z, m_config.opt_float("cut"), &out);
|
||||
}
|
||||
#else
|
||||
model.objects.front()->cut(0, m_config.opt_float("cut"), true, true, true);
|
||||
model.objects.front()->cut(0, m_config.opt_float("cut"), ModelObjectCutAttribute::KeepLower | ModelObjectCutAttribute::KeepUpper | ModelObjectCutAttribute::FlipLower);
|
||||
#endif
|
||||
model.delete_object(size_t(0));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue