diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2014-12-04 16:05:42 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2014-12-08 13:35:27 (GMT) |
commit | b6c0fbcbb224c894eb90cc920c6ecb8e8d48e66a (patch) | |
tree | 945db6cb55f72e09c56e2846eaa355f8c6bc472d /src/compression/bwt.c | |
parent | db972bad9178b95ee16110de186074476579bf89 (diff) |
Made function arguments const where relevant.
Change-Id: I5b196b57976c8c718b079336a805188ccb03ef4b
Diffstat (limited to 'src/compression/bwt.c')
-rw-r--r-- | src/compression/bwt.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/compression/bwt.c b/src/compression/bwt.c index 681d66b..c5c46df 100644 --- a/src/compression/bwt.c +++ b/src/compression/bwt.c @@ -22,7 +22,7 @@ #define SHOWIT2 #endif -static int compare_index(int i1,int i2,int nvals,unsigned int *vals,unsigned int *nrepeat) +static int compare_index(int i1,int i2, const int nvals, unsigned int *vals, unsigned int *nrepeat) { int i,j; for (i=0; i<nvals; i++) @@ -75,10 +75,10 @@ static int compare_index(int i1,int i2,int nvals,unsigned int *vals,unsigned int return 0; } -void Ptngc_bwt_merge_sort_inner(int *indices, int nvals,unsigned int *vals, - int start, int end, - unsigned int *nrepeat, - int *workarray) +void Ptngc_bwt_merge_sort_inner(int *indices, const int nvals,unsigned int *vals, + const int start, const int end, + unsigned int *nrepeat, + int *workarray) { int middle; if ((end-start)>1) @@ -140,8 +140,8 @@ void Ptngc_bwt_merge_sort_inner(int *indices, int nvals,unsigned int *vals, } /* Burrows-Wheeler transform. */ -void Ptngc_comp_to_bwt(unsigned int *vals, int nvals, - unsigned int *output, int *index) +void Ptngc_comp_to_bwt(unsigned int *vals, const int nvals, + unsigned int *output, int *index) { int i; int *indices=warnmalloc(2*nvals*sizeof *indices); @@ -305,8 +305,8 @@ void Ptngc_comp_to_bwt(unsigned int *vals, int nvals, } /* Burrows-Wheeler inverse transform. */ -void Ptngc_comp_from_bwt(unsigned int *input, int nvals, int index, - unsigned int *vals) +void Ptngc_comp_from_bwt(unsigned int *input, const int nvals, int index, + unsigned int *vals) { /* Straightforward from the Burrows-Wheeler paper (page 13). */ int i; |