From 4bada78233f5208d77dad8e122034afcf38c1398 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 28 Mar 2022 12:11:44 +0200 Subject: Cleanup: Use bool literals in return statements of text editor poll functions. --- source/blender/editors/space_text/text_ops.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'source/blender/editors/space_text') 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; } /** \} */ -- cgit v1.2.3