diff options
author | anastas | 2007-02-06 23:55:34 +0000 |
---|---|---|
committer | anastas | 2007-02-06 23:55:34 +0000 |
commit | 9f502aa5f040b15b6d6e76d26a1dce3cb1a90f96 (patch) | |
tree | 0708b195ded2fba675a763fac67a108ed6e7d0d5 /gr-trellis/src/lib/interleaver.cc | |
parent | 552c2aa5e5900697e3f2bcc38dc381662af5b8d6 (diff) | |
download | gnuradio-9f502aa5f040b15b6d6e76d26a1dce3cb1a90f96.tar.gz gnuradio-9f502aa5f040b15b6d6e76d26a1dce3cb1a90f96.tar.bz2 gnuradio-9f502aa5f040b15b6d6e76d26a1dce3cb1a90f96.zip |
Minor fix in interleaver class: invoking with negative seed will not reset the random number generator.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@4402 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-trellis/src/lib/interleaver.cc')
-rw-r--r-- | gr-trellis/src/lib/interleaver.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gr-trellis/src/lib/interleaver.cc b/gr-trellis/src/lib/interleaver.cc index 33556ea45..93c194709 100644 --- a/gr-trellis/src/lib/interleaver.cc +++ b/gr-trellis/src/lib/interleaver.cc @@ -85,13 +85,13 @@ interleaver::interleaver(const char *name) //###################################################################### //# Generate a random interleaver //###################################################################### -interleaver::interleaver(int K, unsigned int seed) +interleaver::interleaver(int K, int seed) { d_K=K; d_INTER.resize(d_K); d_DEINTER.resize(d_K); - srand(seed); + if(seed>=0) srand((unsigned int)seed); std::vector<int> tmp(d_K); for(int i=0;i<d_K;i++) { d_INTER[i]=i; |