Remove magic number and hard type enums in CenterLine.h

- Remove currently present magic numbers
- Hard type enums, so magic numbers can no longer be introduced. We don't want people to introduce magic numbers.
This commit is contained in:
Benjamin Bræstrup Sayoc
2025-01-30 22:46:13 +01:00
committed by WandererFan
parent f115ed4bb1
commit 79fdfb2cad
6 changed files with 109 additions and 93 deletions

View File

@@ -658,7 +658,7 @@ PyObject* DrawViewPartPy::makeCenterLine(PyObject *args)
{
// Base::Console().Message("DVPPI::makeCenterLine()\n");
PyObject* pSubs;
int mode = 0;
CenterLine::Mode mode = CenterLine::Mode::VERTICAL;
std::vector<std::string> subs;
if (!PyArg_ParseTuple(args, "O!i", &PyList_Type, &pSubs, &mode)) {