X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fmisc.c;h=ed22f2c09544dcdd8ed45818a44bf7349edd024f;hb=45b6628e4a1d3bf3bea5fdca794af788ceabd053;hp=7450c3a35fd4942d4e0a19a039738b9c997b2650;hpb=9bda353724b6dc9176d0dfaf28ef9f1ff4084d4b;p=rocksndiamonds.git diff --git a/src/libgame/misc.c b/src/libgame/misc.c index 7450c3a3..ed22f2c0 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -1084,24 +1084,6 @@ char *getBasePath(char *filename) } -// ---------------------------------------------------------------------------- -// various memory functions -// ---------------------------------------------------------------------------- - -void *getMemCopy(const void *m, size_t size) -{ - void *m_copy; - - if (m == NULL) - return NULL; - - m_copy = checked_malloc(size); - memcpy(m_copy, m, size); - - return m_copy; -} - - // ---------------------------------------------------------------------------- // various string functions // ---------------------------------------------------------------------------- @@ -1902,6 +1884,19 @@ void clear_mem(void *ptr, unsigned int size) #endif } +void *get_memcpy(const void *m, size_t size) +{ + void *m_copy; + + if (m == NULL) + return NULL; + + m_copy = checked_malloc(size); + memcpy(m_copy, m, size); + + return m_copy; +} + // ---------------------------------------------------------------------------- // various helper functions