Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-09-29 13:12:09 +0300
committerJacques Lucke <jacques@blender.org>2020-09-29 13:12:09 +0300
commit762d93a26b973b61ef52e7326aa8f272ccbe7007 (patch)
tree608e44f29ac506d31a12214261b96841534f85b6 /source/blender/blenloader/intern/writefile.c
parent32d4a67017ecf4af75a9bfde885526550a6534ba (diff)
DNA: use better type for SDNA->structs
The data layout remains exactly the same.. This change just gives all the elements in `SDNA->structs` names, making it more comfortable to work with the data. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D8926
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r--source/blender/blenloader/intern/writefile.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 336276bdd40..74a4ddfd8f3 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -539,7 +539,6 @@ static void writestruct_at_address_nr(
WriteData *wd, int filecode, const int struct_nr, int nr, const void *adr, const void *data)
{
BHead bh;
- const short *sp;
BLI_assert(struct_nr > 0 && struct_nr < SDNA_TYPE_MAX);
@@ -553,9 +552,9 @@ static void writestruct_at_address_nr(
bh.nr = nr;
bh.SDNAnr = struct_nr;
- sp = wd->sdna->structs[bh.SDNAnr];
+ const SDNA_Struct *struct_info = wd->sdna->structs[bh.SDNAnr];
- bh.len = nr * wd->sdna->types_size[sp[0]];
+ bh.len = nr * wd->sdna->types_size[struct_info->type];
if (bh.len == 0) {
return;