Style change in deque copy

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

View File

@ -54,7 +54,7 @@ public:
// 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;
std::copy(r.arr + r.begin, r.arr + r.begin + partOneSize, arr);
auto partTwo = std::copy(r.arr + r.begin, r.arr + r.capacity(), arr);
std::copy(r.arr, r.arr + (r.end & r.mask), arr + partOneSize);
}
}