List: Some u32->u64 changes so that large indexes will actually work. Also removed CopyTo(T**) because it was too easily abused.
List: Some u32->u64 changes so that large indexes will actually work. Also removed CopyTo(T**) because it was too easily abused.

--- a/include/boilerplate.hpp
+++ b/include/boilerplate.hpp
@@ -190,10 +190,7 @@
 	}
 
 	void AddBucket() {
-		u32 bucketIdx = bucketCount;
-		bucketCount++;
-
-		*BucketPtr(bucketIdx) = (T*)malloc(sizeof(T) * ITEMS_PER_BUCKET);
+		*BucketPtr(bucketCount++) = (T*)malloc(sizeof(T) * ITEMS_PER_BUCKET);
 	}
 
 	s64 qs_partition(u64 ltIdx, u64 rtIdx, u64 pvtIdx, s8 (*comp_func)(T, T), bool reversed) {
@@ -281,24 +278,24 @@
 		return GetBucket(arIdx) + lfIdx;
 	}
 
-	T& Item(u32 idx) {
+	T& Item(u64 idx) {
 		return *ItemPtr(idx);
 	}
 
-	T GetItem(u32 idx) {
+	T GetItem(u64 idx) {
 		return *ItemPtr(idx);
 	}
 
-	T& operator[] (u32 idx) {
+	T& operator[] (u64 idx) {
 		return Item(idx);
 	}
 
-	void SetItem(u32 idx, T value) {
+	void SetItem(u64 idx, T value) {
 		*ItemPtr(idx) = value;
 	}
 
 	void AddItem(T value) {
-		u32 idx = itemCount;
+		u64 idx = itemCount;
 		itemCount++;
 
 		if (itemCount > ITEMS_PER_BUCKET * bucketCount) {
@@ -308,8 +305,15 @@
 		*ItemPtr(idx) = value;
 	}
 
-	void RemoveAt(u32 idx) {
-		u32* itemPtr = ItemPtr(idx);
+	void AllocateToMaxCapacity() {
+		while (bucketCount < MAX_BUCKETS) {
+			AddBucket();
+		}
+		itemCount = MaxCapacity();
+	}
+
+	void RemoveAt(u64 idx) {
+		T* itemPtr = ItemPtr(idx);
 
 		u32 arIdx = (u32)(idx / ITEMS_PER_BUCKET);
 		u32 lfIdx = (u32)(idx % ITEMS_PER_BUCKET);
@@ -428,7 +432,7 @@
 	
 	// If you really want us to set your pointer for you, we'll do it,
 	// but to help make sure you know what you're trying to do we're going to make you
-	// pass a pointer to the pointer
+	// pass a pointer to the pointer, and pass a bool telling us you mean it.
 	void CopyTo(T** const ptr, bool needs_allocating) {
 		T* array;
 		if (needs_allocating) {
@@ -441,10 +445,6 @@
 		}
 
 		CopyTo(array);
-	}
-
-	void CopyTo(T** const ptr) {
-		CopyTo(ptr, true);
 	}
 
 	List(u32 max_buckets, u32 items_per_bucket) :