Kaydet (Commit) 2487c54d authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Fixed uses of memmove in DynamicList.

üst fd1db0b8
...@@ -227,7 +227,7 @@ DynamicList<XY>::insert(unsigned pos, XY * const & elem_) ...@@ -227,7 +227,7 @@ DynamicList<XY>::insert(unsigned pos, XY * const & elem_)
return; return;
this->checkSize(this->len+2); this->checkSize(this->len+2);
memmove(this->inhalt[pos+1], this->inhalt[pos], (this->len-pos) * sizeof(XY*) ); memmove(&this->inhalt[pos+1], &this->inhalt[pos], (this->len-pos) * sizeof(XY*) );
this->inhalt[pos] = elem_; this->inhalt[pos] = elem_;
this->len++; this->len++;
} }
...@@ -240,7 +240,7 @@ DynamicList<XY>::remove( unsigned pos ) ...@@ -240,7 +240,7 @@ DynamicList<XY>::remove( unsigned pos )
return; return;
this->len--; this->len--;
delete this->inhalt[pos]; delete this->inhalt[pos];
memmove(this->inhalt[pos], this->inhalt[pos+1], (this->len-pos) * sizeof(XY*) ); memmove(&this->inhalt[pos], &this->inhalt[pos+1], (this->len-pos) * sizeof(XY*) );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment