faster deserilitation, super basic enums

This commit is contained in:
Nathan Braswell
2015-08-29 21:45:55 -04:00
parent b198cfb5b2
commit a84e2ee6e1
15 changed files with 134 additions and 60 deletions

View File

@@ -37,10 +37,9 @@ obj set<T> (Object, Serializable) {
return serialize::serialize(data)
}
fun unserialize(it: ref vector::vector<char>, pos: int): int {
var temp = vector::vector<T>()
util::unpack(temp, pos) = serialize::unserialize<vector::vector<T>>(it, pos)
data.copy_construct(&temp)
return pos
/*construct()*/
/*util::unpack(data, pos) = serialize::unserialize<vector::vector<T>>(it, pos)*/
return data.unserialize(it, pos)
}
fun operator==(rhs: set<T>): bool {
if (size() != rhs.size())