Skip to content

Commit

Permalink
Fix floating point range for upper/lt/lt_eq validations (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
Roboterbastler authored Aug 23, 2024
1 parent e7909a0 commit 04b83a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ descriptor.floating_point_range.at({{loop.index0}}).from_value = {{validation.ar
descriptor.floating_point_range.at({{loop.index0}}).to_value = std::numeric_limits<double>::max();
{%- elif ("upper" in validation.function_name or "lt" == validation.function_base_name or "lt_eq" == validation.function_base_name) and validation.arguments|length == 1 %}
descriptor.floating_point_range.resize({{loop.index}});
descriptor.floating_point_range.at({{loop.index0}}).to_value = std::numeric_limits<double>::lowest();
descriptor.floating_point_range.at({{loop.index0}}).from_value = std::numeric_limits<double>::lowest();
descriptor.floating_point_range.at({{loop.index0}}).to_value = {{validation.arguments[0]}};
{%- endif %}
{%- elif "INTEGER" in parameter_type %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ descriptor.floating_point_range.at({{loop.index0}}).from_value = {{validation.ar
descriptor.floating_point_range.at({{loop.index0}}).to_value = std::numeric_limits<double>::max();
{%- elif ("upper" in validation.function_name or "lt" == validation.function_base_name or "lt_eq" == validation.function_base_name) and validation.arguments|length == 1 %}
descriptor.floating_point_range.resize({{loop.index}});
descriptor.floating_point_range.at({{loop.index0}}).to_value = std::numeric_limits<double>::lowest();
descriptor.floating_point_range.at({{loop.index0}}).from_value = std::numeric_limits<double>::lowest();
descriptor.floating_point_range.at({{loop.index0}}).to_value = {{validation.arguments[0]}};
{%- endif %}
{%- elif "INTEGER" in parameter_type %}
Expand Down

0 comments on commit 04b83a4

Please sign in to comment.