rt: Have data::walk_fn be defensive regarding whether the derived implementation of walk_fn moves the data pointer

This commit is contained in:
Patrick Walton 2011-08-29 16:50:06 -07:00
parent 0a4d43379e
commit f1ed03dfa5

View file

@ -775,8 +775,9 @@ public:
void walk_fn(bool align) {
if (align) dp = align_to(dp, sizeof(void *));
U next_dp = dp + sizeof(void *) * 2;
static_cast<T *>(this)->walk_fn(align);
dp += sizeof(void *) * 2;
dp = next_dp;
}
void walk_obj(bool align) {