VacuumCleaner: Split AddItem into AddItem_Free and AddItem_Delete, in hopes that it would stop errors when calling with void*. Didn't work, but now we can avoid it at call time.
VacuumCleaner: Split AddItem into AddItem_Free and AddItem_Delete, in hopes that it would stop errors when calling with void*. Didn't work, but now we can avoid it at call time.

--- a/include/boilerplate.hpp
+++ b/include/boilerplate.hpp
@@ -518,27 +518,38 @@
 	};
 
 	template <typename T>
+	void AddItem_Free(T* item) {
+		Callback* callback = make_callback([item]() {
+			free(item);
+		});
+
+		cleanup_tasks.AddItem(callback);
+	}
+
+
+	template <typename T>
+	void AddItem_Delete(T* item) {
+		Callback* callback = make_callback([item]() {
+			delete item;
+		});
+
+		cleanup_tasks.AddItem(callback);
+	}
+	
+	template <typename T>
 	void AddItem(T* item, FreeMethod method) {
-		Callback* callback;
-
 		switch(method) {
 			case DELETE:
-				callback = make_callback([item]() {
-					delete item;
-				});
+				AddItem_Delete(item);
 				break;
 			case FREE:
 			default:
-				callback = make_callback([item]() {
-					free(item);
-				});
+				AddItem_Free(item);
 				break;
 
 		}
-
-		cleanup_tasks.AddItem(callback);
-	}
-	
+	}
+
 	template<typename T>
 	void AddItem(T* item) {
 		AddItem(item, FREE);