diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-03-03 05:35:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-03-03 05:35:21 +0300 |
commit | 1776ad53b9f7c27361b00bb606e927d0e75ba7e2 (patch) | |
tree | 4eb834db64af840f1ced39246a934f81953d1b1b /source/blender/blenloader | |
parent | cfaba8ad6c2b63e2d1f5956cd3209171d1366d38 (diff) |
Cleanup: take Main argument for copy
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/BLO_writefile.h | 6 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 21 |
2 files changed, 16 insertions, 11 deletions
diff --git a/source/blender/blenloader/BLO_writefile.h b/source/blender/blenloader/BLO_writefile.h index 0d66eb743aa..af3bc2dbdcd 100644 --- a/source/blender/blenloader/BLO_writefile.h +++ b/source/blender/blenloader/BLO_writefile.h @@ -38,9 +38,11 @@ struct MemFile; struct Main; struct ReportList; -extern int BLO_write_file(struct Main *mainvar, const char *filepath, int write_flags, +extern bool BLO_write_file( + struct Main *mainvar, const char *filepath, int write_flags, struct ReportList *reports, const struct BlendThumbnail *thumb); -extern int BLO_write_file_mem(struct Main *mainvar, struct MemFile *compare, struct MemFile *current, int write_flags); +extern bool BLO_write_file_mem( + struct Main *mainvar, struct MemFile *compare, struct MemFile *current, int write_flags); #endif diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index e8db2d3679b..4871dc2f161 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -3825,9 +3825,12 @@ static bool do_history(const char *name, ReportList *reports) return 0; } -/* return: success (1) */ -int BLO_write_file( - Main *mainvar, const char *filepath, int write_flags, ReportList *reports, const BlendThumbnail *thumb) +/** + * \return Success. + */ +bool BLO_write_file( + Main *mainvar, const char *filepath, int write_flags, + ReportList *reports, const BlendThumbnail *thumb) { char tempname[FILE_MAX+1]; int err, write_user_block; @@ -3925,14 +3928,14 @@ int BLO_write_file( return 1; } -/* return: success (1) */ -int BLO_write_file_mem(Main *mainvar, MemFile *compare, MemFile *current, int write_flags) +/** + * \return Success. + */ +bool BLO_write_file_mem(Main *mainvar, MemFile *compare, MemFile *current, int write_flags) { int err; err = write_file_handle(mainvar, NULL, compare, current, 0, write_flags, NULL); - - if (err==0) return 1; - return 0; -} + return (err == 0); +} |