diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-25 12:39:02 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-25 12:39:02 +0300 |
commit | ba6abd83b039b20e3022e3179e199a1ae9894066 (patch) | |
tree | eed42f75aafbee46b2cff32bf1d8f886baf94e89 | |
parent | f243390bd685bde392a7f8e132c445f14609f2a4 (diff) |
Cleanup: do not make functions for the pleasure of having functions...
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 0479af3c58f..9ecdc44cd10 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -299,7 +299,7 @@ static int image_paint_poll(bContext *C) return image_paint_poll_ex(C, true); } -static int image_paint_poll_ignore_tool(bContext *C) +static int image_paint_ignore_tool_poll(bContext *C) { return image_paint_poll_ex(C, false); } @@ -1011,11 +1011,6 @@ static int sample_color_modal(bContext *C, wmOperator *op, const wmEvent *event) return OPERATOR_RUNNING_MODAL; } -static int sample_color_poll(bContext *C) -{ - return (image_paint_poll_ignore_tool(C) || image_paint_poll_ignore_tool(C)); -} - void PAINT_OT_sample_color(wmOperatorType *ot) { /* identifiers */ @@ -1027,7 +1022,7 @@ void PAINT_OT_sample_color(wmOperatorType *ot) ot->exec = sample_color_exec; ot->invoke = sample_color_invoke; ot->modal = sample_color_modal; - ot->poll = sample_color_poll; + ot->poll = image_paint_ignore_tool_poll; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; |