diff --git a/ft8/ft8.cpp b/ft8/ft8.cpp index 398460924..6dbc63d3e 100644 --- a/ft8/ft8.cpp +++ b/ft8/ft8.cpp @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include @@ -3046,7 +3045,7 @@ int FT8::one_iter1( if (ret) return ret; if (params.soft_ones == 0) - memcpy(ll174, p174, sizeof(ll174)); + std::copy(p174, p174 + 174, ll174); } if (params.soft_triples) diff --git a/ft8/osd.cpp b/ft8/osd.cpp index 917ef90ea..1fd016178 100644 --- a/ft8/osd.cpp +++ b/ft8/osd.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include "libldpc.h" #include "osd.h" @@ -262,14 +261,14 @@ int osd_decode(float codeword[174], int depth, int out[91], int *out_depth) if (1) { // just accept this, since no bits had to be flipped. - memcpy(out, xplain, sizeof(xplain)); + std::copy(xplain, xplain + 91, out); *out_depth = 0; return 1; } else { got_a_best = 1; - memcpy(best_plain, xplain, sizeof(best_plain)); + std::copy(xplain, xplain + 91, best_plain); best_score = xscore; 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) { got_a_best = 1; - memcpy(best_plain, xplain, sizeof(best_plain)); + std::copy(xplain, xplain + 91, best_plain); best_score = xscore; 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) { - memcpy(out, best_plain, sizeof(best_plain)); + std::copy(best_plain, best_plain + 91, out); *out_depth = best_depth; return 1; } diff --git a/ft8/unpack.cpp b/ft8/unpack.cpp index 29ca3d39d..a271d0399 100644 --- a/ft8/unpack.cpp +++ b/ft8/unpack.cpp @@ -19,7 +19,6 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// #include -#include #include #include "unpack.h"