diff --git a/ods/src/ods/dual_array_deque.h b/ods/src/ods/dual_array_deque.h index 9b62f05..def1d9c 100644 --- a/ods/src/ods/dual_array_deque.h +++ b/ods/src/ods/dual_array_deque.h @@ -27,7 +27,7 @@ public: return front.set(front.size() - i - 1, x); } else { - return back.set(i - front.size()); + return back.set(i - front.size(), x); } } @@ -65,7 +65,7 @@ private: if ((3 * front.size() < back.size()) || (3 * back.size() < front.size())) { std::cerr << "rebalancing\n"; - auto n = front.size(); + auto n = this->size(); auto nf = n / 2; Array af(max(2*nf, 1)); for (int i = 0; i < nf; i++) {