[Bf-blender-cvs] [555e7c20912] master: Cleanup: Use bool literals in return statements of text editor poll functions.
Bastien Montagne
noreply at git.blender.org
Mon Mar 28 12:12:08 CEST 2022
Commit: 555e7c20912f221c68edb03d62bdbb5516ba4313
Author: Bastien Montagne
Date: Mon Mar 28 12:11:44 2022 +0200
Branches: master
https://developer.blender.org/rB555e7c20912f221c68edb03d62bdbb5516ba4313
Cleanup: Use bool literals in return statements of text editor poll functions.
===================================================================
M source/blender/editors/space_text/text_ops.c
===================================================================
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 15fea301b1c..f5656e13c0e 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -165,7 +165,7 @@ BLI_INLINE int text_pixel_x_to_column(SpaceText *st, const int x)
static bool text_new_poll(bContext *UNUSED(C))
{
- return 1;
+ return true;
}
static bool text_data_poll(bContext *C)
@@ -182,15 +182,15 @@ static bool text_edit_poll(bContext *C)
Text *text = CTX_data_edit_text(C);
if (!text) {
- return 0;
+ return false;
}
if (ID_IS_LINKED(text)) {
// BKE_report(op->reports, RPT_ERROR, "Cannot edit external library data");
- return 0;
+ return false;
}
- return 1;
+ return true;
}
bool text_space_edit_poll(bContext *C)
@@ -199,15 +199,15 @@ bool text_space_edit_poll(bContext *C)
Text *text = CTX_data_edit_text(C);
if (!st || !text) {
- return 0;
+ return false;
}
if (ID_IS_LINKED(text)) {
// BKE_report(op->reports, RPT_ERROR, "Cannot edit external library data");
- return 0;
+ return false;
}
- return 1;
+ return true;
}
static bool text_region_edit_poll(bContext *C)
@@ -217,19 +217,19 @@ static bool text_region_edit_poll(bContext *C)
ARegion *region = CTX_wm_region(C);
if (!st || !text) {
- return 0;
+ return false;
}
if (!region || region->regiontype != RGN_TYPE_WINDOW) {
- return 0;
+ return false;
}
if (ID_IS_LINKED(text)) {
// BKE_report(op->reports, RPT_ERROR, "Cannot edit external library data");
- return 0;
+ return false;
}
- return 1;
+ return true;
}
/** \} */
More information about the Bf-blender-cvs
mailing list