diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-03-08 06:44:57 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-03-08 06:44:57 +0300 |
commit | b4f5128b21f1e1348defc68a96f4d4c2b1053fbe (patch) | |
tree | c7d9abb645e3d8dcbca10ea33f0e60e827ee57f9 /source/blender/blenloader | |
parent | 242a278b56114d15b91ad4fa0d370a0c44e87ec3 (diff) |
Cleanup: rename offs to offset
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 12 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.h | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 2200f7c291b..2eba9af233c 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -967,15 +967,15 @@ static BHead *blo_bhead_read_full(FileData *fd, BHead *thisblock) /* Warning! Caller's responsibility to ensure given bhead **is** an ID one! */ const char *blo_bhead_id_name(const FileData *fd, const BHead *bhead) { - return (const char *)POINTER_OFFSET(bhead, sizeof(*bhead) + fd->id_name_offs); + return (const char *)POINTER_OFFSET(bhead, sizeof(*bhead) + fd->id_name_offset); } /* Warning! Caller's responsibility to ensure given bhead **is** an ID one! */ AssetMetaData *blo_bhead_id_asset_data_address(const FileData *fd, const BHead *bhead) { BLI_assert(BKE_idtype_idcode_is_valid(bhead->code)); - return (fd->id_asset_data_offs >= 0) ? - *(AssetMetaData **)POINTER_OFFSET(bhead, sizeof(*bhead) + fd->id_asset_data_offs) : + return (fd->id_asset_data_offset >= 0) ? + *(AssetMetaData **)POINTER_OFFSET(bhead, sizeof(*bhead) + fd->id_asset_data_offset) : NULL; } @@ -1054,9 +1054,9 @@ static bool read_file_dna(FileData *fd, const char **r_error_message) fd->reconstruct_info = DNA_reconstruct_info_create( fd->filesdna, fd->memsdna, fd->compflags); /* used to retrieve ID names from (bhead+1) */ - fd->id_name_offs = DNA_elem_offset(fd->filesdna, "ID", "char", "name[]"); - BLI_assert(fd->id_name_offs != -1); - fd->id_asset_data_offs = DNA_elem_offset( + fd->id_name_offset = DNA_elem_offset(fd->filesdna, "ID", "char", "name[]"); + BLI_assert(fd->id_name_offset != -1); + fd->id_asset_data_offset = DNA_elem_offset( fd->filesdna, "ID", "AssetMetaData", "*asset_data"); return true; diff --git a/source/blender/blenloader/intern/readfile.h b/source/blender/blenloader/intern/readfile.h index b81d8bd9a2b..7c14c7a19bf 100644 --- a/source/blender/blenloader/intern/readfile.h +++ b/source/blender/blenloader/intern/readfile.h @@ -110,10 +110,10 @@ typedef struct FileData { int fileversion; /** Used to retrieve ID names from (bhead+1). */ - int id_name_offs; + int id_name_offset; /** Used to retrieve asset data from (bhead+1). NOTE: This may not be available in old files, * will be -1 then! */ - int id_asset_data_offs; + int id_asset_data_offset; /** For do_versions patching. */ int globalf, fileflags; |