diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-17 07:46:34 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-17 10:04:28 +0400 |
commit | 1b9db9911d9cbcb81d58277084b9c4c5daf84e8a (patch) | |
tree | b840209b9de94432cb4e5d61567e46741870b504 /source/blender/editors/interface | |
parent | 4219e44f1d89cfd6ccdf3adc0fd73e22ae7b6df3 (diff) |
Code cleanup: use bools
also rename BLI_omp_thread_count -> BLI_system_thread_count_omp
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 2 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_intern.h | 2 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 10 |
3 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 398d901c950..b4dc74cc9e5 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -6248,7 +6248,7 @@ void uiFreeActiveButtons(const bContext *C, bScreen *screen) /* returns true if highlighted button allows drop of names */ /* called in region context */ -int UI_but_active_drop_name(bContext *C) +bool UI_but_active_drop_name(bContext *C) { ARegion *ar = CTX_wm_region(C); uiBut *but = ui_but_find_activated(ar); diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index 48fadee9211..a38a733a461 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -549,7 +549,7 @@ void ui_draw_menu_back(struct uiStyle *style, uiBlock *block, rcti *rect); uiWidgetColors *ui_tooltip_get_theme(void); void ui_draw_tooltip_background(uiStyle *UNUSED(style), uiBlock *block, rcti *rect); void ui_draw_search_back(struct uiStyle *style, uiBlock *block, rcti *rect); -int ui_link_bezier_points(const rcti *rect, float coord_array[][2], int resol); +bool ui_link_bezier_points(const rcti *rect, float coord_array[][2], int resol); void ui_draw_link_bezier(const rcti *rect); extern void ui_draw_but(const struct bContext *C, ARegion *ar, struct uiStyle *style, uiBut *but, rcti *rect); diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index ff749289636..774eb1cdba9 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -2462,7 +2462,7 @@ static void widget_numbut_embossn(uiBut *UNUSED(but), uiWidgetColors *wcol, rcti widget_numbut_draw(wcol, rect, state, roundboxalign, true); } -int ui_link_bezier_points(const rcti *rect, float coord_array[][2], int resol) +bool ui_link_bezier_points(const rcti *rect, float coord_array[][2], int resol) { float dist, vec[4][2]; @@ -2479,9 +2479,9 @@ int ui_link_bezier_points(const rcti *rect, float coord_array[][2], int resol) vec[2][0] = vec[3][0] - dist; vec[2][1] = vec[3][1]; - BKE_curve_forward_diff_bezier(vec[0][0], vec[1][0], vec[2][0], vec[3][0], coord_array[0], resol, sizeof(float) * 2); - BKE_curve_forward_diff_bezier(vec[0][1], vec[1][1], vec[2][1], vec[3][1], coord_array[0] + 1, resol, sizeof(float) * 2); - + BKE_curve_forward_diff_bezier(vec[0][0], vec[1][0], vec[2][0], vec[3][0], &coord_array[0][0], resol, sizeof(float[2])); + BKE_curve_forward_diff_bezier(vec[0][1], vec[1][1], vec[2][1], vec[3][1], &coord_array[0][1], resol, sizeof(float[2])); + return 1; } @@ -2489,7 +2489,7 @@ int ui_link_bezier_points(const rcti *rect, float coord_array[][2], int resol) void ui_draw_link_bezier(const rcti *rect) { float coord_array[LINK_RESOL + 1][2]; - + if (ui_link_bezier_points(rect, coord_array, LINK_RESOL)) { /* we can reuse the dist variable here to increment the GL curve eval amount*/ // const float dist = 1.0f / (float)LINK_RESOL; // UNUSED |