Skip to content

Commit

Permalink
Merge pull request #39 from HydLa/fix/interval-function-visitor
Browse files Browse the repository at this point in the history
Convert function names to lowercase in AffineTreeVisitor and IntervalTreeVisitor
  • Loading branch information
1037ga authored Feb 19, 2024
2 parents 82a3b66 + f2411e7 commit 3e7a4e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/interval/AffineTreeVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ void AffineTreeVisitor::visit(
std::shared_ptr<symbolic_expression::Function> node) {
HYDLA_LOGGER_NODE_VISIT;
std::string name = node->get_name();
std::transform(name.begin(), name.end(), name.begin(), ::tolower);
if (name == "log") {
if (node->get_arguments_size() != 1)
invalid_node(*node);
Expand Down
1 change: 1 addition & 0 deletions src/interval/IntervalTreeVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ void IntervalTreeVisitor::visit(
void IntervalTreeVisitor::visit(
std::shared_ptr<symbolic_expression::Function> node) {
std::string name = node->get_name();
std::transform(name.begin(), name.end(), name.begin(), ::tolower);
itvd arg;
if (name == "sin") {
if (node->get_arguments_size() != 1) {
Expand Down

0 comments on commit 3e7a4e0

Please sign in to comment.