style cleanup: also fix for TIMEIT macro

This commit is contained in:
Campbell Barton 2012-05-28 18:12:08 +00:00
parent 481658867e
commit 47826118d1
2 changed files with 22 additions and 22 deletions

@ -148,29 +148,29 @@
*(v1) = *(v2); \
*(v1 + 1) = *(v2 + 1); \
} (void)0
#define VECADD(v1, v2, v3) { \
*(v1) = *(v2) + *(v3); \
*(v1 + 1) = *(v2 + 1) + *(v3 + 1); \
*(v1 + 2) = *(v2 + 2) + *(v3 + 2); \
#define VECADD(v1, v2, v3) { \
*(v1) = *(v2) + *(v3); \
*(v1 + 1) = *(v2 + 1) + *(v3 + 1); \
*(v1 + 2) = *(v2 + 2) + *(v3 + 2); \
} (void)0
#define VECSUB(v1, v2, v3) { \
*(v1) = *(v2) - *(v3); \
*(v1 + 1) = *(v2 + 1) - *(v3 + 1); \
*(v1 + 2) = *(v2 + 2) - *(v3 + 2); \
#define VECSUB(v1, v2, v3) { \
*(v1) = *(v2) - *(v3); \
*(v1 + 1) = *(v2 + 1) - *(v3 + 1); \
*(v1 + 2) = *(v2 + 2) - *(v3 + 2); \
} (void)0
#define VECSUB2D(v1, v2, v3) { \
*(v1) = *(v2) - *(v3); \
*(v1 + 1) = *(v2 + 1) - *(v3 + 1); \
#define VECSUB2D(v1, v2, v3) { \
*(v1) = *(v2) - *(v3); \
*(v1 + 1) = *(v2 + 1) - *(v3 + 1); \
} (void)0
#define VECADDFAC(v1, v2, v3, fac) { \
*(v1) = *(v2) + *(v3) * (fac); \
*(v1 + 1) = *(v2 + 1) + *(v3 + 1) * (fac); \
*(v1 + 2) = *(v2 + 2) + *(v3 + 2) * (fac); \
#define VECADDFAC(v1, v2, v3, fac) { \
*(v1) = *(v2) + *(v3) * (fac); \
*(v1 + 1) = *(v2 + 1) + *(v3 + 1) * (fac); \
*(v1 + 2) = *(v2 + 2) + *(v3 + 2) * (fac); \
} (void)0
#define VECSUBFAC(v1, v2, v3, fac) { \
*(v1) = *(v2) - *(v3) * (fac); \
*(v1 + 1) = *(v2 + 1) - *(v3 + 1) * (fac); \
*(v1 + 2) = *(v2 + 2) - *(v3 + 2) * (fac); \
#define VECSUBFAC(v1, v2, v3, fac) { \
*(v1) = *(v2) - *(v3) * (fac); \
*(v1 + 1) = *(v2 + 1) - *(v3 + 1) * (fac); \
*(v1 + 2) = *(v2 + 2) - *(v3 + 2) * (fac); \
} (void)0
#define INPR(v1, v2) ( (v1)[0] * (v2)[0] + (v1)[1] * (v2)[1] + (v1)[2] * (v2)[2])
@ -223,7 +223,7 @@
#define SWITCH_SHORT(a) { \
char s_i, *p_i; \
p_i = (char *)&(a); \
s_i = p_i[0]; p_i[0] = p_i[1]; p_i[1] = s_i; \
s_i = p_i[0]; p_i[0] = p_i[1]; p_i[1] = s_i; \
} (void)0

@ -61,7 +61,7 @@ void PIL_sleep_ms(int ms);
double _timeit_##var = PIL_check_seconds_timer(); \
printf("time start (" #var "): " AT "\n"); \
fflush(stdout); \
{ (void) \
{ (void)0 \
#define TIMEIT_VALUE(var) (float)(PIL_check_seconds_timer() - _timeit_##var)
@ -71,7 +71,7 @@ void PIL_sleep_ms(int ms);
} \
printf("time end (" #var "): %.6f" " " AT "\n", TIMEIT_VALUE(var)); \
fflush(stdout); \
} (void) \
} (void)0 \
#ifdef __cplusplus
}