diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-08 06:06:16 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-08 06:06:16 +0400 |
commit | 682df047a0005435fb8caad3dba974eb6eca2232 (patch) | |
tree | 8aeb3e3f6588f52e350b6be461f44fcb1c22e9f3 | |
parent | 08358a60b072461f3632c08cfc3a7af55b290162 (diff) |
style cleanup
-rw-r--r-- | source/blender/blenkernel/intern/curve.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/fmodifier.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/pointcache.c | 18 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/subsurf_ccg.c | 4 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_geom.c | 6 | ||||
-rw-r--r-- | source/blender/blenlib/intern/string.c | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 4 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 6 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 4 | ||||
-rw-r--r-- | source/blender/editors/screen/area.c | 4 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_2d.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 2 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_smart_stitch.c | 4 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 2 |
14 files changed, 31 insertions, 31 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 1d199cdf1e2..fe8bd0cc5a4 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -875,7 +875,7 @@ static void basisNurb(float t, short order, short pnts, float *knots, float *bas void BKE_nurb_makeFaces(Nurb *nu, float *coord_array, int rowstride, int resolu, int resolv) -/* coord_array has to be 3*4*resolu*resolv in size, and zero-ed */ +/* coord_array has to be (3 * 4 * resolu * resolv) in size, and zero-ed */ { BPoint *bp; float *basisu, *basis, *basisv, *sum, *fp, *in; diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c index 2b393b4d90b..47397a60b20 100644 --- a/source/blender/blenkernel/intern/fmodifier.c +++ b/source/blender/blenkernel/intern/fmodifier.c @@ -167,7 +167,7 @@ static void fcm_generator_verify(FModifier *fcm) case FCM_GENERATOR_POLYNOMIAL_FACTORISED: /* expanded polynomial expression */ { - /* arraysize needs to be 2*order, so resize if not */ + /* arraysize needs to be (2 * order), so resize if not */ if (data->arraysize != (data->poly_order * 2)) { float *nc; diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 9c3c1b0e508..c94ffd3205f 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -559,7 +559,7 @@ static int ptcache_smoke_write(PTCacheFile *pf, void *smoke_v) float dt, dx, *dens, *react, *fuel, *flame, *heat, *heatold, *vx, *vy, *vz, *r, *g, *b; unsigned char *obstacles; unsigned int in_len = sizeof(float)*(unsigned int)res; - unsigned char *out = (unsigned char *)MEM_callocN(LZO_OUT_LEN(in_len)*4, "pointcache_lzo_buffer"); + unsigned char *out = (unsigned char *)MEM_callocN(LZO_OUT_LEN(in_len) * 4, "pointcache_lzo_buffer"); //int mode = res >= 1000000 ? 2 : 1; int mode=1; // light if (sds->cache_comp == SM_CACHE_HEAVY) mode=2; // heavy @@ -792,7 +792,7 @@ static int ptcache_dynamicpaint_write(PTCacheFile *pf, void *dp_v) int cache_compress = 1; /* version header */ - ptcache_file_write(pf, DPAINT_CACHE_VERSION, 1, sizeof(char)*4); + ptcache_file_write(pf, DPAINT_CACHE_VERSION, 1, sizeof(char) * 4); if (surface->format != MOD_DPAINT_SURFACE_F_IMAGESEQ && surface->data) { int total_points=surface->data->total_points; @@ -831,7 +831,7 @@ static int ptcache_dynamicpaint_read(PTCacheFile *pf, void *dp_v) char version[4]; /* version header */ - ptcache_file_read(pf, version, 1, sizeof(char)*4); + ptcache_file_read(pf, version, 1, sizeof(char) * 4); if (strncmp(version, DPAINT_CACHE_VERSION, 4)) {printf("Dynamic Paint: Invalid cache version: %s!\n", version); return 0;} if (surface->format != MOD_DPAINT_SURFACE_F_IMAGESEQ && surface->data) { @@ -1163,7 +1163,7 @@ void BKE_ptcache_ids_from_object(ListBase *lb, Object *ob, Scene *scene, int dup */ #define MAX_PTCACHE_PATH FILE_MAX -#define MAX_PTCACHE_FILE ((FILE_MAX)*2) +#define MAX_PTCACHE_FILE (FILE_MAX * 2) static int ptcache_path(PTCacheID *pid, char *filename) { @@ -1258,7 +1258,7 @@ static PTCacheFile *ptcache_file_open(PTCacheID *pid, int mode, int cfra) { PTCacheFile *pf; FILE *fp = NULL; - char filename[(FILE_MAX)*2]; + char filename[FILE_MAX * 2]; #ifndef DURIAN_POINTCACHE_LIB_OK /* don't allow writing for linked objects */ @@ -1311,7 +1311,7 @@ static int ptcache_file_compressed_read(PTCacheFile *pf, unsigned char *result, size_t out_len = len; #endif unsigned char *in; - unsigned char *props = MEM_callocN(16*sizeof(char), "tmp"); + unsigned char *props = MEM_callocN(16 * sizeof(char), "tmp"); ptcache_file_read(pf, &compressed, 1, sizeof(unsigned char)); if (compressed) { @@ -1354,7 +1354,7 @@ static int ptcache_file_compressed_write(PTCacheFile *pf, unsigned char *in, uns int r = 0; unsigned char compressed = 0; size_t out_len= 0; - unsigned char *props = MEM_callocN(16*sizeof(char), "tmp"); + unsigned char *props = MEM_callocN(16 * sizeof(char), "tmp"); size_t sizeOfIt = 5; (void)mode; /* unused when building w/o compression */ @@ -1787,7 +1787,7 @@ static int ptcache_mem_frame_to_disk(PTCacheID *pid, PTCacheMem *pm) for (i=0; i<BPHYS_TOT_DATA; i++) { if (pm->data[i]) { unsigned int in_len = pm->totpoint*ptcache_data_size[i]; - unsigned char *out = (unsigned char *)MEM_callocN(LZO_OUT_LEN(in_len)*4, "pointcache_lzo_buffer"); + unsigned char *out = (unsigned char *)MEM_callocN(LZO_OUT_LEN(in_len) * 4, "pointcache_lzo_buffer"); ptcache_file_compressed_write(pf, (unsigned char *)(pm->data[i]), in_len, out, pid->cache->compression); MEM_freeN(out); } @@ -1820,7 +1820,7 @@ static int ptcache_mem_frame_to_disk(PTCacheID *pid, PTCacheMem *pm) if (pid->cache->compression) { unsigned int in_len = extra->totdata * ptcache_extra_datasize[extra->type]; - unsigned char *out = (unsigned char *)MEM_callocN(LZO_OUT_LEN(in_len)*4, "pointcache_lzo_buffer"); + unsigned char *out = (unsigned char *)MEM_callocN(LZO_OUT_LEN(in_len) * 4, "pointcache_lzo_buffer"); ptcache_file_compressed_write(pf, (unsigned char *)(extra->data), in_len, out, pid->cache->compression); MEM_freeN(out); } diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index d381a157fcc..6d4313d1bc3 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -1314,8 +1314,8 @@ static void ccgDM_copyFinalLoopArray(DerivedMesh *dm, MLoop *mloop) for (index = 0; index < totface; index++) { CCGFace *f = ccgdm->faceMap[index].face; int x, y, S, numVerts = ccgSubSurf_getFaceNumVerts(f); - /* int flag = (faceFlags)? faceFlags[index*2]: ME_SMOOTH; */ /* UNUSED */ - /* int mat_nr = (faceFlags)? faceFlags[index*2+1]: 0; */ /* UNUSED */ + /* int flag = (faceFlags) ? faceFlags[index * 2]: ME_SMOOTH; */ /* UNUSED */ + /* int mat_nr = (faceFlags) ? faceFlags[index * 2 + 1]: 0; */ /* UNUSED */ for (S = 0; S < numVerts; S++) { for (y = 0; y < gridSize - 1; y++) { diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index a54bef9d5d2..5f1047d054e 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -318,7 +318,7 @@ void closest_on_tri_to_point_v3(float r[3], const float p[3], return; } /* Check if P in edge region of AB, if so return projection of P onto AB */ - vc = d1*d4 - d3*d2; + vc = d1 * d4 - d3 * d2; if (vc <= 0.0f && d1 >= 0.0f && d3 <= 0.0f) { float v = d1 / (d1 - d3); /* barycentric coordinates (1-v,v,0) */ @@ -335,7 +335,7 @@ void closest_on_tri_to_point_v3(float r[3], const float p[3], return; } /* Check if P in edge region of AC, if so return projection of P onto AC */ - vb = d5*d2 - d1*d6; + vb = d5 * d2 - d1 * d6; if (vb <= 0.0f && d2 >= 0.0f && d6 <= 0.0f) { float w = d2 / (d2 - d6); /* barycentric coordinates (1-w,0,w) */ @@ -343,7 +343,7 @@ void closest_on_tri_to_point_v3(float r[3], const float p[3], return; } /* Check if P in edge region of BC, if so return projection of P onto BC */ - va = d3*d6 - d5*d4; + va = d3 * d6 - d5 * d4; if (va <= 0.0f && (d4 - d3) >= 0.0f && (d5 - d6) >= 0.0f) { float w = (d4 - d3) / ((d4 - d3) + (d5 - d6)); /* barycentric coordinates (0,1-w,w) */ diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c index f23f75f69d9..28fdf7b61db 100644 --- a/source/blender/blenlib/intern/string.c +++ b/source/blender/blenlib/intern/string.c @@ -412,7 +412,7 @@ int BLI_natstrcmp(const char *s1, const char *s2) void BLI_timestr(double _time, char *str) { /* format 00:00:00.00 (hr:min:sec) string has to be 12 long */ - int hr = ( (int) _time) / (60*60); + int hr = ( (int) _time) / (60 * 60); int min = (((int) _time) / 60 ) % 60; int sec = ( (int) (_time)) % 60; int hun = ( (int) (_time * 100.0)) % 100; diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 9ca393a946b..279c8e6bc61 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -6862,7 +6862,7 @@ static void do_versions_nodetree_convert_angle(bNodeTree *ntree) /* Convert degrees to radians. */ NodeDefocus *nqd = node->storage; /* XXX DNA char to float conversion seems to map the char value into the [0.0f, 1.0f] range... */ - nqd->rotation = DEG2RADF(nqd->rotation*255.0f); + nqd->rotation = DEG2RADF(nqd->rotation * 255.0f); } else if (node->type == CMP_NODE_CHROMA_MATTE) { /* Convert degrees to radians. */ @@ -6874,7 +6874,7 @@ static void do_versions_nodetree_convert_angle(bNodeTree *ntree) /* Convert degrees to radians. */ NodeGlare *ndg = node->storage; /* XXX DNA char to float conversion seems to map the char value into the [0.0f, 1.0f] range... */ - ndg->angle_ofs = DEG2RADF(ndg->angle_ofs*255.0f); + ndg->angle_ofs = DEG2RADF(ndg->angle_ofs * 255.0f); } /* XXX TexMapping struct is used by other nodes too (at least node_composite_mapValue), * but not the rot part... diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 680a02eed30..6f5b0e967e9 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1420,8 +1420,8 @@ static void write_modifiers(WriteData *wd, ListBase *modbase) int size = mmd->dyngridsize; writestruct(wd, DATA, "MDefInfluence", mmd->totinfluence, mmd->bindinfluences); - writedata(wd, DATA, sizeof(int)*(mmd->totvert+1), mmd->bindoffsets); - writedata(wd, DATA, sizeof(float)*3*mmd->totcagevert, + writedata(wd, DATA, sizeof(int) * (mmd->totvert + 1), mmd->bindoffsets); + writedata(wd, DATA, sizeof(float) * 3 * mmd->totcagevert, mmd->bindcagecos); writestruct(wd, DATA, "MDefCell", size*size*size, mmd->dyngrid); writestruct(wd, DATA, "MDefInfluence", mmd->totinfluence, mmd->dyninfluences); @@ -1678,7 +1678,7 @@ static void write_mdisps(WriteData *wd, int count, MDisps *mdlist, int external) MDisps *md = &mdlist[i]; if (md->disps) { if (!external) - writedata(wd, DATA, sizeof(float)*3*md->totdisp, md->disps); + writedata(wd, DATA, sizeof(float) * 3 * md->totdisp, md->disps); } if (md->hidden) diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index e92cfae07b0..07b8d8e23b2 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -6387,7 +6387,7 @@ static int ui_menu_scroll(ARegion *ar, uiBlock *block, int my, uiBut *to_bt) for (bt = block->buttons.first; bt; bt = bt->next) ymax = max_ff(ymax, bt->rect.ymax); - if (ymax + dy - UI_UNIT_Y*0.5f < block->rect.ymax - UI_MENU_SCROLL_PAD) + if (ymax + dy - UI_UNIT_Y * 0.5f < block->rect.ymax - UI_MENU_SCROLL_PAD) dy = block->rect.ymax - ymax - UI_MENU_SCROLL_PAD; } else { @@ -6397,7 +6397,7 @@ static int ui_menu_scroll(ARegion *ar, uiBlock *block, int my, uiBut *to_bt) for (bt = block->buttons.first; bt; bt = bt->next) ymin = min_ff(ymin, bt->rect.ymin); - if (ymin + dy + UI_UNIT_Y*0.5f > block->rect.ymin + UI_MENU_SCROLL_PAD) + if (ymin + dy + UI_UNIT_Y * 0.5f > block->rect.ymin + UI_MENU_SCROLL_PAD) dy = block->rect.ymin - ymin + UI_MENU_SCROLL_PAD; } diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 5af60726f14..cea7b12a27d 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -1584,14 +1584,14 @@ int ED_area_header_standardbuttons(const bContext *C, uiBlock *block, int yco) if (sa->flag & HEADER_NO_PULLDOWN) { but = uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, 0, ICON_DISCLOSURE_TRI_RIGHT, - xco, yco, U.widget_unit, U.widget_unit*0.9, + xco, yco, U.widget_unit, U.widget_unit * 0.9f, &(sa->flag), 0, 0, 0, 0, "Show pulldown menus"); } else { but = uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, 0, ICON_DISCLOSURE_TRI_DOWN, - xco, yco, U.widget_unit, U.widget_unit*0.9, + xco, yco, U.widget_unit, U.widget_unit * 0.9f, &(sa->flag), 0, 0, 0, 0, "Hide pulldown menus"); } diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c index c30996f03de..dd7412cf3d5 100644 --- a/source/blender/editors/sculpt_paint/paint_image_2d.c +++ b/source/blender/editors/sculpt_paint/paint_image_2d.c @@ -391,7 +391,7 @@ int BKE_brush_painter_paint(BrushPainter *painter, BrushFunc func, const float p double starttime, curtime = time; /* compute brush spacing adapted to brush size */ - spacing = brush->rate; //radius*brush->spacing*0.01f; + spacing = brush->rate; //radius*brush->spacing * 0.01f; /* setup starting time, direction vector and accumulated time */ starttime = painter->accumtime; diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index c72cb2c4d8c..76f73e1505c 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -3425,7 +3425,7 @@ static int drawDispListwire(ListBase *dlbase) #if 0 /* (ton) this code crashes for me when resolv is 86 or higher... no clue */ - glVertexPointer(3, GL_FLOAT, sizeof(float) * 3 * dl->nr, data + 3*nr); + glVertexPointer(3, GL_FLOAT, sizeof(float) * 3 * dl->nr, data + 3 * nr); if (dl->flag & DL_CYCL_V) glDrawArrays(GL_LINE_LOOP, 0, dl->parts); else diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index ba4ffefddca..f969e07384c 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -1502,11 +1502,11 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void *ar else { UI_ThemeColor4(TH_STITCH_PREVIEW_STITCHABLE); glVertexPointer(2, GL_FLOAT, 0, stitch_preview->preview_stitchable); - glDrawArrays(GL_LINES, 0, 2*stitch_preview->num_stitchable); + glDrawArrays(GL_LINES, 0, 2 * stitch_preview->num_stitchable); UI_ThemeColor4(TH_STITCH_PREVIEW_UNSTITCHABLE); glVertexPointer(2, GL_FLOAT, 0, stitch_preview->preview_unstitchable); - glDrawArrays(GL_LINES, 0, 2*stitch_preview->num_unstitchable); + glDrawArrays(GL_LINES, 0, 2 * stitch_preview->num_unstitchable); } glPopClientAttrib(); diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index bfcd4b1e955..81e469f8c5a 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1558,7 +1558,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN | UI_BLOCK_NO_WIN_CLIP); /* XXX splash scales with pixelsize, should become widget-units */ - but = uiDefBut(block, BUT_IMAGE, 0, "", 0, 0.5f * U.widget_unit, U.pixelsize * 501, U.pixelsize *282, ibuf, 0.0, 0.0, 0, 0, ""); /* button owns the imbuf now */ + but = uiDefBut(block, BUT_IMAGE, 0, "", 0, 0.5f * U.widget_unit, U.pixelsize * 501, U.pixelsize * 282, ibuf, 0.0, 0.0, 0, 0, ""); /* button owns the imbuf now */ uiButSetFunc(but, wm_block_splash_close, block, NULL); uiBlockSetFunc(block, wm_block_splash_refreshmenu, block, NULL); |