diff options
author | Jacques Lucke <jacques@blender.org> | 2020-03-07 14:21:10 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-03-07 14:21:10 +0300 |
commit | 7c08cd508addf7572faedb0380fde149662aa06f (patch) | |
tree | 296d2d46c40733ca8115136161f2431622338fd7 | |
parent | a9f39fa197e69c307e8cf32992d650a2c8b90ae1 (diff) |
improve naming
-rw-r--r-- | source/blender/blenloader/BLO_readfile.h | 6 | ||||
-rw-r--r-- | source/blender/blenloader/BLO_writefile.h | 24 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 8 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 28 |
4 files changed, 33 insertions, 33 deletions
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h index df1d9bc3d1f..e0466cfaccb 100644 --- a/source/blender/blenloader/BLO_readfile.h +++ b/source/blender/blenloader/BLO_readfile.h @@ -176,10 +176,10 @@ struct BlendThumbnail *BLO_thumbnail_from_file(const char *filepath); extern const struct bTheme U_theme_default; extern const struct UserDef U_default; -typedef struct BloReadData BloReadData; +typedef struct BloReader BloReader; -void *BLO_read_new_address(BloReadData *rd, const void *old_address); -bool BLO_read_requires_endian_switch(BloReadData *rd); +void *BLO_read_new_address(BloReader *reader, const void *old_address); +bool BLO_read_requires_endian_switch(BloReader *reader); #ifdef __cplusplus } diff --git a/source/blender/blenloader/BLO_writefile.h b/source/blender/blenloader/BLO_writefile.h index db29ea5e5c0..18c410bc416 100644 --- a/source/blender/blenloader/BLO_writefile.h +++ b/source/blender/blenloader/BLO_writefile.h @@ -40,26 +40,26 @@ extern bool BLO_write_file_mem(struct Main *mainvar, struct MemFile *current, int write_flags); -typedef struct BloWriteData BloWriteData; +typedef struct BloWriter BloWriter; -void BLO_write_data(BloWriteData *wd, const void *data_ptr, int length); -void BLO_write_struct_by_name(BloWriteData *wd, const char *struct_name, const void *data_ptr); -void BLO_write_struct_array_by_name(BloWriteData *wd, +void BLO_write_data(BloWriter *writer, const void *data_ptr, int length); +void BLO_write_struct_by_name(BloWriter *writer, const char *struct_name, const void *data_ptr); +void BLO_write_struct_array_by_name(BloWriter *writer, const char *struct_name, const void *data_ptr, int array_size); -void BLO_write_struct_by_id(BloWriteData *wd, int struct_id, const void *data_ptr); -void BLO_write_struct_array_by_id(BloWriteData *wd, +void BLO_write_struct_by_id(BloWriter *writer, int struct_id, const void *data_ptr); +void BLO_write_struct_array_by_id(BloWriter *writer, int struct_id, const void *data_ptr, int array_size); -int BLO_get_struct_id_by_name(BloWriteData *wd, const char *struct_name); -#define BLO_get_struct_id(wd, struct_name) BLO_get_struct_id_by_name(wd, ##struct_name) +int BLO_get_struct_id_by_name(BloWriter *writer, const char *struct_name); +#define BLO_get_struct_id(writer, struct_name) BLO_get_struct_id_by_name(writer, ##struct_name) -#define BLO_write_struct(wd, struct_name, data_ptr) \ - BLO_write_struct_by_id(wd, BLO_get_struct_id(struct_name), data_ptr) -#define BLO_write_struct_array(wd, struct_name, data_ptr, array_size) \ - BLO_write_struct_array_by_id(wd, BLO_get_struct_id(struct_name), data_ptr, array_size) +#define BLO_write_struct(writer, struct_name, data_ptr) \ + BLO_write_struct_by_id(writer, BLO_get_struct_id(struct_name), data_ptr) +#define BLO_write_struct_array(writer, struct_name, data_ptr, array_size) \ + BLO_write_struct_array_by_id(writer, BLO_get_struct_id(struct_name), data_ptr, array_size) #endif diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index bdf10977b6f..3deae368ee0 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -11879,14 +11879,14 @@ static void read_libraries(FileData *basefd, ListBase *mainlist) BKE_main_free(main_newid); } -void *BLO_read_new_address(BloReadData *rd, const void *old_address) +void *BLO_read_new_address(BloReader *reader, const void *old_address) { - return newdataadr((FileData *)rd, old_address); + return newdataadr((FileData *)reader, old_address); } -bool BLO_read_requires_endian_switch(BloReadData *rd) +bool BLO_read_requires_endian_switch(BloReader *reader) { - return (((FileData *)rd)->flags & FD_FLAGS_SWITCH_ENDIAN) != 0; + return (((FileData *)reader)->flags & FD_FLAGS_SWITCH_ENDIAN) != 0; } /** \} */ diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 49b920debc0..14cb8c6b2c3 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -4173,42 +4173,42 @@ bool BLO_write_file_mem(Main *mainvar, MemFile *compare, MemFile *current, int w return (err == 0); } -void BLO_write_data(BloWriteData *wd, const void *data_ptr, int length) +void BLO_write_data(BloWriter *writer, const void *data_ptr, int length) { - writedata((WriteData *)wd, DATA, length, data_ptr); + writedata((WriteData *)writer, DATA, length, data_ptr); } -void BLO_write_struct_by_name(BloWriteData *wd, const char *struct_name, const void *data_ptr) +void BLO_write_struct_by_name(BloWriter *writer, const char *struct_name, const void *data_ptr) { - int struct_id = BLO_get_struct_id_by_name(wd, struct_name); - BLO_write_struct_by_id(wd, struct_id, data_ptr); + int struct_id = BLO_get_struct_id_by_name(writer, struct_name); + BLO_write_struct_by_id(writer, struct_id, data_ptr); } -void BLO_write_struct_array_by_name(BloWriteData *wd, +void BLO_write_struct_array_by_name(BloWriter *writer, const char *struct_name, const void *data_ptr, int array_size) { - int struct_id = BLO_get_struct_id_by_name(wd, struct_name); - BLO_write_struct_array_by_id(wd, struct_id, data_ptr, array_size); + int struct_id = BLO_get_struct_id_by_name(writer, struct_name); + BLO_write_struct_array_by_id(writer, struct_id, data_ptr, array_size); } -void BLO_write_struct_by_id(BloWriteData *wd, int struct_id, const void *data_ptr) +void BLO_write_struct_by_id(BloWriter *writer, int struct_id, const void *data_ptr) { - writestruct_nr((WriteData *)wd, DATA, struct_id, 1, data_ptr); + writestruct_nr((WriteData *)writer, DATA, struct_id, 1, data_ptr); } -void BLO_write_struct_array_by_id(BloWriteData *wd, +void BLO_write_struct_array_by_id(BloWriter *writer, int struct_id, const void *data_ptr, int array_size) { - writestruct_nr((WriteData *)wd, DATA, struct_id, array_size, data_ptr); + writestruct_nr((WriteData *)writer, DATA, struct_id, array_size, data_ptr); } -int BLO_get_struct_id_by_name(BloWriteData *wd, const char *struct_name) +int BLO_get_struct_id_by_name(BloWriter *writer, const char *struct_name) { - int struct_id = DNA_struct_find_nr(((WriteData *)wd)->sdna, struct_name); + int struct_id = DNA_struct_find_nr(((WriteData *)writer)->sdna, struct_name); BLI_assert(struct_id >= 0); return struct_id; } |