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
path: root/source
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-09-09 11:44:46 +0300
committerJacques Lucke <jacques@blender.org>2020-09-09 11:44:46 +0300
commit916497627ce07318bb9bc82aabcb42af9561c560 (patch)
treeb9fe6b958087d04c870881a85c33bf7081e02235 /source
parent095142eae65820c8daf246def0866ac6accc9c87 (diff)
Cleanup: use bool instead of int
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/BKE_armature.h2
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf_inline.h6
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf_legacy.c6
-rw-r--r--source/blender/blenkernel/intern/armature.c8
-rw-r--r--source/blender/blenkernel/intern/blendfile.c6
5 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h
index 7c5d0011465..8164d34f32b 100644
--- a/source/blender/blenkernel/BKE_armature.h
+++ b/source/blender/blenkernel/BKE_armature.h
@@ -83,7 +83,7 @@ struct BoundBox *BKE_armature_boundbox_get(struct Object *ob);
bool BKE_pose_minmax(
struct Object *ob, float r_min[3], float r_max[3], bool use_hidden, bool use_select);
-int bone_autoside_name(char name[64], int strip_number, short axis, float head, float tail);
+bool bone_autoside_name(char name[64], int strip_number, short axis, float head, float tail);
struct Bone *BKE_armature_find_bone_name(struct bArmature *arm, const char *name);
diff --git a/source/blender/blenkernel/intern/CCGSubSurf_inline.h b/source/blender/blenkernel/intern/CCGSubSurf_inline.h
index 8aa1fede57d..91a7129b433 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf_inline.h
+++ b/source/blender/blenkernel/intern/CCGSubSurf_inline.h
@@ -213,15 +213,15 @@ BLI_INLINE void Normalize(float no[3])
/* Data layers mathematics. */
-BLI_INLINE int VertDataEqual(const float a[], const float b[], const CCGSubSurf *ss)
+BLI_INLINE bool VertDataEqual(const float a[], const float b[], const CCGSubSurf *ss)
{
int i;
for (i = 0; i < ss->meshIFC.numLayers; i++) {
if (a[i] != b[i]) {
- return 0;
+ return false;
}
}
- return 1;
+ return true;
}
BLI_INLINE void VertDataZero(float v[], const CCGSubSurf *ss)
diff --git a/source/blender/blenkernel/intern/CCGSubSurf_legacy.c b/source/blender/blenkernel/intern/CCGSubSurf_legacy.c
index 8fc9afd58f1..b723d39ca08 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf_legacy.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf_legacy.c
@@ -47,15 +47,15 @@ static int _edge_isBoundary(const CCGEdge *e)
return e->numFaces < 2;
}
-static int _vert_isBoundary(const CCGVert *v)
+static bool _vert_isBoundary(const CCGVert *v)
{
int i;
for (i = 0; i < v->numEdges; i++) {
if (_edge_isBoundary(v->edges[i])) {
- return 1;
+ return true;
}
}
- return 0;
+ return false;
}
static CCGVert *_edge_getOtherVert(CCGEdge *e, CCGVert *vQ)
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 3b73702cf0f..a653087f961 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -565,7 +565,7 @@ void BKE_armature_refresh_layer_used(struct Depsgraph *depsgraph, struct bArmatu
* unique names afterwards) strip_number: removes number extensions (TODO: not used)
* axis: the axis to name on
* head/tail: the head/tail co-ordinate of the bone on the specified axis */
-int bone_autoside_name(
+bool bone_autoside_name(
char name[MAXBONENAME], int UNUSED(strip_number), short axis, float head, float tail)
{
unsigned int len;
@@ -574,7 +574,7 @@ int bone_autoside_name(
len = strlen(name);
if (len == 0) {
- return 0;
+ return false;
}
BLI_strncpy(basename, name, sizeof(basename));
@@ -689,9 +689,9 @@ int bone_autoside_name(
BLI_snprintf(name, MAXBONENAME, "%s.%s", basename, extension);
- return 1;
+ return true;
}
- return 0;
+ return false;
}
/** \} */
diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c
index ee60bf79611..4ea8ae555e3 100644
--- a/source/blender/blenkernel/intern/blendfile.c
+++ b/source/blender/blenkernel/intern/blendfile.c
@@ -413,7 +413,7 @@ static void setup_app_blend_file_data(bContext *C,
}
}
-static int handle_subversion_warning(Main *main, ReportList *reports)
+static bool handle_subversion_warning(Main *main, ReportList *reports)
{
if (main->minversionfile > BLENDER_FILE_VERSION ||
(main->minversionfile == BLENDER_FILE_VERSION &&
@@ -425,7 +425,7 @@ static int handle_subversion_warning(Main *main, ReportList *reports)
main->minsubversionfile);
}
- return 1;
+ return true;
}
int BKE_blendfile_read(bContext *C,
@@ -443,7 +443,7 @@ int BKE_blendfile_read(bContext *C,
bfd = BLO_read_from_file(filepath, params->skip_flags, reports);
if (bfd) {
- if (0 == handle_subversion_warning(bfd->main, reports)) {
+ if (!handle_subversion_warning(bfd->main, reports)) {
BKE_main_free(bfd->main);
MEM_freeN(bfd);
bfd = NULL;