@@ -53,7 +53,7 @@ static bool NextLFSR(std::bitset<k> &lfsr, std::array<uint16_t, nTaps> taps, boo
5353 static_assert (nTaps > 0 , " At least one tap is needed for the LFSR." );
5454 static_assert (nTaps <= k, " Cannot use more taps than polynomial order" );
5555 for (uint16_t j = 0 ; j < nTaps; ++j) {
56- static_assert ((taps[j] - 1 ) <= k && (taps[j] - 1 ) > 0 , " Tap value is out of range [1,k]" );
56+ assert ((taps[j] - 1 ) <= k && (taps[j] - 1 ) > 0 && " Tap value is out of range [1,k]" );
5757 }
5858
5959 // First, calculate the XOR (^) of all selected bits (marked by the taps)
@@ -101,7 +101,7 @@ template <size_t k, size_t nTaps, typename Output = unsigned char>
101101static std::vector<Output> GenerateSequence (std::bitset<k> start, std::array<uint16_t , nTaps> taps, bool left = true ,
102102 bool wrapping = false , bool oppositeBit = false )
103103{
104- std::vector<bool > result; // Store result here
104+ std::vector<Output > result; // Store result here
105105
106106 // Sanity-checks
107107 static_assert (k <= 32 , " For the moment, only supported until k == 32." );
@@ -155,7 +155,7 @@ static std::vector<Output> GenerateSequence(std::bitset<k> start, std::array<uin
155155
156156 result.shrink_to_fit (); // only some special taps will lead to the maxPeriod, others will stop earlier
157157
158- return ;
158+ return result ;
159159}
160160}
161161
0 commit comments