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:
authorCampbell Barton <ideasman42@gmail.com>2014-02-03 11:55:59 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-02-03 12:35:44 +0400
commitd900f5be55d0812eb5c7dfd3ea47020c3edafd41 (patch)
tree7d5035e3dbafdcd4988e7ed57068e48c951a989a /source/blender/blenloader
parenta948ae2c5167c49819241572d3aacb4e4bf5b6d7 (diff)
Code cleanup: use bools where possible
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c6
-rw-r--r--source/blender/blenloader/intern/writefile.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 3e10d7440bb..ad1fd3a302c 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -8703,11 +8703,11 @@ static int object_in_any_scene(Main *mainvar, Object *ob)
return 0;
}
-static void give_base_to_objects(Main *mainvar, Scene *sce, Library *lib, const short idcode, const short is_link, const short active_lay)
+static void give_base_to_objects(Main *mainvar, Scene *sce, Library *lib, const short idcode, const bool is_link, const short active_lay)
{
Object *ob;
Base *base;
- const short is_group_append = (is_link==FALSE && idcode==ID_GR);
+ const bool is_group_append = (is_link == false && idcode == ID_GR);
/* give all objects which are LIB_INDIRECT a base, or for a group when *lib has been set */
for (ob = mainvar->object.first; ob; ob = ob->id.next) {
@@ -9015,7 +9015,7 @@ static void library_append_end(const bContext *C, Main *mainl, FileData **fd, in
/* give a base to loose objects. If group append, do it for objects too */
if (scene) {
- const short is_link = (flag & FILE_LINK) != 0;
+ const bool is_link = (flag & FILE_LINK) != 0;
if (idcode == ID_SCE) {
/* don't instance anything when linking in scenes, assume the scene its self instances the data */
}
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 238ba0cce2f..0b582dacc5c 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -3418,7 +3418,7 @@ static int write_file_handle(Main *mainvar, int handle, MemFile *compare, MemFil
/* do reverse file history: .blend1 -> .blend2, .blend -> .blend1 */
/* return: success(0), failure(1) */
-static int do_history(const char *name, ReportList *reports)
+static bool do_history(const char *name, ReportList *reports)
{
char tempname1[FILE_MAX], tempname2[FILE_MAX];
int hisnr= U.versions;
@@ -3524,7 +3524,7 @@ int BLO_write_file(Main *mainvar, const char *filepath, int write_flags, ReportL
/* file save to temporary file was successful */
/* now do reverse file history (move .blend1 -> .blend2, .blend -> .blend1) */
if (write_flags & G_FILE_HISTORY) {
- int err_hist = do_history(filepath, reports);
+ const bool err_hist = do_history(filepath, reports);
if (err_hist) {
BKE_report(reports, RPT_ERROR, "Version backup failed (file saved with @)");
return 0;