New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor refactor in strings rewriter #3387
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just two minor suggestions.
} | ||
preNode = Node::null(); | ||
++j; | ||
for (const Node& nc : node) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could just do for (Node tmp : node)
, then we don't need the next line.
} | ||
for (; j < tmpNode.getNumChildren() - 1; ++j) | ||
{ | ||
node_vec.push_back(tmpNode[j]); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could do: node_vec.insert(node_vec.end(), tmpNode.begin() + j, tmpNode.end() - 1);
(untested)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were a few issues with doing this, but I've now refactored so there isn't a for loop.
No description provided.