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:
authorCampbell Barton <ideasman42@gmail.com>2012-05-17 11:59:25 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-17 11:59:25 +0400
commit599d213115c4df93315e0f481f3fef20f797a4cc (patch)
treec98210c4eb608525877a2c2426bc6480895f6487
parent27f224f12abea85535309a311a169c773a0d9ba7 (diff)
style cleanup: line length and ensure some macros error when not ending with ';'
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c2
-rw-r--r--source/blender/blenkernel/intern/editderivedmesh.c4
-rw-r--r--source/blender/blenkernel/intern/idprop.c3
-rw-r--r--source/blender/blenkernel/intern/image.c3
-rw-r--r--source/blender/blenkernel/intern/mesh.c5
-rw-r--r--source/blender/blenkernel/intern/subsurf_ccg.c4
-rw-r--r--source/blender/blenloader/intern/readfile.c3
-rw-r--r--source/blender/editors/animation/anim_filter.c6
-rw-r--r--source/blender/editors/interface/interface_draw.c38
-rw-r--r--source/blender/editors/interface/interface_handlers.c17
-rw-r--r--source/blender/editors/interface/interface_icons.c3
-rw-r--r--source/blender/editors/interface/interface_intern.h3
-rw-r--r--source/blender/editors/interface/interface_panel.c5
-rw-r--r--source/blender/editors/interface/interface_regions.c23
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c18
-rw-r--r--source/blender/render/intern/source/shadeinput.c2
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c3
17 files changed, 94 insertions, 48 deletions
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index afbabd8d3e5..3450408a0a0 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -522,7 +522,7 @@ static void cdDM_drawFacesSolid(DerivedMesh *dm,
glNormal3sv(no); \
} \
glVertex3fv(mvert[index].co); \
-}
+} (void)0
if (cddm->pbvh && cddm->pbvh_draw) {
if (dm->numTessFaceData) {
diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c
index 9606abbd7c0..3e25281dd08 100644
--- a/source/blender/blenkernel/intern/editderivedmesh.c
+++ b/source/blender/blenkernel/intern/editderivedmesh.c
@@ -1012,7 +1012,7 @@ static void emDM_drawMappedFacesGLSL(DerivedMesh *dm,
float *tang = attribs.tang.array[i * 4 + vert]; \
glVertexAttrib3fvARB(attribs.tang.gl_index, tang); \
} \
-}
+ } (void)0
for (i = 0, ltri = em->looptris[0]; i < em->tottri; i++, ltri += 3) {
@@ -1141,7 +1141,7 @@ static void emDM_drawMappedFacesMat(DerivedMesh *dm,
float *tang = attribs.tang.array[i * 4 + vert]; \
glVertexAttrib4fvARB(attribs.tang.gl_index, tang); \
} \
-}
+ } (void)0
for (i = 0, ltri = em->looptris[0]; i < em->tottri; i++, ltri += 3) {
int drawSmooth;
diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c
index e3735cfd374..42c7869a365 100644
--- a/source/blender/blenkernel/intern/idprop.c
+++ b/source/blender/blenkernel/intern/idprop.c
@@ -299,7 +299,8 @@ static IDProperty *IDP_CopyArray(IDProperty *prop)
s_i = p_i[0]; p_i[0] = p_i[7]; p_i[7] = s_i; \
s_i = p_i[1]; p_i[1] = p_i[6]; p_i[6] = s_i; \
s_i = p_i[2]; p_i[2] = p_i[5]; p_i[5] = s_i; \
- s_i = p_i[3]; p_i[3] = p_i[4]; p_i[4] = s_i; }
+ s_i = p_i[3]; p_i[3] = p_i[4]; p_i[4] = s_i; \
+ } (void)0
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index aff1e65224b..6ee15409857 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -2177,7 +2177,8 @@ static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra)
flag = IB_rect | IB_multilayer;
if (ima->flag & IMA_DO_PREMUL) flag |= IB_premul;
- ibuf = IMB_ibImageFromMemory((unsigned char *)ima->packedfile->data, ima->packedfile->size, flag, "<packed data>");
+ ibuf = IMB_ibImageFromMemory((unsigned char *)ima->packedfile->data,
+ ima->packedfile->size, flag, "<packed data>");
}
else {
flag = IB_rect | IB_multilayer | IB_metadata;
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index e3876f438f7..7a5c43b28f8 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -2092,8 +2092,9 @@ void BKE_mesh_convert_mfaces_to_mpolys(Mesh *mesh)
mp->mat_nr = mf->mat_nr;
mp->flag = mf->flag;
-# define ML(v1, v2) {ml->v = mf->v1; ml->e = GET_INT_FROM_POINTER(BLI_edgehash_lookup(eh, mf->v1, mf->v2)); ml++; j++; \
-}
+# define ML(v1, v2) { \
+ ml->v = mf->v1; ml->e = GET_INT_FROM_POINTER(BLI_edgehash_lookup(eh, mf->v1, mf->v2)); ml++; j++; \
+ } (void)0
ML(v1, v2);
ML(v2, v3);
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c
index 19edcf6ac64..aec54ba827a 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -1816,7 +1816,7 @@ static void ccgDM_drawMappedFacesGLSL(DerivedMesh *dm,
float *tang = attribs.tang.array[a * 4 + vert]; \
glVertexAttrib4fvARB(attribs.tang.gl_index, tang); \
} \
-}
+} (void)0
totface = ccgSubSurf_getNumFaces(ss);
for (a = 0, i = 0; i < totface; i++) {
@@ -1972,7 +1972,7 @@ static void ccgDM_drawMappedFacesMat(DerivedMesh *dm,
float *tang = attribs.tang.array[a * 4 + vert]; \
glVertexAttrib4fvARB(attribs.tang.gl_index, tang); \
} \
-}
+} (void)0
totface = ccgSubSurf_getNumFaces(ss);
for (a = 0, i = 0; i < totface; i++) {
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index b6e9c701a83..ae691f07c7d 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -231,7 +231,8 @@ READ
s_i=p_i[0]; p_i[0]=p_i[7]; p_i[7]=s_i; \
s_i=p_i[1]; p_i[1]=p_i[6]; p_i[6]=s_i; \
s_i=p_i[2]; p_i[2]=p_i[5]; p_i[5]=s_i; \
- s_i=p_i[3]; p_i[3]=p_i[4]; p_i[4]=s_i; }
+ s_i=p_i[3]; p_i[3]=p_i[4]; p_i[4]=s_i; \
+} (void)0
/***/
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index fcf424e34dc..160e6957513 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -379,7 +379,7 @@ short ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
/* ... standard sub-channel filtering can go on here now ... */
#define END_ANIMFILTER_SUBCHANNELS \
filter_mode = _filter; \
- }
+ } (void)0
/* ............................... */
@@ -447,7 +447,7 @@ short ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
} \
} \
} \
- }
+ } (void)0
/* ............................... */
@@ -467,7 +467,7 @@ short ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
items ++; \
ale_statement \
} \
- }
+ } (void)0
#define ANIMCHANNEL_NEW_CHANNEL(channel_data, channel_type, owner_id) \
ANIMCHANNEL_NEW_CHANNEL_FULL(channel_data, channel_type, owner_id, {})
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index 8c5913e23fb..2f9e763a7d0 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -252,7 +252,8 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl
/* linear vertical shade within button or in outline */
/* view2d scrollers use it */
-void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float maxy, float rad, float shadeLeft, float shadeRight)
+void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float maxy,
+ float rad, float shadeLeft, float shadeRight)
{
float vec[7][2] = {{0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293},
{0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}};
@@ -656,7 +657,8 @@ static void draw_scope_end(rctf *rect, GLint *scissor)
uiDrawBox(GL_LINE_LOOP, rect->xmin - 1, rect->ymin, rect->xmax + 1, rect->ymax + 1, 3.0f);
}
-static void histogram_draw_one(float r, float g, float b, float alpha, float x, float y, float w, float h, float *data, int res)
+static void histogram_draw_one(float r, float g, float b, float alpha,
+ float x, float y, float w, float h, float *data, int res)
{
int i;
@@ -716,7 +718,10 @@ void ui_draw_but_HISTOGRAM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol)
/* need scissor test, histogram can draw outside of boundary */
glGetIntegerv(GL_VIEWPORT, scissor);
- glScissor(ar->winrct.xmin + (rect.xmin - 1), ar->winrct.ymin + (rect.ymin - 1), (rect.xmax + 1) - (rect.xmin - 1), (rect.ymax + 1) - (rect.ymin - 1));
+ glScissor(ar->winrct.xmin + (rect.xmin - 1),
+ ar->winrct.ymin + (rect.ymin - 1),
+ (rect.xmax + 1) - (rect.xmin - 1),
+ (rect.ymax + 1) - (rect.ymin - 1));
glColor4f(1.f, 1.f, 1.f, 0.08f);
/* draw grid lines here */
@@ -786,7 +791,10 @@ void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol),
/* need scissor test, waveform can draw outside of boundary */
glGetIntegerv(GL_VIEWPORT, scissor);
- glScissor(ar->winrct.xmin + (rect.xmin - 1), ar->winrct.ymin + (rect.ymin - 1), (rect.xmax + 1) - (rect.xmin - 1), (rect.ymax + 1) - (rect.ymin - 1));
+ glScissor(ar->winrct.xmin + (rect.xmin - 1),
+ ar->winrct.ymin + (rect.ymin - 1),
+ (rect.xmax + 1) - (rect.xmin - 1),
+ (rect.ymax + 1) - (rect.ymin - 1));
glColor4f(1.f, 1.f, 1.f, 0.08f);
/* draw grid lines here */
@@ -851,7 +859,12 @@ void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol),
}
/* RGB / YCC (3 channels) */
- else if (ELEM4(scopes->wavefrm_mode, SCOPES_WAVEFRM_RGB, SCOPES_WAVEFRM_YCC_601, SCOPES_WAVEFRM_YCC_709, SCOPES_WAVEFRM_YCC_JPEG)) {
+ else if (ELEM4(scopes->wavefrm_mode,
+ SCOPES_WAVEFRM_RGB,
+ SCOPES_WAVEFRM_YCC_601,
+ SCOPES_WAVEFRM_YCC_709,
+ SCOPES_WAVEFRM_YCC_JPEG))
+ {
int rgb = (scopes->wavefrm_mode == SCOPES_WAVEFRM_RGB);
glBlendFunc(GL_ONE, GL_ONE);
@@ -996,7 +1009,10 @@ void ui_draw_but_VECTORSCOPE(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wco
/* need scissor test, hvectorscope can draw outside of boundary */
glGetIntegerv(GL_VIEWPORT, scissor);
- glScissor(ar->winrct.xmin + (rect.xmin - 1), ar->winrct.ymin + (rect.ymin - 1), (rect.xmax + 1) - (rect.xmin - 1), (rect.ymax + 1) - (rect.ymin - 1));
+ glScissor(ar->winrct.xmin + (rect.xmin - 1),
+ ar->winrct.ymin + (rect.ymin - 1),
+ (rect.xmax + 1) - (rect.xmin - 1),
+ (rect.ymax + 1) - (rect.ymin - 1));
glColor4f(1.f, 1.f, 1.f, 0.08f);
/* draw grid elements */
@@ -1507,7 +1523,10 @@ void ui_draw_but_TRACKPREVIEW(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wc
/* need scissor test, preview image can draw outside of boundary */
glGetIntegerv(GL_VIEWPORT, scissor);
- glScissor(ar->winrct.xmin + (rect.xmin - 1), ar->winrct.ymin + (rect.ymin - 1), (rect.xmax + 1) - (rect.xmin - 1), (rect.ymax + 1) - (rect.ymin - 1));
+ glScissor(ar->winrct.xmin + (rect.xmin - 1),
+ ar->winrct.ymin + (rect.ymin - 1),
+ (rect.xmax + 1) - (rect.xmin - 1),
+ (rect.ymax + 1) - (rect.ymin - 1));
if (scopes->track_disabled) {
glColor4f(0.7f, 0.3f, 0.3f, 0.3f);
@@ -1550,7 +1569,10 @@ void ui_draw_but_TRACKPREVIEW(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wc
/* draw cross for pizel position */
glTranslatef(off_x + rect.xmin + track_pos[0] * zoomx, off_y + rect.ymin + track_pos[1] * zoomy, 0.f);
- glScissor(ar->winrct.xmin + rect.xmin, ar->winrct.ymin + rect.ymin, rect.xmax - rect.xmin, rect.ymax - rect.ymin);
+ glScissor(ar->winrct.xmin + rect.xmin,
+ ar->winrct.ymin + rect.ymin,
+ rect.xmax - rect.xmin,
+ rect.ymax - rect.ymin);
for (a = 0; a < 2; a++) {
if (a == 1) {
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 94ebdb7c0b9..8b0c3ecfcf3 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -286,7 +286,9 @@ static void ui_apply_but_func(bContext *C, uiBut *but)
* handling is done, i.e. menus are closed, in order to avoid conflicts
* with these functions removing the buttons we are working with */
- if (but->func || but->funcN || block->handle_func || but->rename_func || (but->type == BUTM && block->butm_func) || but->optype || but->rnaprop) {
+ if (but->func || but->funcN || block->handle_func || but->rename_func ||
+ (but->type == BUTM && block->butm_func) || but->optype || but->rnaprop)
+ {
after = MEM_callocN(sizeof(uiAfterFunc), "uiAfterFunc");
if (but->func && ELEM(but, but->func_arg1, but->func_arg2)) {
@@ -4553,7 +4555,8 @@ static int ui_but_menu(bContext *C, uiBut *but)
PointerRNA ptr_props;
if (but->rnapoin.data && but->rnaprop) {
- BLI_snprintf(buf, sizeof(buf), "%s.%s", RNA_struct_identifier(but->rnapoin.type), RNA_property_identifier(but->rnaprop));
+ BLI_snprintf(buf, sizeof(buf), "%s.%s",
+ RNA_struct_identifier(but->rnapoin.type), RNA_property_identifier(but->rnaprop));
WM_operator_properties_create(&ptr_props, "WM_OT_doc_view");
RNA_string_set(&ptr_props, "doc_id", buf);
@@ -5128,8 +5131,10 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s
WM_event_add_ui_handler(C, &data->window->modalhandlers, ui_handler_region_menu, NULL, data);
}
else {
- if (button_modal_state(data->state))
- WM_event_remove_ui_handler(&data->window->modalhandlers, ui_handler_region_menu, NULL, data, 1); /* 1 = postpone free */
+ if (button_modal_state(data->state)) {
+ /* TRUE = postpone free */
+ WM_event_remove_ui_handler(&data->window->modalhandlers, ui_handler_region_menu, NULL, data, TRUE);
+ }
}
}
@@ -6548,7 +6553,7 @@ static void ui_handler_remove_popup(bContext *C, void *userdata)
void UI_add_region_handlers(ListBase *handlers)
{
- WM_event_remove_ui_handler(handlers, ui_handler_region, ui_handler_remove_region, NULL, 0);
+ WM_event_remove_ui_handler(handlers, ui_handler_region, ui_handler_remove_region, NULL, FALSE);
WM_event_add_ui_handler(NULL, handlers, ui_handler_region, ui_handler_remove_region, NULL);
}
@@ -6559,7 +6564,7 @@ void UI_add_popup_handlers(bContext *C, ListBase *handlers, uiPopupBlockHandle *
void UI_remove_popup_handlers(ListBase *handlers, uiPopupBlockHandle *popup)
{
- WM_event_remove_ui_handler(handlers, ui_handler_popup, ui_handler_remove_popup, popup, 0);
+ WM_event_remove_ui_handler(handlers, ui_handler_popup, ui_handler_remove_popup, popup, FALSE);
}
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index e9186aff666..385f74acbd2 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -533,7 +533,8 @@ static void init_internal_icons(void)
}
}
if (bbuf == NULL)
- bbuf = IMB_ibImageFromMemory((unsigned char *)datatoc_blender_icons_png, datatoc_blender_icons_png_size, IB_rect, "<blender icons>");
+ bbuf = IMB_ibImageFromMemory((unsigned char *)datatoc_blender_icons_png,
+ datatoc_blender_icons_png_size, IB_rect, "<blender icons>");
if (bbuf) {
/* free existing texture if any */
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index 9e073055fc3..2c4ec9ac482 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -428,7 +428,8 @@ void ui_but_search_test(uiBut *but);
typedef uiBlock * (*uiBlockHandleCreateFunc)(struct bContext *C, struct uiPopupBlockHandle *handle, void *arg1);
uiPopupBlockHandle *ui_popup_block_create(struct bContext *C, struct ARegion *butregion, uiBut *but,
- uiBlockCreateFunc create_func, uiBlockHandleCreateFunc handle_create_func, void *arg);
+ uiBlockCreateFunc create_func, uiBlockHandleCreateFunc handle_create_func,
+ void *arg);
uiPopupBlockHandle *ui_popup_menu_create(struct bContext *C, struct ARegion *butregion, uiBut *but,
uiMenuCreateFunc create_func, void *arg, char *str);
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index 0be1761eaf5..dc2c3b4eea9 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -1253,7 +1253,8 @@ static void panel_activate_state(const bContext *C, Panel *pa, uiHandlePanelStat
if (data && data->state != PANEL_STATE_ANIMATION) {
/* XXX:
* - the panel tabbing function call below (test_add_new_tabs()) has been commented out
- * "It is too easy to do by accident when reordering panels, is very hard to control and use, and has no real benefit." - BillRey
+ * "It is too easy to do by accident when reordering panels,
+ * is very hard to control and use, and has no real benefit." - BillRey
* Aligorith, 2009Sep
*/
//test_add_new_tabs(ar); // also copies locations of tabs in dragged panel
@@ -1274,7 +1275,7 @@ static void panel_activate_state(const bContext *C, Panel *pa, uiHandlePanelStat
MEM_freeN(data);
pa->activedata = NULL;
- WM_event_remove_ui_handler(&win->modalhandlers, ui_handler_panel, ui_handler_remove_panel, pa, 0);
+ WM_event_remove_ui_handler(&win->modalhandlers, ui_handler_panel, ui_handler_remove_panel, pa, FALSE);
}
else {
if (!data) {
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 9bcda7d86ed..a36b2dd2c45 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -429,7 +429,8 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
/* create tooltip data */
data = MEM_callocN(sizeof(uiTooltipData), "uiTooltipData");
- /* special case, enum rna buttons only have enum item description, use general enum description too before the specific one */
+ /* special case, enum rna buttons only have enum item description,
+ * use general enum description too before the specific one */
if (but->rnaprop && RNA_property_type(but->rnaprop) == PROP_ENUM) {
const char *descr = RNA_property_description(but->rnaprop);
if (descr && descr[0]) {
@@ -448,7 +449,8 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
for (i = 0; i < totitem; i++) {
if (item[i].identifier[0] && item[i].value == value) {
if (item[i].description && item[i].description[0]) {
- BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "%s: %s", item[i].name, item[i].description);
+ BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "%s: %s",
+ item[i].name, item[i].description);
data->color_id[data->totline] = UI_TIP_LC_SUBMENU;
data->totline++;
}
@@ -496,7 +498,9 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
if (unit_type == PROP_UNIT_ROTATION) {
if (RNA_property_type(but->rnaprop) == PROP_FLOAT) {
- float value = RNA_property_array_check(but->rnaprop) ? RNA_property_float_get_index(&but->rnapoin, but->rnaprop, but->rnaindex) : RNA_property_float_get(&but->rnapoin, but->rnaprop);
+ float value = RNA_property_array_check(but->rnaprop) ?
+ RNA_property_float_get_index(&but->rnapoin, but->rnaprop, but->rnaindex) :
+ RNA_property_float_get(&but->rnapoin, but->rnaprop);
BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Radians: %f"), value);
data->color_id[data->totline] = UI_TIP_LC_NORMAL;
data->totline++;
@@ -514,7 +518,8 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
/* rna info */
if ((U.flag & USER_TOOLTIPS_PYTHON) == 0) {
- BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Python: %s.%s"), RNA_struct_identifier(but->rnapoin.type), RNA_property_identifier(but->rnaprop));
+ BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Python: %s.%s"),
+ RNA_struct_identifier(but->rnapoin.type), RNA_property_identifier(but->rnaprop));
data->color_id[data->totline] = UI_TIP_LC_PYTHON;
data->totline++;
}
@@ -1553,7 +1558,9 @@ void ui_popup_block_scrolltest(uiBlock *block)
}
}
-uiPopupBlockHandle *ui_popup_block_create(bContext *C, ARegion *butregion, uiBut *but, uiBlockCreateFunc create_func, uiBlockHandleCreateFunc handle_create_func, void *arg)
+uiPopupBlockHandle *ui_popup_block_create(bContext *C, ARegion *butregion, uiBut *but,
+ uiBlockCreateFunc create_func, uiBlockHandleCreateFunc handle_create_func,
+ void *arg)
{
wmWindow *window = CTX_wm_window(C);
static ARegionType type;
@@ -1881,7 +1888,8 @@ static void ui_update_block_buts_rgb(uiBlock *block, const float rgb[3])
if (rgb_gamma[1] > 1.0f) rgb_gamma[1] = modf(rgb_gamma[1], &intpart);
if (rgb_gamma[2] > 1.0f) rgb_gamma[2] = modf(rgb_gamma[2], &intpart);
- BLI_snprintf(col, sizeof(col), "%02X%02X%02X", FTOCHAR(rgb_gamma[0]), FTOCHAR(rgb_gamma[1]), FTOCHAR(rgb_gamma[2]));
+ BLI_snprintf(col, sizeof(col), "%02X%02X%02X",
+ FTOCHAR(rgb_gamma[0]), FTOCHAR(rgb_gamma[1]), FTOCHAR(rgb_gamma[2]));
strcpy(bt->poin, col);
}
@@ -2382,7 +2390,8 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi
return pup->block;
}
-uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut *but, uiMenuCreateFunc menu_func, void *arg, char *str)
+uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut *but,
+ uiMenuCreateFunc menu_func, void *arg, char *str)
{
wmWindow *window = CTX_wm_window(C);
uiStyle *style = UI_GetStyle();
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index ead85486ec0..9effba5b433 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -114,24 +114,24 @@
(c)[0]= FTOCHAR((f)[0]); \
(c)[1]= FTOCHAR((f)[1]); \
(c)[2]= FTOCHAR((f)[2]); \
-}
+} (void)0
#define IMAPAINT_FLOAT_RGBA_TO_CHAR(c, f) { \
(c)[0]= FTOCHAR((f)[0]); \
(c)[1]= FTOCHAR((f)[1]); \
(c)[2]= FTOCHAR((f)[2]); \
(c)[3]= FTOCHAR((f)[3]); \
-}
+} (void)0
#define IMAPAINT_CHAR_RGB_TO_FLOAT(f, c) { \
(f)[0]= IMAPAINT_CHAR_TO_FLOAT((c)[0]); \
(f)[1]= IMAPAINT_CHAR_TO_FLOAT((c)[1]); \
(f)[2]= IMAPAINT_CHAR_TO_FLOAT((c)[2]); \
-}
+} (void)0
#define IMAPAINT_CHAR_RGBA_TO_FLOAT(f, c) { \
(f)[0]= IMAPAINT_CHAR_TO_FLOAT((c)[0]); \
(f)[1]= IMAPAINT_CHAR_TO_FLOAT((c)[1]); \
(f)[2]= IMAPAINT_CHAR_TO_FLOAT((c)[2]); \
(f)[3]= IMAPAINT_CHAR_TO_FLOAT((c)[3]); \
-}
+} (void)0
#define IMAPAINT_FLOAT_RGB_COPY(a, b) copy_v3_v3(a, b)
@@ -1547,7 +1547,7 @@ static ProjPixel *project_paint_uvpixel_init(
if (ibuf_other->rect_float) { /* float to char */
float rgba[4];
project_face_pixel(tf_other, ibuf_other, w, side, NULL, rgba);
- IMAPAINT_FLOAT_RGBA_TO_CHAR(((ProjPixelClone *)projPixel)->clonepx.ch, rgba)
+ IMAPAINT_FLOAT_RGBA_TO_CHAR(((ProjPixelClone *)projPixel)->clonepx.ch, rgba);
}
else { /* char to char */
project_face_pixel(tf_other, ibuf_other, w, side, ((ProjPixelClone *)projPixel)->clonepx.ch, NULL);
@@ -4206,7 +4206,7 @@ static void imapaint_ibuf_rgb_get(ImBuf *ibuf, int x, int y, const short is_toru
}
else {
char *rrgb = (char *)ibuf->rect + (ibuf->x * y + x) * 4;
- IMAPAINT_CHAR_RGB_TO_FLOAT(r_rgb, rrgb)
+ IMAPAINT_CHAR_RGB_TO_FLOAT(r_rgb, rrgb);
}
}
static void imapaint_ibuf_rgb_set(ImBuf *ibuf, int x, int y, const short is_torus, const float rgb[3])
@@ -4224,7 +4224,7 @@ static void imapaint_ibuf_rgb_set(ImBuf *ibuf, int x, int y, const short is_toru
}
else {
char *rrgb = (char *)ibuf->rect + (ibuf->x * y + x) * 4;
- IMAPAINT_FLOAT_RGB_TO_CHAR(rrgb, rgb)
+ IMAPAINT_FLOAT_RGB_TO_CHAR(rrgb, rgb);
}
}
@@ -4237,7 +4237,9 @@ static int imapaint_ibuf_add_if(ImBuf *ibuf, unsigned int x, unsigned int y, flo
if (torus) imapaint_ibuf_rgb_get(ibuf, x, y, 1, inrgb);
else return 0;
}
- else imapaint_ibuf_rgb_get(ibuf, x, y, 0, inrgb);
+ else {
+ imapaint_ibuf_rgb_get(ibuf, x, y, 0, inrgb);
+ }
outrgb[0] += inrgb[0];
outrgb[1] += inrgb[1];
diff --git a/source/blender/render/intern/source/shadeinput.c b/source/blender/render/intern/source/shadeinput.c
index 038394b47dc..f9b0de5b87d 100644
--- a/source/blender/render/intern/source/shadeinput.c
+++ b/source/blender/render/intern/source/shadeinput.c
@@ -90,7 +90,7 @@ extern struct Render R;
*(v1 + 0) += *(v3 + 0) * (fac); \
*(v1 + 1) += *(v3 + 1) * (fac); \
*(v1 + 2) += *(v3 + 2) * (fac); \
-}
+} (void)0
/* initialize material variables in shadeinput,
* doing inverse gamma correction where applicable */
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 7f3a93258da..d96198413e0 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1270,7 +1270,8 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
extern char datatoc_splash_png[];
extern int datatoc_splash_png_size;
- ImBuf *ibuf = IMB_ibImageFromMemory((unsigned char *)datatoc_splash_png, datatoc_splash_png_size, IB_rect, "<splash screen>");
+ ImBuf *ibuf = IMB_ibImageFromMemory((unsigned char *)datatoc_splash_png,
+ datatoc_splash_png_size, IB_rect, "<splash screen>");
#else
ImBuf *ibuf = NULL;
#endif