]> git.saurik.com Git - cycript.git/blobdiff - Pooling.hpp
Forgot to include license header in libcycript.cy.
[cycript.git] / Pooling.hpp
index c03dd1db62bf51798428f790e0a1593a8423aac1..78aa1b2ee91dde079bf77e0705baa437618d5d2c 100644 (file)
@@ -111,8 +111,9 @@ class CYPool {
         return reinterpret_cast<char *>(memdup(data, strlen(data) + 1));
     }
 
-    void *memdup(const void *data, size_t size) {
-        void *copy(malloc<void>(size));
+    template <typename Type_>
+    Type_ *memdup(const Type_ *data, size_t size) {
+        Type_ *copy(malloc<Type_>(size));
         memcpy(copy, data, size);
         return copy;
     }