Skip to content

expr_iterator: use a std::deque to implement the stack #2250

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

Merged
merged 1 commit into from
May 29, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/util/expr_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#ifndef CPROVER_UTIL_EXPR_ITERATOR_H
#define CPROVER_UTIL_EXPR_ITERATOR_H

#include <deque>
#include <iterator>
#include <functional>
#include <set>
Expand Down Expand Up @@ -39,7 +40,7 @@ class const_unique_depth_iteratort;
/// Helper class for depth_iterator_baset
struct depth_iterator_expr_statet final
{
typedef std::vector<exprt>::const_iterator operands_iteratort;
typedef exprt::operandst::const_iterator operands_iteratort;
inline depth_iterator_expr_statet(
const exprt &expr,
operands_iteratort it,
Expand Down Expand Up @@ -213,7 +214,7 @@ class depth_iterator_baset
}

private:
std::vector<depth_iterator_expr_statet> m_stack;
std::deque<depth_iterator_expr_statet> m_stack;

depth_iterator_t &downcast()
{ return static_cast<depth_iterator_t &>(*this); }
Expand Down