Skip to content

Commit

Permalink
Fix Array.remove (?)
Browse files Browse the repository at this point in the history
  • Loading branch information
aslze committed Mar 13, 2024
1 parent 5240877 commit b721169
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions include/asl/Array.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ class Array
return *this;
asl_destroy(_a+i);
memmove(_a+i, _a+i+1, (m-i-1)*sizeof(T));
d().n--;
resize(m - 1);
return *this;
}
Expand All @@ -410,6 +411,7 @@ class Array
return *this;
asl_destroy(_a+i, n);
memmove(_a+i, _a+i+n, (m-i-n)*sizeof(T));
d().n -= n;
resize(m - n);
return *this;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Xml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ void Xml::remove(const Xml& e)
for (int i = 0; i < numChildren(); i++)
{
if (child(i)._p == e._p) {
remove(i);
e._()->parent = NULL;
remove(i);
return;
}
}
Expand Down

0 comments on commit b721169

Please sign in to comment.