diff options
author | Bastien Montagne <bastien@blender.org> | 2022-03-28 13:11:44 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-03-28 13:11:44 +0300 |
commit | 555e7c20912f221c68edb03d62bdbb5516ba4313 (patch) | |
tree | 7343dee815ed9806dac251bbd97431646393003c /source/blender/editors/space_text/text_ops.c | |
parent | da130d751f5b9fc61a336c989af6cc25c9309112 (diff) |
Cleanup: Use bool literals in return statements of text editor poll functions.
Diffstat (limited to 'source/blender/editors/space_text/text_ops.c')
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 22 |
1 files changed, 11 insertions, 11 deletions
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; } /** \} */ |