Commit: 5ff64cc9d24a4e072391b7799ba6ab3a57f52dc0
Author: Campbell Barton
Date:   Wed Feb 13 08:10:01 2019 +1100
Branches: temp-dna-rename
https://developer.blender.org/rB5ff64cc9d24a4e072391b7799ba6ab3a57f52dc0

Rename softupdate -> softpatch

===================================================================

M       source/blender/makesdna/intern/dna_genfile.c
M       source/blender/makesdna/intern/dna_utils.c
M       source/blender/makesdna/intern/dna_utils.h
M       source/blender/makesdna/intern/makesdna.c
M       source/blender/makesrna/intern/rna_define.c

===================================================================

diff --git a/source/blender/makesdna/intern/dna_genfile.c 
b/source/blender/makesdna/intern/dna_genfile.c
index 6b597ac3d6b..73ad97b1b15 100644
--- a/source/blender/makesdna/intern/dna_genfile.c
+++ b/source/blender/makesdna/intern/dna_genfile.c
@@ -1497,7 +1497,7 @@ void DNA_sdna_softpatch_runtime_ensure(SDNA *sdna)
        GHash *struct_map_runtime_from_static;
        GHash *elem_map_runtime_from_static;
 
-       DNA_softupdate_maps(
+       DNA_softpatch_maps(
                DNA_VERSION_RUNTIME_FROM_STATIC,
                &struct_map_runtime_from_static,
                &elem_map_runtime_from_static);
diff --git a/source/blender/makesdna/intern/dna_utils.c 
b/source/blender/makesdna/intern/dna_utils.c
index bc849417e21..9b6affa0bb8 100644
--- a/source/blender/makesdna/intern/dna_utils.c
+++ b/source/blender/makesdna/intern/dna_utils.c
@@ -173,14 +173,6 @@ char *DNA_elem_id_rename(
 /* Use for #DNA_VERSIONING_INCLUDE */
 #define DNA_MAKESDNA
 
-static void dna_softupdate_ghash_add_pair(GHash *gh, const char *a, const char 
*b, void *value)
-{
-       const char **str_pair = MEM_mallocN(sizeof(char *) * 2, __func__);
-       str_pair[0] = a;
-       str_pair[1] = b;
-       BLI_ghash_insert(gh, str_pair, value);
-}
-
 static uint strhash_pair_p(const void *ptr)
 {
        const char * const *pair = ptr;
@@ -196,7 +188,7 @@ static bool strhash_pair_cmp(const void *a, const void *b)
                STREQ(pair_a[1], pair_b[1])) ? false : true;
 }
 
-void DNA_softupdate_maps(
+void DNA_softpatch_maps(
         enum eDNAVersionDir version_dir,
         GHash **r_struct_map, GHash **r_elem_map)
 {
@@ -252,8 +244,10 @@ void DNA_softupdate_maps(
                }
                GHash *elem_map = BLI_ghash_new_ex(strhash_pair_p, 
strhash_pair_cmp, __func__, ARRAY_SIZE(data));
                for (int i = 0; i < ARRAY_SIZE(data); i++) {
-                       const char *struct_old = 
BLI_ghash_lookup_default(struct_map_local, data[i][0], (void *)data[i][0]);
-                       dna_softupdate_ghash_add_pair(elem_map, struct_old, 
data[i][elem_key], (void *)data[i][elem_val]);
+                       const char **str_pair = MEM_mallocN(sizeof(char *) * 2, 
__func__);
+                       str_pair[0] = 
BLI_ghash_lookup_default(struct_map_local, data[i][0], (void *)data[i][0]);
+                       str_pair[1] = data[i][elem_key],
+                       BLI_ghash_insert(elem_map, str_pair, (void 
*)data[i][elem_val]);
                }
                *r_elem_map = elem_map;
        }
diff --git a/source/blender/makesdna/intern/dna_utils.h 
b/source/blender/makesdna/intern/dna_utils.h
index c1c0803237b..0b734c86798 100644
--- a/source/blender/makesdna/intern/dna_utils.h
+++ b/source/blender/makesdna/intern/dna_utils.h
@@ -43,8 +43,7 @@ enum eDNAVersionDir {
        DNA_VERSION_STATIC_FROM_RUNTIME = -1,
        DNA_VERSION_RUNTIME_FROM_STATIC = 1,
 };
-
-void DNA_softupdate_maps(
+void DNA_softpatch_maps(
         enum eDNAVersionDir version_dir,
         struct GHash **r_struct_map, struct GHash **r_elem_map);
 
diff --git a/source/blender/makesdna/intern/makesdna.c 
b/source/blender/makesdna/intern/makesdna.c
index d3cde8f95c3..33d74f9af76 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -1056,11 +1056,11 @@ static int make_structDNA(const char *baseDirectory, 
FILE *file, FILE *file_offs
        structs = MEM_callocN(sizeof(short *) * maxnr, "structs");
 
        /* Build versioning data */
-       DNA_softupdate_maps(
+       DNA_softpatch_maps(
                DNA_VERSION_RUNTIME_FROM_STATIC,
                &g_version_data.struct_map_runtime_from_static,
                NULL);
-       DNA_softupdate_maps(
+       DNA_softpatch_maps(
                DNA_VERSION_STATIC_FROM_RUNTIME,
                &g_version_data.struct_map_static_from_runtime,
                &g_version_data.elem_map_static_from_runtime);
diff --git a/source/blender/makesrna/intern/rna_define.c 
b/source/blender/makesrna/intern/rna_define.c
index c59097b40b3..ffe30881a0f 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -593,7 +593,7 @@ BlenderRNA *RNA_create(void)
        DNA_sdna_softpatch_runtime_ensure(DefRNA.sdna);
 
 #ifndef RNA_RUNTIME
-       DNA_softupdate_maps(
+       DNA_softpatch_maps(
                DNA_VERSION_STATIC_FROM_RUNTIME,
                &g_version_data.struct_map_static_from_runtime,
                NULL);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to