Remove magic number and hard type enums in DrawBrokenView.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-02-01 14:15:13 +01:00
committed by WandererFan
parent 79fdfb2cad
commit e2446c4076
7 changed files with 16 additions and 13 deletions

View File

@@ -1043,7 +1043,7 @@ void QGIViewPart::drawBreakLines()
return;
}
auto breakType = vp->BreakLineType.getValue();
DrawBrokenView::BreakType breakType = static_cast<DrawBrokenView::BreakType>(vp->BreakLineType.getValue());
auto breaks = dbv->Breaks.getValues();
for (auto& breakObj : breaks) {
QGIBreakLine* breakLine = new QGIBreakLine();