graveman82
Hi! I found some confusing place in Urho3D1.7 Vector.h:
> /// Move a range of elements within the vector.
void MoveRange(unsigned dest, unsigned src, unsigned count) { T* buffer = Buffer(); if (src < dest) { for (unsigned i = count - 1; i < count; --i) // THIS IS VERY STRANGE CODE buffer[dest + i] = buffer[src + i]; } if (src > dest) { for (unsigned i = 0; i < count; ++i) buffer[dest + i] = buffer[src + i]; } }
shouldn’t it be “for (unsigned i = count - 1; i > 0; --i)”?