Commit: 9d2222b7d16c562a96f16e261b79afff444da9ba Author: Hans Goudey Date: Wed Oct 14 07:42:42 2020 -0500 Branches: master https://developer.blender.org/rB9d2222b7d16c562a96f16e261b79afff444da9ba
Cleanup: Use enum for return type This just follows up rB90a27d5aa91a1 with a few changes where changes were missed. =================================================================== M source/blender/editors/space_buttons/buttons_context.c =================================================================== diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 64f2afff782..0b018d05058 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -73,11 +73,11 @@ static int set_pointer_type(ButsContextPath *path, bContextDataResult *result, S if (RNA_struct_is_a(ptr->type, type)) { CTX_data_pointer_set(result, ptr->owner_id, ptr->type, ptr->data); - return 1; + return CTX_RESULT_OK; } } - return 0; + return CTX_RESULT_MEMBER_NOT_FOUND; } static PointerRNA *get_pointer_type(ButsContextPath *path, StructRNA *type) @@ -907,7 +907,7 @@ int /*eContextResult*/ buttons_context(const bContext *C, ButsContextTexture *ct = sbuts->texuser; if (!ct) { - return -1; + return CTX_RESULT_NO_DATA; } if (ct->user && ct->user->ptr.data) { @@ -921,7 +921,7 @@ int /*eContextResult*/ buttons_context(const bContext *C, ButsContextTexture *ct = sbuts->texuser; if (!ct) { - return -1; + return CTX_RESULT_NO_DATA; } if (ct->user && ct->user->ptr.data) { @@ -958,7 +958,7 @@ int /*eContextResult*/ buttons_context(const bContext *C, } } else if (ct) { - return 0; /* new shading system */ + return CTX_RESULT_MEMBER_NOT_FOUND; /* new shading system */ } else if ((ptr = get_pointer_type(path, &RNA_FreestyleLineStyle))) { FreestyleLineStyle *ls = ptr->data; _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs