Skip to content

Commit 5c4dd90

Browse files
authored
minor formatting fix (#7245)
1 parent e2e0173 commit 5c4dd90

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/quickselect.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
// from good ol' Numerical Recipes in C
44

5-
static inline void iswap(int *a, int *b) {int tmp=*a; *a=*b; *b=tmp;}
6-
static inline void dswap(double *a, double *b) {double tmp=*a; *a=*b; *b=tmp;}
7-
static inline void i64swap(int64_t *a, int64_t *b) {int64_t tmp=*a; *a=*b; *b=tmp;}
5+
static inline void iswap(int *a, int *b) { int tmp = *a; *a = *b; *b = tmp; }
6+
static inline void dswap(double *a, double *b) { double tmp = *a; *a = *b; *b = tmp; }
7+
static inline void i64swap(int64_t *a, int64_t *b) { int64_t tmp = *a; *a = *b; *b = tmp; }
88

99
#undef BODY
1010
#define BODY(SWAP) \
@@ -30,7 +30,7 @@ static inline void i64swap(int64_t *a, int64_t *b) {int64_t tmp=*a; *a=*b; *b=tm
3030
SWAP(x + l, x + l + 1); \
3131
} \
3232
unsigned long i = l + 1, j = ir; \
33-
a=x[l + 1]; \
33+
a = x[l + 1]; \
3434
for (;;) { \
3535
do i++; while (x[i] < a); \
3636
do j--; while (x[j] > a); \
@@ -44,7 +44,7 @@ static inline void i64swap(int64_t *a, int64_t *b) {int64_t tmp=*a; *a=*b; *b=tm
4444
} \
4545
} \
4646
a = x[med]; \
47-
if (n%2 == 1) { \
47+
if (n % 2 == 1) { \
4848
return (double)a; \
4949
} else { \
5050
b = x[med + 1]; \

0 commit comments

Comments
 (0)