Add an Array::Alloc convenience for the compiler.
Change-Id: Ie65321d7439ac0ff0b4a39cb507710df088baa6d
diff --git a/src/object.h b/src/object.h
index 8efa059..ca09d07 100644
--- a/src/object.h
+++ b/src/object.h
@@ -604,6 +604,10 @@
return sizeof(Array) + component_count * component_size;
}
+ // A convenience for code that doesn't know the component size,
+ // and doesn't want to have to work it out itself.
+ static Array* Alloc(Class* array_class, size_t component_count);
+
static Array* Alloc(Class* array_class,
size_t component_count,
size_t component_size) {