Update comment in Deque.h

Co-authored-by: Russell Sears <sears@cs.berkeley.edu>
This commit is contained in:
Trevor Clinkenbeard 2020-06-12 14:57:56 -07:00 committed by GitHub
parent 4376f441f7
commit e223726c92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ public:
if (r.end < r.capacity()) {
std::copy(r.arr + r.begin, r.arr + r.begin + r.size(), arr);
} else {
// Mask is used for wrapping, so r.end is always >= r.begin,
// r.begin is always < capacity(), and r.end is always >= r.begin. Mask is used for wrapping r.end.
// but if r.end >= r.capacity(), the deque wraps around so the
// copy must be performed in two parts
auto partOneSize = r.capacity() - r.begin;