Revert the in prog commit that was lost, as the scoping branch is now handeling it

This commit is contained in:
Nathan Braswell
2014-12-19 18:45:29 -05:00
parent 5fb40c3bd1
commit f35b4a8d48
11 changed files with 81 additions and 153 deletions

View File

@@ -27,12 +27,12 @@ typedef template<T> vector (Destructable) {
delete<T>(data, 0);
return true;
}
|T| operator[](|int| index) {
return at(index);
}
|T| at(|int| index) {
return get(index);
}
|T| get(|int| index) {
if (index < 0 || index >= size) {
println("Vector access out of bounds! Retuning 0th element as sanest option");
return data[0];