mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-21 09:34:53 +00:00
Replace memset by std::fill_n. This fix warnings in GCC 8.0.1 (Fedora
Rawhide). The warnings were: warning: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct std::complex<float>'; use assignment or value-initialization instead [-Wclass-memaccess]
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include "pcps_acquisition_fine_doppler_cc.h"
|
||||
#include <algorithm> // std::rotate
|
||||
#include <algorithm> // std::rotate, std::fill_n
|
||||
#include <sstream>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
@@ -331,7 +331,7 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler(gr_vector_const_void_star
|
||||
gr::fft::fft_complex *fft_operator = new gr::fft::fft_complex(fft_size_extended, true);
|
||||
|
||||
//zero padding the entire vector
|
||||
memset(fft_operator->get_inbuf(), 0, fft_size_extended * sizeof(gr_complex));
|
||||
std::fill_n(fft_operator->get_inbuf(), fft_size_extended, gr_complex(0.0, 0.0));
|
||||
|
||||
//1. generate local code aligned with the acquisition code phase estimation
|
||||
gr_complex *code_replica = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
|
||||
Reference in New Issue
Block a user