mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 15:23:02 +01:00
Fix for Alex's removeRange & removeCount methods in Array class.
This commit is contained in:
parent
b84e03f467
commit
41e13ca1b1
@ -163,12 +163,12 @@ public:
|
||||
void removeRange(size_t from, size_t to) {
|
||||
fb_assert(from <= to);
|
||||
fb_assert(to <= count);
|
||||
memmove(data + from, data + to, sizeof(T) * (to - from));
|
||||
memmove(data + from, data + to, sizeof(T) * (count - to));
|
||||
count -= (to - from);
|
||||
}
|
||||
void removeCount(size_t index, size_t n) {
|
||||
fb_assert(index + n <= count);
|
||||
memmove(data + index, data + index + n, sizeof(T) * n);
|
||||
memmove(data + index, data + index + n, sizeof(T) * (count - index - n));
|
||||
count -= n;
|
||||
}
|
||||
void remove(T* itr) {
|
||||
|
Loading…
Reference in New Issue
Block a user