thor moved into the main line -- tree code experiences radical changes

This commit is contained in:
Garry Boyer
2007-08-07 20:36:01 +00:00
parent 4164231aa2
commit eb97ff8285
49 changed files with 1424 additions and 1876 deletions
+2 -25
View File
@@ -66,9 +66,9 @@ class ArrayList {
index_t size_;
index_t cap_;
OT_DEF(ArrayList) {
OT_DEF_ONLY(ArrayList) {
OT_MY_OBJECT(size_);
OT_MALLOC_ARRAY_NULLABLE(ptr_, size_);
OT_MALLOC_ARRAY(ptr_, size_);
}
OT_FIX(ArrayList) {
@@ -298,29 +298,6 @@ class ArrayList {
}
}
/**
* Serializes this arraylist.
*
* Currently only works for things that are bit-copiable, containing no
* pointers.
*/
template<typename Serializer>
void Serialize(Serializer *s) const {
s->Put(size_);
s->Put(ptr_, size_);
}
/**
* Initializes this list, deserializing from the given source.
*/
template<typename Deserializer>
void Deserialize(Deserializer *s) {
s->Get(&size_);
cap_ = size_;
ptr_ = mem::Alloc<Element>(cap_);
s->Get(ptr_, size_);
}
/**
* Use this to shrink the ArrayList.
*/