mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 20:20:35 +00:00
Use emplace back when possible
This commit is contained in:
parent
8319c2d33a
commit
578d96159d
@ -302,7 +302,7 @@ void sbas_l1_telemetry_decoder_cc::frame_detector::get_frame_candidates(const st
|
||||
for (std::vector<int32_t>::iterator candidate_bit_it = candidate.begin(); candidate_bit_it != candidate.end(); candidate_bit_it++)
|
||||
*candidate_bit_it = *candidate_bit_it == 0 ? 1 : 0;
|
||||
}
|
||||
msg_candidates.push_back(std::pair<int32_t, std::vector<int32_t>>(relative_preamble_start, candidate));
|
||||
msg_candidates.emplace_back(relative_preamble_start, candidate);
|
||||
ss.str("");
|
||||
ss << "preamble " << preample_it - preambles.begin() << (inv_preamble_detected ? " inverted" : " normal") << " detected! candidate=";
|
||||
for (std::vector<int32_t>::iterator bit_it = candidate.begin(); bit_it < candidate.end(); ++bit_it)
|
||||
@ -344,7 +344,7 @@ void sbas_l1_telemetry_decoder_cc::crc_verifier::get_valid_frames(const std::vec
|
||||
// the final remainder must be zero for a valid message, because the CRC is done over the received CRC value
|
||||
if (crc == 0)
|
||||
{
|
||||
valid_msgs.push_back(msg_candiate_char_t(candidate_it->first, candidate_bytes));
|
||||
valid_msgs.emplace_back(candidate_it->first, candidate_bytes);
|
||||
ss << "Valid message found!";
|
||||
}
|
||||
else
|
||||
|
@ -40,9 +40,7 @@ tcp_communication::tcp_communication() : tcp_socket_(io_service_)
|
||||
}
|
||||
|
||||
|
||||
tcp_communication::~tcp_communication()
|
||||
{
|
||||
}
|
||||
tcp_communication::~tcp_communication() = default;
|
||||
|
||||
|
||||
int tcp_communication::listen_tcp_connection(size_t d_port_, size_t d_port_ch0_)
|
||||
|
@ -2147,7 +2147,7 @@ std::string Gnuplot::create_tmpfile(std::ofstream &tmp)
|
||||
//
|
||||
// Save the temporary filename
|
||||
//
|
||||
tmpfile_list.push_back(name);
|
||||
tmpfile_list.emplace_back(name);
|
||||
Gnuplot::tmpfile_num++;
|
||||
|
||||
return name;
|
||||
|
@ -145,7 +145,7 @@ TEST(MatioTest, WriteAndReadGrComplex)
|
||||
std::vector<gr_complex> x_v_read;
|
||||
for (unsigned int i = 0; i < size; i++)
|
||||
{
|
||||
x_v_read.push_back(gr_complex(x_read_real[i], x_read_imag[i]));
|
||||
x_v_read.emplace_back(x_read_real[i], x_read_imag[i]);
|
||||
}
|
||||
|
||||
Mat_Close(matfp_read);
|
||||
|
Loading…
Reference in New Issue
Block a user