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
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2020-10-14 15:42:42 +0300
committerHans Goudey <h.goudey@me.com>2020-10-14 15:42:42 +0300
commit9d2222b7d16c562a96f16e261b79afff444da9ba (patch)
tree26e8e54cd66898eca727eda9d84a20964244aa89 /source/blender/editors/space_buttons/buttons_context.c
parent3e25f70dddb1741cb80eb51a4de13d4fb93b1ee0 (diff)
Cleanup: Use enum for return type
This just follows up rB90a27d5aa91a1 with a few changes where changes were missed.
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_context.c')
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c10
1 files changed, 5 insertions, 5 deletions
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;