diff options
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 6f9f3eec31d..ed4f997a856 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -241,9 +241,8 @@ static bool ww_open_none(WriteWrap *ww, const char *filepath) FILE_HANDLE(ww) = file; return true; } - else { - return false; - } + + return false; } static bool ww_close_none(WriteWrap *ww) { @@ -268,9 +267,8 @@ static bool ww_open_zlib(WriteWrap *ww, const char *filepath) FILE_HANDLE(ww) = file; return true; } - else { - return false; - } + + return false; } static bool ww_close_zlib(WriteWrap *ww) { @@ -2015,7 +2013,7 @@ static void write_curve(BlendWriter *writer, Curve *cu, const void *id_address) if (cu->vfont) { BLO_write_raw(writer, cu->len + 1, cu->str); - BLO_write_struct_array(writer, CharInfo, cu->len_wchar + 1, cu->strinfo); + BLO_write_struct_array(writer, CharInfo, cu->len_char32 + 1, cu->strinfo); BLO_write_struct_array(writer, TextBox, cu->totbox, cu->tb); } else { @@ -2848,12 +2846,12 @@ static void write_uilist(BlendWriter *writer, uiList *ui_list) } } -static void write_soops(BlendWriter *writer, SpaceOutliner *so) +static void write_space_outliner(BlendWriter *writer, SpaceOutliner *space_outliner) { - BLI_mempool *ts = so->treestore; + BLI_mempool *ts = space_outliner->treestore; if (ts) { - SpaceOutliner so_flat = *so; + SpaceOutliner space_outliner_flat = *space_outliner; int elems = BLI_mempool_len(ts); /* linearize mempool to array */ @@ -2874,7 +2872,7 @@ static void write_soops(BlendWriter *writer, SpaceOutliner *so) ts_flat.totelem = elems; ts_flat.data = data_addr; - BLO_write_struct(writer, SpaceOutliner, so); + BLO_write_struct(writer, SpaceOutliner, space_outliner); BLO_write_struct_at_address(writer, TreeStore, ts, &ts_flat); BLO_write_struct_array_at_address(writer, TreeStoreElem, elems, data_addr, data); @@ -2882,12 +2880,12 @@ static void write_soops(BlendWriter *writer, SpaceOutliner *so) MEM_freeN(data); } else { - so_flat.treestore = NULL; - BLO_write_struct_at_address(writer, SpaceOutliner, so, &so_flat); + space_outliner_flat.treestore = NULL; + BLO_write_struct_at_address(writer, SpaceOutliner, space_outliner, &space_outliner_flat); } } else { - BLO_write_struct(writer, SpaceOutliner, so); + BLO_write_struct(writer, SpaceOutliner, space_outliner); } } @@ -2963,8 +2961,8 @@ static void write_area_regions(BlendWriter *writer, ScrArea *area) BLO_write_struct(writer, SpaceSeq, sl); } else if (sl->spacetype == SPACE_OUTLINER) { - SpaceOutliner *so = (SpaceOutliner *)sl; - write_soops(writer, so); + SpaceOutliner *space_outliner = (SpaceOutliner *)sl; + write_space_outliner(writer, space_outliner); } else if (sl->spacetype == SPACE_IMAGE) { BLO_write_struct(writer, SpaceImage, sl); @@ -3875,7 +3873,7 @@ static void write_simulation(BlendWriter *writer, Simulation *simulation, const } } - BLO_write_struct_list(writer, PersistentDataHandleItem, &simulation->persistent_data_handles); + BLO_write_struct_list(writer, SimulationDependency, &simulation->dependencies); } } @@ -4060,8 +4058,9 @@ static bool write_file_handle(Main *mainvar, * avoid thumbnail detecting changes because of this. */ mywrite_flush(wd); - OverrideLibraryStorage *override_storage = - wd->use_memfile ? NULL : BKE_lib_override_library_operations_store_initialize(); + OverrideLibraryStorage *override_storage = wd->use_memfile ? + NULL : + BKE_lib_override_library_operations_store_init(); #define ID_BUFFER_STATIC_SIZE 8192 /* This outer loop allows to save first data-blocks from real mainvar, @@ -4612,7 +4611,7 @@ void BLO_write_pointer_array(BlendWriter *writer, int size, const void *data_ptr void BLO_write_float3_array(BlendWriter *writer, int size, const float *data_ptr) { - BLO_write_raw(writer, sizeof(float) * 3 * size, data_ptr); + BLO_write_raw(writer, sizeof(float[3]) * size, data_ptr); } /** |