svn merge -r41575:41602 ^/trunk/blender
[blender.git] / source / blender / blenkernel / intern / library.c
index 4259e11d3400eff6234adef6c48bc65afb9eff65..64ab27ae47e014907663283be0052c7d569ebaa5 100644 (file)
@@ -717,14 +717,11 @@ void copy_libblock_data(ID *id, const ID *id_from, const short do_action)
 }
 
 /* used everywhere in blenkernel */
-void *copy_libblock(void *rt)
+void *copy_libblock(ID *id)
 {
-       ID *idn, *id;
+       ID *idn;
        ListBase *lb;
-       char *cp, *cpn;
        size_t idn_len;
-       
-       id= rt;
 
        lb= which_libbase(G.main, GS(id->name));
        idn= alloc_libblock(lb, GS(id->name), id->name+2);
@@ -733,8 +730,9 @@ void *copy_libblock(void *rt)
 
        idn_len= MEM_allocN_len(idn);
        if((int)idn_len - (int)sizeof(ID) > 0) { /* signed to allow neg result */
-               cp= (char *)id;
-               cpn= (char *)idn;
+               const char *cp= (const char *)id;
+               char *cpn= (char *)idn;
+
                memcpy(cpn+sizeof(ID), cp+sizeof(ID), idn_len - sizeof(ID));
        }