From 6deee5a936588365b2ac809b2c7f75593a03a9c3 Mon Sep 17 00:00:00 2001 From: "Charles J. Cliffe" Date: Thu, 5 Feb 2015 19:45:01 -0500 Subject: [PATCH] loop->memcpy --- src/sdr/SDRThread.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/sdr/SDRThread.cpp b/src/sdr/SDRThread.cpp index ce3f096..82838e5 100644 --- a/src/sdr/SDRThread.cpp +++ b/src/sdr/SDRThread.cpp @@ -255,9 +255,7 @@ void SDRThread::threadMain() { dataOut->data.resize(n_read); } - for (int i = 0; i < n_read; i++) { - dataOut->data[i] = buf[i]; - } + memcpy(&dataOut->data[0], buf, n_read); double time_slice = (double) n_read / (double) sampleRate; seconds += time_slice;