diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-02-12 09:03:16 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-02-12 09:09:57 +0300 |
commit | d968db82b7aac37cd788a490997376004b5ce9eb (patch) | |
tree | 77724503d5638cbcc226e6a94b16a6ff8fe0275a /source/blender/makesdna/intern/dna_genfile.c | |
parent | f96bfde4a5ef3c3c0b2878dec3828a967fda86cc (diff) |
makesdna: add shared utility module
Currently only a single function was duplicated which isn't so bad,
this change is to allow DNA versioning code to be shared between
dna_genfile.c and makesdna.c.
Diffstat (limited to 'source/blender/makesdna/intern/dna_genfile.c')
-rw-r--r-- | source/blender/makesdna/intern/dna_genfile.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index 3d0f4fa1aab..04fd7596e1b 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -134,48 +134,6 @@ # define MAKE_ID(a, b, c, d) ((int)(d) << 24 | (int)(c) << 16 | (b) << 8 | (a)) #endif -/* ************************* MAKE DNA ********************** */ - -/* allowed duplicate code from makesdna.c */ - -/** - * parses the "[n1][n2]..." on the end of an array name and returns the number of array elements n1*n2*... - */ -int DNA_elem_array_size(const char *str) -{ - int result = 1; - int current = 0; - while (true) { - char c = *str++; - switch (c) { - case '\0': - return result; - case '[': - current = 0; - break; - case ']': - result *= current; - break; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - current = current * 10 + (c - '0'); - break; - default: - break; - } - } -} - -/* ************************* END MAKE DNA ********************** */ - /* ************************* DIV ********************** */ void DNA_sdna_free(SDNA *sdna) |