preserve ZSMapInfo on map copy
This commit is contained in:
parent
7086f463e5
commit
9445828ddd
2 changed files with 8 additions and 4 deletions
|
|
@ -36,7 +36,11 @@ template<typename M> void MapCopy(M * self, M * other)
|
|||
{
|
||||
MAP_GC_WRITE_BARRIER(other);
|
||||
}
|
||||
*self = *other; // how does this handle self->info? TODO double check.
|
||||
auto tmp = self->info;
|
||||
|
||||
*self = *other;
|
||||
|
||||
self->info = tmp;
|
||||
self->info->rev++;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ struct ZSMapIterator
|
|||
}
|
||||
else
|
||||
{
|
||||
ThrowAbortException(X_FORMAT_ERROR,"MapIterator::Next called from invalid iterator");
|
||||
ThrowAbortException(X_OTHER, "MapIterator::Next called from invalid iterator");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ struct ZSMapIterator
|
|||
}
|
||||
else
|
||||
{
|
||||
ThrowAbortException(X_FORMAT_ERROR,p ? "MapIterator::GetValue called from invalid iterator" : "MapIterator::GetValue called from invalid position");
|
||||
ThrowAbortException(X_OTHER, p ? "MapIterator::GetValue called from invalid iterator" : "MapIterator::GetValue called from invalid position");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -104,7 +104,7 @@ struct ZSMapIterator
|
|||
}
|
||||
else
|
||||
{
|
||||
ThrowAbortException(X_FORMAT_ERROR,p ? "MapIterator::GetKey called from invalid iterator" : "MapIterator::GetKey called from invalid position");
|
||||
ThrowAbortException(X_OTHER, p ? "MapIterator::GetKey called from invalid iterator" : "MapIterator::GetKey called from invalid position");
|
||||
}
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue