[Bf-blender-cvs] [f0ca40f] master: Code cleanup: function calls

Campbell Barton noreply at git.blender.org
Tue Mar 25 00:12:06 CET 2014


Commit: f0ca40f9c1cc17e0345b06b77ad0c0fad6880242
Author: Campbell Barton
Date:   Tue Mar 25 10:10:00 2014 +1100
https://developer.blender.org/rBf0ca40f9c1cc17e0345b06b77ad0c0fad6880242

Code cleanup: function calls

===================================================================

M	source/blender/blenkernel/intern/writeavi.c
M	source/blender/blenlib/intern/string_utf8.c
M	source/blender/editors/sculpt_paint/sculpt.c
M	source/blender/editors/uvedit/uvedit_ops.c

===================================================================

diff --git a/source/blender/blenkernel/intern/writeavi.c b/source/blender/blenkernel/intern/writeavi.c
index 40bb593..a9f040b 100644
--- a/source/blender/blenkernel/intern/writeavi.c
+++ b/source/blender/blenkernel/intern/writeavi.c
@@ -236,7 +236,7 @@ static int append_avi(RenderData *UNUSED(rd), int start_frame, int frame, int *p
 	}
 	
 	AVI_write_frame(avi, (frame - start_frame), AVI_FORMAT_RGB32, rectot, rectx * recty * 4);
-//	printf ("added frame %3d (frame %3d in avi): ", frame, frame-start_frame);
+//	printf("added frame %3d (frame %3d in avi): ", frame, frame-start_frame);
 
 	return 1;
 }
diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c
index e97f0d8..be93326 100644
--- a/source/blender/blenlib/intern/string_utf8.c
+++ b/source/blender/blenlib/intern/string_utf8.c
@@ -439,7 +439,7 @@ int BLI_str_utf8_size(const char *p)
 	int mask = 0, len;
 	const unsigned char c = (unsigned char) *p;
 
-	UTF8_COMPUTE (c, mask, len, -1);
+	UTF8_COMPUTE(c, mask, len, -1);
 
 	(void)mask; /* quiet warning */
 
@@ -452,7 +452,7 @@ int BLI_str_utf8_size_safe(const char *p)
 	int mask = 0, len;
 	const unsigned char c = (unsigned char) *p;
 
-	UTF8_COMPUTE (c, mask, len, 1);
+	UTF8_COMPUTE(c, mask, len, 1);
 
 	(void)mask; /* quiet warning */
 
@@ -479,10 +479,10 @@ unsigned int BLI_str_utf8_as_unicode(const char *p)
 	unsigned int result;
 	const unsigned char c = (unsigned char) *p;
 
-	UTF8_COMPUTE (c, mask, len, -1);
+	UTF8_COMPUTE(c, mask, len, -1);
 	if (UNLIKELY(len == -1))
 		return BLI_UTF8_ERR;
-	UTF8_GET (result, p, i, mask, len, BLI_UTF8_ERR);
+	UTF8_GET(result, p, i, mask, len, BLI_UTF8_ERR);
 
 	return result;
 }
@@ -495,10 +495,10 @@ unsigned int BLI_str_utf8_as_unicode_and_size(const char *__restrict p, size_t *
 	unsigned int result;
 	const unsigned char c = (unsigned char) *p;
 
-	UTF8_COMPUTE (c, mask, len, -1);
+	UTF8_COMPUTE(c, mask, len, -1);
 	if (UNLIKELY(len == -1))
 		return BLI_UTF8_ERR;
-	UTF8_GET (result, p, i, mask, len, BLI_UTF8_ERR);
+	UTF8_GET(result, p, i, mask, len, BLI_UTF8_ERR);
 	*index += (size_t)len;
 	return result;
 }
@@ -510,12 +510,12 @@ unsigned int BLI_str_utf8_as_unicode_and_size_safe(const char *__restrict p, siz
 	unsigned int result;
 	const unsigned char c = (unsigned char) *p;
 
-	UTF8_COMPUTE (c, mask, len, -1);
+	UTF8_COMPUTE(c, mask, len, -1);
 	if (UNLIKELY(len == -1)) {
 		*index += 1;
 		return c;
 	}
-	UTF8_GET (result, p, i, mask, len, BLI_UTF8_ERR);
+	UTF8_GET(result, p, i, mask, len, BLI_UTF8_ERR);
 	*index += (size_t)len;
 	return result;
 }
@@ -532,7 +532,7 @@ unsigned int BLI_str_utf8_as_unicode_step(const char *__restrict p, size_t *__re
 	p += *index;
 	c = (unsigned char) *p;
 
-	UTF8_COMPUTE (c, mask, len, -1);
+	UTF8_COMPUTE(c, mask, len, -1);
 	if (UNLIKELY(len == -1)) {
 		/* when called with NULL end, result will never be NULL,
 		 * checks for a NULL character */
@@ -546,12 +546,12 @@ unsigned int BLI_str_utf8_as_unicode_step(const char *__restrict p, size_t *__re
 	/* this is tricky since there are a few ways we can bail out of bad unicode
 	 * values, 3 possible solutions. */
 #if 0
-	UTF8_GET (result, p, i, mask, len, BLI_UTF8_ERR);
+	UTF8_GET(result, p, i, mask, len, BLI_UTF8_ERR);
 #elif 1
 	/* WARNING: this is NOT part of glib, or supported by similar functions.
 	 * this is added for text drawing because some filepaths can have latin1
 	 * characters */
-	UTF8_GET (result, p, i, mask, len, BLI_UTF8_ERR);
+	UTF8_GET(result, p, i, mask, len, BLI_UTF8_ERR);
 	if (result == BLI_UTF8_ERR) {
 		len = 1;
 		result = *p;
@@ -559,7 +559,7 @@ unsigned int BLI_str_utf8_as_unicode_step(const char *__restrict p, size_t *__re
 	/* end warning! */
 #else
 	/* without a fallback like '?', text drawing will stop on this value */
-	UTF8_GET (result, p, i, mask, len, '?');
+	UTF8_GET(result, p, i, mask, len, '?');
 #endif
 
 	*index += (size_t)len;
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 5f47de3..7e5df86 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -4309,7 +4309,7 @@ static void sculpt_raycast_detail_cb(PBVHNode *node, void *data_v, float *tmin)
 	}
 }
 
-static float sculpt_raycast_init (ViewContext *vc, const float mouse[2], float ray_start[3], float ray_end[3], float ray_normal[3], bool original)
+static float sculpt_raycast_init(ViewContext *vc, const float mouse[2], float ray_start[3], float ray_end[3], float ray_normal[3], bool original)
 {
 	float obimat[4][4];
 	float dist;
@@ -4361,7 +4361,7 @@ bool sculpt_stroke_get_location(bContext *C, float out[3], const float mouse[2])
 
 	sculpt_stroke_modifiers_check(C, ob);
 
-	dist = sculpt_raycast_init (&vc, mouse, ray_start, ray_end, ray_normal, original);
+	dist = sculpt_raycast_init(&vc, mouse, ray_start, ray_end, ray_normal, original);
 
 	srd.original = original;
 	srd.ss = ob->sculpt;
@@ -5323,7 +5323,7 @@ static void sample_detail(bContext *C, int ss_co[2])
 
 	sculpt_stroke_modifiers_check(C, ob);
 
-	dist = sculpt_raycast_init (&vc, mouse, ray_start, ray_end, ray_normal, false);
+	dist = sculpt_raycast_init(&vc, mouse, ray_start, ray_end, ray_normal, false);
 
 	srd.hit = 0;
 	srd.ray_start = ray_start;
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index fe398c0..8fc3e79 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -3250,7 +3250,7 @@ static bool uv_snap_uvs_to_cursor(Scene *scene, Image *ima, Object *obedit, cons
 		BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
 			if (uvedit_uv_select_test(scene, l, cd_loop_uv_offset)) {
 				luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset);
-				copy_v2_v2 (luv->uv, cursor);
+				copy_v2_v2(luv->uv, cursor);
 				changed = true;
 			}
 		}




More information about the Bf-blender-cvs mailing list