std: Rewrite vec_reserve_shared_actual in Rust

This commit is contained in:
Brian Anderson
2013-06-21 19:40:00 -07:00
parent 95eb01957b
commit aa9210d25a
7 changed files with 67 additions and 45 deletions

View File

@@ -57,16 +57,6 @@ vec_data(rust_vec *v) {
return reinterpret_cast<T*>(v->data);
}
inline void reserve_vec_exact_shared(rust_task* task, rust_vec_box** vpp,
size_t size) {
rust_opaque_box** ovpp = (rust_opaque_box**)vpp;
if (size > (*vpp)->body.alloc) {
*vpp = (rust_vec_box*)task->boxed.realloc(
*ovpp, size + sizeof(rust_vec));
(*vpp)->body.alloc = size;
}
}
inline void reserve_vec_exact(rust_vec_box** vpp,
size_t size) {
if (size > (*vpp)->body.alloc) {