feat(library/locals): use optional<expr> instead of bool at depends_on (for arrays)
This commit is contained in:
parent
461c02d790
commit
3a67ddb7c5
2 changed files with 4 additions and 4 deletions
|
@ -78,10 +78,10 @@ bool contains_local(expr const & e, name const & n) {
|
|||
return result;
|
||||
}
|
||||
|
||||
bool depends_on(unsigned sz, expr const * es, expr const & h) {
|
||||
optional<expr> depends_on(unsigned sz, expr const * es, expr const & h) {
|
||||
for (unsigned i = 0; i < sz; i++)
|
||||
if (depends_on(es[i], h))
|
||||
return true;
|
||||
return false;
|
||||
return some_expr(es[i]);
|
||||
return none_expr();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,5 +35,5 @@ inline bool depends_on(expr const & e, expr const & h) {
|
|||
}
|
||||
|
||||
/** \brief Return true iff one of \c es contains the local constant \c h */
|
||||
bool depends_on(unsigned sz, expr const * es, expr const & h);
|
||||
optional<expr> depends_on(unsigned sz, expr const * es, expr const & h);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue