Skip to content

Commit

Permalink
Transformer body cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajsekhar Setaluri committed Feb 27, 2020
1 parent e5e0112 commit 556e17f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/concat_coalescer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ std::pair<bool, int> get_index_integer(const Expression* expr) {

std::unique_ptr<Expression> ConcatCoalescer::visit(
std::unique_ptr<Expression> node) {
auto ptr = dynamic_cast<Concat*>(node.get());
auto ptr = dynamic_cast<const Concat*>(node.get());
if (not ptr) return node;
Index* first = nullptr;
Index* last = nullptr;
const Index* first = nullptr;
const Index* last = nullptr;
int first_index = 0;
int last_index = 0;
for (const auto& arg : ptr->args) {
auto curr = dynamic_cast<Index*>(arg.get());
auto curr = dynamic_cast<const Index*>(arg.get());
if (not curr) return node;
const auto as_int = get_index_integer(curr->index.get());
if (not as_int.first) return node;
Expand Down

0 comments on commit 556e17f

Please sign in to comment.