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:
committed by
WandererFan
parent
79fdfb2cad
commit
e2446c4076
@@ -34,6 +34,7 @@
|
||||
#include <Base/Parameter.h>
|
||||
|
||||
#include "Preferences.h"
|
||||
#include "DrawBrokenView.h"
|
||||
#include "LineGenerator.h"
|
||||
|
||||
//getters for parameters used in multiple places.
|
||||
@@ -593,9 +594,10 @@ bool Preferences::useExactMatchOnDims()
|
||||
return getPreferenceGroup("Dimensions")->GetBool("UseMatcher", true);
|
||||
}
|
||||
|
||||
int Preferences::BreakType()
|
||||
DrawBrokenView::BreakType Preferences::BreakType()
|
||||
{
|
||||
return getPreferenceGroup("Decorations")->GetInt("BreakType", 2);
|
||||
int temp = getPreferenceGroup("Decorations")->GetInt("BreakType", 2);
|
||||
return static_cast<DrawBrokenView::BreakType>(temp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user