projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e78ad8
)
src/{fmat,fvec}.c: avoid integer division
author
Paul Brossier
<piem@piem.org>
Mon, 28 Nov 2016 16:31:45 +0000
(17:31 +0100)
committer
Paul Brossier
<piem@piem.org>
Mon, 28 Nov 2016 16:31:45 +0000
(17:31 +0100)
src/fmat.c
patch
|
blob
|
history
src/fvec.c
patch
|
blob
|
history
diff --git
a/src/fmat.c
b/src/fmat.c
index
2d404d8
..
c8541a5
100644
(file)
--- a/
src/fmat.c
+++ b/
src/fmat.c
@@
-110,7
+110,7
@@
void fmat_ones(fmat_t *s) {
void fmat_rev(fmat_t *s) {
uint_t i,j;
for (i=0; i< s->height; i++) {
- for (j=0; j< FLOOR(s->length/2); j++) {
+ for (j=0; j< FLOOR(
(smpl_t)
s->length/2); j++) {
ELEM_SWAP(s->data[i][j], s->data[i][s->length-1-j]);
}
}
diff --git
a/src/fvec.c
b/src/fvec.c
index
bd253b4
..
3961d74
100644
(file)
--- a/
src/fvec.c
+++ b/
src/fvec.c
@@
-90,7
+90,7
@@
void fvec_ones(fvec_t *s) {
void fvec_rev(fvec_t *s) {
uint_t j;
- for (j=0; j< FLOOR(s->length/2); j++) {
+ for (j=0; j< FLOOR(
(smpl_t)
s->length/2); j++) {
ELEM_SWAP(s->data[j], s->data[s->length-1-j]);
}
}