diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-12 04:50:40 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-12 04:50:40 +0400 |
commit | 502ddd312879316c13f66d84c4ffe0927df53a06 (patch) | |
tree | 51a18bef238f47e385d909c591e98d2023086854 | |
parent | 742c1cb3284fed8a9fdef1cb899a3eaaf896cd41 (diff) |
code cleanup: warnings and style.
-rw-r--r-- | build_files/cmake/cmake_static_check_clang_array.py | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 4 | ||||
-rw-r--r-- | source/blender/blenlib/BLI_math_vector.h | 4 | ||||
-rw-r--r-- | source/blender/blenlib/intern/storage.c | 2 | ||||
-rw-r--r-- | source/blender/editors/render/render_opengl.c | 12 | ||||
-rw-r--r-- | source/blender/freestyle/intern/stroke/StrokeRep.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp | 19 |
7 files changed, 24 insertions, 21 deletions
diff --git a/build_files/cmake/cmake_static_check_clang_array.py b/build_files/cmake/cmake_static_check_clang_array.py index 448454c2177..22b5d07c40c 100644 --- a/build_files/cmake/cmake_static_check_clang_array.py +++ b/build_files/cmake/cmake_static_check_clang_array.py @@ -66,7 +66,7 @@ def main(): percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:" sys.stdout.flush() - sys.stdout.write("%s " % percent_str) + sys.stdout.write("%s %s\n" % (percent_str, c)) return subprocess.Popen(cmd) diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index da642f11e8d..db4706e3c6c 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -120,8 +120,6 @@ #include "BPY_extern.h" #endif -#define MAX_IDPUP 60 /* was 24 */ - /* GS reads the memory pointed at in a specific ordering. * only use this definition, makes little and big endian systems * work fine, in conjunction with MAKE_ID */ @@ -1078,6 +1076,8 @@ ID *BKE_libblock_find_name(const short type, const char *name) /* type: "OB } #if 0 /* UNUSED */ +#define MAX_IDPUP 60 /* was 24 */ + static void get_flags_for_id(ID *id, char *buf) { int isfake = id->flag & LIB_FAKEUSER; diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h index 15c977981a5..ee0a9db4f02 100644 --- a/source/blender/blenlib/BLI_math_vector.h +++ b/source/blender/blenlib/BLI_math_vector.h @@ -169,7 +169,7 @@ MINLINE float normalize_v3_v3(float r[3], const float a[3]); /******************************* Interpolation *******************************/ void interp_v2_v2v2(float r[2], const float a[2], const float b[2], const float t); -void interp_v2_v2v2v2(float r[2], const float a[2], const float b[2], const float c[3], const float t[3]); +void interp_v2_v2v2v2(float r[2], const float a[2], const float b[2], const float c[2], const float t[3]); void interp_v3_v3v3(float r[3], const float a[3], const float b[3], const float t); void interp_v3_v3v3v3(float p[3], const float v1[3], const float v2[3], const float v3[3], const float w[3]); void interp_v3_v3v3v3v3(float p[3], const float v1[3], const float v2[3], const float v3[3], const float v4[3], const float w[4]); @@ -193,7 +193,7 @@ MINLINE int is_one_v3(const float a[3]); MINLINE int equals_v2v2(const float v1[2], const float v2[2]); MINLINE int equals_v3v3(const float a[3], const float b[3]); -MINLINE int compare_v2v2(const float a[3], const float b[3], const float limit); +MINLINE int compare_v2v2(const float a[2], const float b[2], const float limit); MINLINE int compare_v3v3(const float a[3], const float b[3], const float limit); MINLINE int compare_len_v3v3(const float a[3], const float b[3], const float limit); diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index 3665b957c41..24d4f7cdfe3 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -520,7 +520,7 @@ int BLI_exists(const char *name) /* change error mode so user does not get a "no disk in drive" popup * when looking for a file on an empty CD/DVD drive */ - old_error_mode = SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX); + old_error_mode = SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX); #ifndef __MINGW32__ res = _wstat(tmp_16, &st); diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index 2c54ce4cdef..edef6e52e40 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -245,12 +245,12 @@ static void screen_opengl_render_apply(OGLRender *oglrender) char err_out[256] = "unknown"; ImBuf *ibuf_view = ED_view3d_draw_offscreen_imbuf_simple(scene, scene->camera, oglrender->sizex, oglrender->sizey, IB_rect, OB_SOLID, FALSE, TRUE, - (draw_sky)? R_ADDSKY: R_ALPHAPREMUL, err_out); + (draw_sky) ? R_ADDSKY: R_ALPHAPREMUL, err_out); camera = scene->camera; if (ibuf_view) { /* steal rect reference from ibuf */ - rect = (unsigned char*)ibuf_view->rect; + rect = (unsigned char *)ibuf_view->rect; ibuf_view->mall &= ~IB_rect; IMB_freeImBuf(ibuf_view); @@ -272,8 +272,8 @@ static void screen_opengl_render_apply(OGLRender *oglrender) /* sequencer has got trickier conversion happened above * also assume opengl's space matches byte buffer color space */ IMB_buffer_float_from_byte(rr->rectf, rect, - IB_PROFILE_LINEAR_RGB, IB_PROFILE_SRGB, TRUE, - oglrender->sizex, oglrender->sizey, oglrender->sizex, oglrender->sizex); + IB_PROFILE_LINEAR_RGB, IB_PROFILE_SRGB, true, + oglrender->sizex, oglrender->sizey, oglrender->sizex, oglrender->sizex); } /* rr->rectf is now filled with image data */ @@ -292,8 +292,8 @@ static void screen_opengl_render_apply(OGLRender *oglrender) imb_addrectImBuf(ibuf); IMB_partial_display_buffer_update(ibuf, rr->rectf, rect, rr->rectx, 0, 0, - &scene->view_settings, &scene->display_settings, - 0, 0, rr->rectx, rr->recty, TRUE); + &scene->view_settings, &scene->display_settings, + 0, 0, rr->rectx, rr->recty, true); /* write file for animation */ if (oglrender->write_still) { diff --git a/source/blender/freestyle/intern/stroke/StrokeRep.cpp b/source/blender/freestyle/intern/stroke/StrokeRep.cpp index 42fd9660b08..dacf463ab88 100644 --- a/source/blender/freestyle/intern/stroke/StrokeRep.cpp +++ b/source/blender/freestyle/intern/stroke/StrokeRep.cpp @@ -98,10 +98,12 @@ static bool notValid (Vec2r p) (p[0] < -HUGE_COORD) || (p[1] < -HUGE_COORD); } +#if 0 static real crossP(const Vec2r& A, const Vec2r& B) { return A[0] * B[1] - A[1] * B[0]; } +#endif void Strip::createStrip (const vector<StrokeVertex*>& iStrokeVertices) { diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp index e92f7bd1268..e01530f2b11 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp +++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp @@ -1758,16 +1758,17 @@ struct OcclusionBuffer 6,5,1,2, 7,6,2,3, 5,4,0,1}; - for (unsigned int i=0;i<(sizeof(d)/sizeof(d[0]));) - { - const btVector4 p[] = {x[d[i++]], - x[d[i++]], - x[d[i++]], - x[d[i++]]}; - if (clipDraw<4,QueryOCL>(p,1.f,0.f)) - return(true); + for (unsigned int i = 0; i < (sizeof(d) / sizeof(d[0]));) { + const btVector4 p[] = {x[d[i + 0]], + x[d[i + 1]], + x[d[i + 2]], + x[d[i + 3]]}; + i += 4; + if (clipDraw<4, QueryOCL>(p, 1.0f, 0.0f)) { + return true; + } } - return(false); + return false; } }; |