summaryrefslogtreecommitdiff
path: root/src/expr
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr')
-rw-r--r--src/expr/expr_template.cpp4
-rw-r--r--src/expr/expr_template.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/expr/expr_template.cpp b/src/expr/expr_template.cpp
index 74bfd3f2b..b7000fea6 100644
--- a/src/expr/expr_template.cpp
+++ b/src/expr/expr_template.cpp
@@ -188,11 +188,11 @@ size_t Expr::getNumChildren() const {
return d_node->getNumChildren();
}
-Expr Expr::getChild(unsigned int i) const {
+Expr Expr::operator[](unsigned i) const {
ExprManagerScope ems(*this);
Assert(d_node != NULL, "Unexpected NULL expression pointer!");
Assert(i >= 0 && i < d_node->getNumChildren(), "Child index out of bounds");
- return Expr(d_exprManager,new Node((*d_node)[i]));
+ return Expr(d_exprManager, new Node((*d_node)[i]));
}
bool Expr::hasOperator() const {
diff --git a/src/expr/expr_template.h b/src/expr/expr_template.h
index 291016044..24cb6dc5d 100644
--- a/src/expr/expr_template.h
+++ b/src/expr/expr_template.h
@@ -267,7 +267,7 @@ public:
* @param i the index of the child to retrieve
* @return the child
*/
- Expr getChild(unsigned int i) const;
+ Expr operator[](unsigned i) const;
/**
* Check if this is an expression that has an operator.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback