Skip to content

Commit

Permalink
Merge pull request #15 from zhanglanqing/master
Browse files Browse the repository at this point in the history
bug fix
  • Loading branch information
zouxiaohang committed May 22, 2016
2 parents 6587857 + 6ca8fa8 commit bae4b9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TinySTL/Detail/CircularBuffer.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace TinySTL{
cb_iter<T, N, Alloc> operator +(const cb_iter<T, N, Alloc>& cit, std::ptrdiff_t i){
int real_i = i % (std::ptrdiff_t)N;//assume i >= 0
if (real_i < 0)
real_i += 5;
real_i += N;
cb_iter<T, N, Alloc> res = cit;
res.setIndex_(res.index_ + real_i);
res.setPtr_(res.ptr_ + res.index_);
Expand Down

0 comments on commit bae4b9a

Please sign in to comment.