mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-08-03 14:32:25 -04:00
FT8 demod: removed string.h dependency
This commit is contained in:
parent
ea49a8813b
commit
aaab8b5351
@ -36,7 +36,6 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <complex>
|
#include <complex>
|
||||||
#include <string.h>
|
|
||||||
#include <random>
|
#include <random>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <map>
|
#include <map>
|
||||||
@ -3046,7 +3045,7 @@ int FT8::one_iter1(
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
if (params.soft_ones == 0)
|
if (params.soft_ones == 0)
|
||||||
memcpy(ll174, p174, sizeof(ll174));
|
std::copy(p174, p174 + 174, ll174);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.soft_triples)
|
if (params.soft_triples)
|
||||||
|
@ -27,7 +27,6 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
|
||||||
#include "libldpc.h"
|
#include "libldpc.h"
|
||||||
#include "osd.h"
|
#include "osd.h"
|
||||||
|
|
||||||
@ -262,14 +261,14 @@ int osd_decode(float codeword[174], int depth, int out[91], int *out_depth)
|
|||||||
if (1)
|
if (1)
|
||||||
{
|
{
|
||||||
// just accept this, since no bits had to be flipped.
|
// just accept this, since no bits had to be flipped.
|
||||||
memcpy(out, xplain, sizeof(xplain));
|
std::copy(xplain, xplain + 91, out);
|
||||||
*out_depth = 0;
|
*out_depth = 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
got_a_best = 1;
|
got_a_best = 1;
|
||||||
memcpy(best_plain, xplain, sizeof(best_plain));
|
std::copy(xplain, xplain + 91, best_plain);
|
||||||
best_score = xscore;
|
best_score = xscore;
|
||||||
best_depth = 0;
|
best_depth = 0;
|
||||||
}
|
}
|
||||||
@ -290,7 +289,7 @@ int osd_decode(float codeword[174], int depth, int out[91], int *out_depth)
|
|||||||
if (got_a_best == 0 || xscore < best_score)
|
if (got_a_best == 0 || xscore < best_score)
|
||||||
{
|
{
|
||||||
got_a_best = 1;
|
got_a_best = 1;
|
||||||
memcpy(best_plain, xplain, sizeof(best_plain));
|
std::copy(xplain, xplain + 91, best_plain);
|
||||||
best_score = xscore;
|
best_score = xscore;
|
||||||
best_depth = ii;
|
best_depth = ii;
|
||||||
}
|
}
|
||||||
@ -299,7 +298,7 @@ int osd_decode(float codeword[174], int depth, int out[91], int *out_depth)
|
|||||||
|
|
||||||
if (got_a_best)
|
if (got_a_best)
|
||||||
{
|
{
|
||||||
memcpy(out, best_plain, sizeof(best_plain));
|
std::copy(best_plain, best_plain + 91, out);
|
||||||
*out_depth = best_depth;
|
*out_depth = best_depth;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <string.h>
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include "unpack.h"
|
#include "unpack.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user