cleanup: style

This commit is contained in:
Campbell Barton 2015-02-07 04:33:48 +11:00
parent fa9e42b57d
commit b12f3cbee7
27 changed files with 42 additions and 42 deletions

@ -88,7 +88,7 @@ void BKE_userdef_free(void);
void BKE_userdef_state(void);
/* set this callback when a UI is running */
void set_blender_test_break_cb(void (*func)(void) );
void set_blender_test_break_cb(void (*func)(void));
int blender_test_break(void);
#define BKE_UNDO_STR_MAX 64

@ -107,8 +107,8 @@ void BKE_library_make_local(struct Main *bmain, struct Library *lib, bool untagg
struct ID *BKE_libblock_find_name_ex(struct Main *bmain, const short type, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
struct ID *BKE_libblock_find_name(const short type, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
void set_free_windowmanager_cb(void (*func)(struct bContext *, struct wmWindowManager *) );
void set_free_notifier_reference_cb(void (*func)(const void *) );
void set_free_windowmanager_cb(void (*func)(struct bContext *, struct wmWindowManager *));
void set_free_notifier_reference_cb(void (*func)(const void *));
/* use when "" is given to new_id() */
#define ID_FALLBACK_NAME N_("Untitled")

@ -573,7 +573,7 @@ int BKE_write_file_userdef(const char *filepath, ReportList *reports)
static void (*blender_test_break_cb)(void) = NULL;
void set_blender_test_break_cb(void (*func)(void) )
void set_blender_test_break_cb(void (*func)(void))
{
blender_test_break_cb = func;
}

@ -219,8 +219,8 @@ static int group_object_unlink_internal(Group *group, Object *ob)
return removed;
}
static bool group_object_cyclic_check_internal(Object *object, Group *group) {
static bool group_object_cyclic_check_internal(Object *object, Group *group)
{
if (object->dup_group) {
Group *dup_group = object->dup_group;
if ((dup_group->id.flag & LIB_DOIT) == 0) {

@ -1571,7 +1571,7 @@ void test_idbutton(char *name)
ID *idtest;
lb = which_libbase(G.main, GS(name) );
lb = which_libbase(G.main, GS(name));
if (lb == NULL) return;
/* search for id */
@ -1590,7 +1590,7 @@ void rename_id(ID *id, const char *name)
ListBase *lb;
BLI_strncpy(id->name + 2, name, sizeof(id->name) - 2);
lb = which_libbase(G.main, GS(id->name) );
lb = which_libbase(G.main, GS(id->name));
new_id(lb, id, name);
}

@ -89,7 +89,7 @@ static void shrinkwrap_calc_nearest_vertex(ShrinkwrapCalcData *calc)
nearest.index = -1;
nearest.dist_sq = FLT_MAX;
#ifndef __APPLE__
#pragma omp parallel for default(none) private(i) firstprivate(nearest) shared(treeData, calc) schedule(static) if(calc->numVerts > BKE_MESH_OMP_LIMIT)
#pragma omp parallel for default(none) private(i) firstprivate(nearest) shared(treeData, calc) schedule(static) if (calc->numVerts > BKE_MESH_OMP_LIMIT)
#endif
for (i = 0; i < calc->numVerts; ++i) {
float *co = calc->vertexCos[i];
@ -394,7 +394,7 @@ static void shrinkwrap_calc_nearest_surface_point(ShrinkwrapCalcData *calc)
/* Find the nearest vertex */
#ifndef __APPLE__
#pragma omp parallel for default(none) private(i) firstprivate(nearest) shared(calc, treeData) schedule(static) if(calc->numVerts > BKE_MESH_OMP_LIMIT)
#pragma omp parallel for default(none) private(i) firstprivate(nearest) shared(calc, treeData) schedule(static) if (calc->numVerts > BKE_MESH_OMP_LIMIT)
#endif
for (i = 0; i < calc->numVerts; ++i) {
float *co = calc->vertexCos[i];

@ -685,7 +685,7 @@ void BKE_text_clear(Text *text) /* called directly from rna */
{
int oldstate;
oldstate = txt_get_undostate( );
oldstate = txt_get_undostate();
txt_set_undostate(1);
txt_sel_all(text);
txt_delete_sel(text);

@ -346,7 +346,7 @@ void BLI_cleanup_path(const char *relabase, char *path)
/* Note
* memmove(start, eind, strlen(eind) + 1);
* is the same as
* strcpy( start, eind );
* strcpy(start, eind);
* except strcpy should not be used because there is overlap,
* so use memmove's slightly more obscure syntax - Campbell
*/

@ -238,7 +238,7 @@ static void polyedge_beauty_cost_update_single(
/* recalculate edge */
const float cost = polyedge_rotate_beauty_calc(coords, tris, e);
/* We can get cases where both choices generate very small negative costs, which leads to infinite loop.
* Anyway, costs above that are not worth recomputing, maybe we could even optimze it to a smaller limit?
* Anyway, costs above that are not worth recomputing, maybe we could even optimize it to a smaller limit?
* See T43578. */
if (cost < -FLT_EPSILON) {
eheap_table[i] = BLI_heap_insert(eheap, cost, e);

@ -115,7 +115,7 @@ void BLI_system_backtrace(FILE *fp)
symbolinfo->SizeOfStruct = sizeof(SYMBOL_INFO);
for (i = 0; i < nframes; i++) {
SymFromAddr(process, ( DWORD64 )( stack[ i ] ), 0, symbolinfo);
SymFromAddr(process, (DWORD64)(stack[i]), 0, symbolinfo);
fprintf(fp, "%u: %s - 0x%0X\n", nframes - i - 1, symbolinfo->Name, symbolinfo->Address);
}

@ -473,7 +473,7 @@ static float get_property(Bone *bone, const char *key, float def)
if (bone->prop) {
IDProperty *property = IDP_GetPropertyFromGroup(bone->prop, key);
if (property) {
switch(property->type) {
switch (property->type) {
case IDP_INT:
result = (float)(IDP_Int(property));
break;

@ -641,7 +641,7 @@ static void flip_names(tAnimCopybufItem *aci, char **name)
str_iter = *name = MEM_mallocN(sizeof(char) * (prefix_l + postfix_l + length + 1), "flipped_path");
BLI_strncpy(str_iter, aci->rna_path, prefix_l + 1);
str_iter += prefix_l ;
str_iter += prefix_l;
BLI_strncpy(str_iter, bname_new, length + 1);
str_iter += length;
BLI_strncpy(str_iter, str_end, postfix_l + 1);

@ -254,7 +254,7 @@ static int armature_select_linked_invoke(bContext *C, wmOperator *op, const wmEv
static int armature_select_linked_poll(bContext *C)
{
return (ED_operator_view3d_active(C) && ED_operator_editarmature(C) );
return (ED_operator_view3d_active(C) && ED_operator_editarmature(C));
}
void ARMATURE_OT_select_linked(wmOperatorType *ot)

@ -1004,7 +1004,7 @@ void uiItemEnumO_value(uiLayout *layout, const char *name, int icon, const char
PointerRNA ptr;
PropertyRNA *prop;
UI_OPERATOR_ERROR_RET(ot, opname, return );
UI_OPERATOR_ERROR_RET(ot, opname, return);
WM_operator_properties_create_ptr(&ptr, ot);
@ -1036,7 +1036,7 @@ void uiItemEnumO_string(uiLayout *layout, const char *name, int icon, const char
int value;
bool free;
UI_OPERATOR_ERROR_RET(ot, opname, return );
UI_OPERATOR_ERROR_RET(ot, opname, return);
WM_operator_properties_create_ptr(&ptr, ot);
@ -1075,7 +1075,7 @@ void uiItemBooleanO(uiLayout *layout, const char *name, int icon, const char *op
wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */
PointerRNA ptr;
UI_OPERATOR_ERROR_RET(ot, opname, return );
UI_OPERATOR_ERROR_RET(ot, opname, return);
WM_operator_properties_create_ptr(&ptr, ot);
RNA_boolean_set(&ptr, propname, value);
@ -1088,7 +1088,7 @@ void uiItemIntO(uiLayout *layout, const char *name, int icon, const char *opname
wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */
PointerRNA ptr;
UI_OPERATOR_ERROR_RET(ot, opname, return );
UI_OPERATOR_ERROR_RET(ot, opname, return);
WM_operator_properties_create_ptr(&ptr, ot);
RNA_int_set(&ptr, propname, value);
@ -1101,7 +1101,7 @@ void uiItemFloatO(uiLayout *layout, const char *name, int icon, const char *opna
wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */
PointerRNA ptr;
UI_OPERATOR_ERROR_RET(ot, opname, return );
UI_OPERATOR_ERROR_RET(ot, opname, return);
WM_operator_properties_create_ptr(&ptr, ot);
RNA_float_set(&ptr, propname, value);
@ -1114,7 +1114,7 @@ void uiItemStringO(uiLayout *layout, const char *name, int icon, const char *opn
wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */
PointerRNA ptr;
UI_OPERATOR_ERROR_RET(ot, opname, return );
UI_OPERATOR_ERROR_RET(ot, opname, return);
WM_operator_properties_create_ptr(&ptr, ot);
RNA_string_set(&ptr, propname, value);
@ -1878,7 +1878,7 @@ void uiItemMenuEnumO(uiLayout *layout, bContext *C, const char *opname, const ch
MenuItemLevel *lvl;
uiBut *but;
UI_OPERATOR_ERROR_RET(ot, opname, return );
UI_OPERATOR_ERROR_RET(ot, opname, return);
if (!ot->srna) {
ui_item_disabled(layout, opname);

@ -1646,7 +1646,7 @@ static void vgroup_blend_subset(Object *ob, const bool *vgroup_validmap, const i
BMesh *bm = em ? em->bm : NULL;
Mesh *me = em ? NULL : ob->data;
MeshElemMap *emap ;
MeshElemMap *emap;
int *emap_mem;
BLI_SMALLSTACK_DECLARE(dv_stack, MDeformVert *);

@ -1136,9 +1136,9 @@ void glaDrawImBuf_glsl_ctx(const bContext *C, ImBuf *ibuf, float x, float y, int
void cpack(unsigned int x)
{
glColor3ub( ( (x) & 0xFF),
(((x) >> 8) & 0xFF),
(((x) >> 16) & 0xFF) );
glColor3ub(( (x) & 0xFF),
(((x) >> 8) & 0xFF),
(((x) >> 16) & 0xFF));
}
void glaDrawBorderCorners(const rcti *border, float zoomx, float zoomy)

@ -540,7 +540,7 @@ void uiTemplateMovieclipInformation(uiLayout *layout, PointerRNA *ptr, const cha
uiItemL(col, str, ICON_NONE);
/* Display current frame number. */
framenr = BKE_movieclip_remap_scene_to_clip_frame(clip, user->framenr) ;
framenr = BKE_movieclip_remap_scene_to_clip_frame(clip, user->framenr);
if (framenr <= clip->len)
BLI_snprintf(str, sizeof(str), IFACE_("Frame: %d / %d"), framenr, clip->len);
else

@ -915,7 +915,7 @@ static bool do_outliner_item_activate(bContext *C, Scene *scene, ARegion *ar, Sp
if (tselem->type != TSE_SEQUENCE && tselem->type != TSE_SEQ_STRIP && tselem->type != TSE_SEQUENCE_DUP)
tree_element_set_active_object(C, scene, soops, te,
(extend && tselem->type == 0) ? OL_SETSEL_EXTEND : OL_SETSEL_NORMAL,
recursive && tselem->type == 0 );
recursive && tselem->type == 0);
if (tselem->type == 0) { // the lib blocks
/* editmode? */

@ -1523,7 +1523,7 @@ static void sequencer_slip_update_header(Scene *scene, ScrArea *sa, SlipData *da
char msg[HEADER_LENGTH];
if (sa) {
if(hasNumInput(&data->num_input)) {
if (hasNumInput(&data->num_input)) {
char num_str[NUM_STR_REP_LEN];
outputNumInput(&data->num_input, num_str, &scene->unit);
BLI_snprintf(msg, HEADER_LENGTH, "Trim offset: %s", num_str);

@ -580,7 +580,7 @@ static int undo_history_exec(bContext *C, wmOperator *op)
WM_event_add_notifier(C, NC_GEOM | ND_DATA, NULL);
}
else if (undosys == UNDOSYSTEM_IMAPAINT) {
ED_undo_paint_step_num(C, UNDO_PAINT_IMAGE, item );
ED_undo_paint_step_num(C, UNDO_PAINT_IMAGE, item);
}
else {
ED_viewport_render_kill_jobs(CTX_wm_manager(C), CTX_data_main(C), true);

@ -117,7 +117,7 @@ static PyObject *AdjacencyIterator_iternext(BPy_AdjacencyIterator *self)
self->at_start = false;
else {
self->a_it->increment();
if (self->a_it->isEnd()){
if (self->a_it->isEnd()) {
PyErr_SetNone(PyExc_StopIteration);
return NULL;
}

@ -425,7 +425,7 @@ void Strip::cleanUpSingularities (const vector<StrokeVertex*>& iStrokeVertices)
Vec2r avP(0.0, 0.0);
for (j = i - timeSinceSingu1; j <= i; j++)
avP = Vec2r(avP + _vertices[2 * j]->point2d());
avP = Vec2r( 1.0 / float(timeSinceSingu1 + 1) * avP);
avP = Vec2r(1.0 / float(timeSinceSingu1 + 1) * avP);
for (j = i - timeSinceSingu1; j <= i; j++)
_vertices[2 * j]->setPoint2d(avP);
//_vertex[2 * j] = _vertex[2 * i];

@ -82,7 +82,7 @@ void GPU_select_begin(unsigned int *buffer, unsigned int bufsize, rctf *input, c
g_query_state.oldhits = oldhits;
if (!g_query_state.use_gpu_select) {
glSelectBuffer( bufsize, (GLuint *)buffer);
glSelectBuffer(bufsize, (GLuint *)buffer);
glRenderMode(GL_SELECT);
glInitNames();
glPushName(-1);
@ -92,8 +92,8 @@ void GPU_select_begin(unsigned int *buffer, unsigned int bufsize, rctf *input, c
g_query_state.num_of_queries = ALLOC_QUERIES;
g_query_state.queries = MEM_mallocN(g_query_state.num_of_queries * sizeof(*g_query_state.queries) , "gpu selection queries");
g_query_state.id = MEM_mallocN(g_query_state.num_of_queries * sizeof(*g_query_state.id) , "gpu selection ids");
g_query_state.queries = MEM_mallocN(g_query_state.num_of_queries * sizeof(*g_query_state.queries), "gpu selection queries");
g_query_state.id = MEM_mallocN(g_query_state.num_of_queries * sizeof(*g_query_state.id), "gpu selection ids");
glGenQueriesARB(g_query_state.num_of_queries, g_query_state.queries);
glPushAttrib(GL_DEPTH_BUFFER_BIT | GL_VIEWPORT_BIT);

@ -309,8 +309,8 @@ int imb_is_a_tiff(unsigned char *mem)
char big_endian[IMB_TIFF_NCB] = { 0x4d, 0x4d, 0x00, 0x2a };
char lil_endian[IMB_TIFF_NCB] = { 0x49, 0x49, 0x2a, 0x00 };
return ( (memcmp(big_endian, mem, IMB_TIFF_NCB) == 0) ||
(memcmp(lil_endian, mem, IMB_TIFF_NCB) == 0) );
return ((memcmp(big_endian, mem, IMB_TIFF_NCB) == 0) ||
(memcmp(lil_endian, mem, IMB_TIFF_NCB) == 0));
}
static void scanline_contig_16bit(float *rectf, const unsigned short *sbuf, int scanline_w, int spp)

@ -74,7 +74,7 @@ static bool dependsOnNormals(ModifierData *UNUSED(md))
return true;
}
static DerivedMesh *WireframeModifier_do( WireframeModifierData *wmd, Object *ob, DerivedMesh *dm)
static DerivedMesh *WireframeModifier_do(WireframeModifierData *wmd, Object *ob, DerivedMesh *dm)
{
DerivedMesh *result;
BMesh *bm;

@ -1677,7 +1677,7 @@ int WM_operator_ui_popup(bContext *C, wmOperator *op, int width, int height)
/**
* For use by #WM_operator_props_popup_call, #WM_operator_props_popup only.
*
* \note operator menu needs undo flag enabled , for redo callback */
* \note operator menu needs undo flag enabled, for redo callback */
static int wm_operator_props_popup_ex(bContext *C, wmOperator *op,
const bool do_call, const bool do_redo)
{

@ -114,7 +114,7 @@ void SCA_IScene::RemoveDebugProperty(class CValue *gameobj,
const STR_String &name)
{
vector<SCA_DebugProp*>::iterator it = m_debugList.begin();
while(it != m_debugList.end()) {
while (it != m_debugList.end()) {
STR_String debugname = (*it)->m_name;
CValue *debugobj = (*it)->m_obj;