File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Framework/CurveFitting/src/Functions Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -61,16 +61,18 @@ void BSpline::resetValidators() {
61
61
auto attStartX = getAttribute (" StartX" );
62
62
auto attEndX = getAttribute (" EndX" );
63
63
64
- auto startXValidator = dynamic_cast <BoundedValidator<double > * >(attStartX.getValidator (). get ());
64
+ auto startXValidator = std::dynamic_pointer_cast <BoundedValidator<double >>(attStartX.getValidator ());
65
65
startXValidator->setUpper (attEndX.asDouble ());
66
66
67
- auto endXValidator = dynamic_cast <BoundedValidator<double > * >(attEndX.getValidator (). get ());
67
+ auto endXValidator = std::dynamic_pointer_cast <BoundedValidator<double >>(attEndX.getValidator ());
68
68
endXValidator->setLower (attStartX.asDouble ());
69
69
70
70
auto breakPointsValidator =
71
- dynamic_cast <ArrayBoundedValidator<double > *>(getAttribute (" BreakPoints" ).getValidator ().get ());
72
- breakPointsValidator->setLower (attStartX.asDouble ());
73
- breakPointsValidator->setUpper (attEndX.asDouble ());
71
+ dynamic_pointer_cast<ArrayBoundedValidator<double >>(getAttribute (" BreakPoints" ).getValidator ());
72
+ if (breakPointsValidator != nullptr ) {
73
+ breakPointsValidator->setLower (attStartX.asDouble ());
74
+ breakPointsValidator->setUpper (attEndX.asDouble ());
75
+ }
74
76
}
75
77
76
78
/* * Execute the function
You can’t perform that action at this time.
0 commit comments