use constants to avoid mistakes

This commit is contained in:
Ahmet Inan 2018-09-21 19:26:30 +02:00
commit 2bf8d4ea84
8 changed files with 69 additions and 69 deletions

View file

@ -11,14 +11,14 @@ Copyright 2018 Ahmet Inan <inan@aicodix.de>
namespace CODE {
template <int NR, int FCR, int K, typename GF>
template <int NR, int FCR, int MSG, typename GF>
class BoseChaudhuriHocquenghemDecoder
{
public:
typedef typename GF::value_type value_type;
typedef typename GF::ValueType ValueType;
typedef typename GF::IndexType IndexType;
static const int N = GF::N, NP = N - K;
static const int N = GF::N, K = MSG, NP = N - K;
ReedSolomonErrorCorrection<NR, FCR, GF> algorithm;
int compute_syndromes(ValueType *code, ValueType *syndromes)
{