1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 20:20:35 +00:00

clang-tidy: apply performance-for-range-copy check

See https://clang.llvm.org/extra/clang-tidy/checks/performance-for-range-copy.html
This commit is contained in:
Carles Fernandez 2019-02-12 01:25:27 +01:00
parent eae967ed1a
commit 5b50e74ca8
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
3 changed files with 5 additions and 5 deletions

View File

@ -36,7 +36,7 @@
Monitor_Pvt_Udp_Sink::Monitor_Pvt_Udp_Sink(const std::vector<std::string>& addresses, const uint16_t& port) : socket{io_service}
{
for (auto address : addresses)
for (const auto& address : addresses)
{
boost::asio::ip::udp::endpoint endpoint(boost::asio::ip::address::from_string(address, error), port);
endpoints.push_back(endpoint);
@ -50,7 +50,7 @@ bool Monitor_Pvt_Udp_Sink::write_monitor_pvt(Monitor_Pvt monitor_pvt)
oa << monitor_pvt;
std::string outbound_data = archive_stream.str();
for (auto endpoint : endpoints)
for (const auto& endpoint : endpoints)
{
socket.open(endpoint.protocol(), error);
socket.connect(endpoint, error);

View File

@ -629,7 +629,7 @@ private:
recent_msgs_.pop_front();
}
for (auto participant : participants_)
for (const auto& participant : participants_)
{
participant->deliver(msg);
}

View File

@ -37,7 +37,7 @@
Gnss_Synchro_Udp_Sink::Gnss_Synchro_Udp_Sink(const std::vector<std::string>& addresses, const uint16_t& port) : socket{io_service}
{
for (auto address : addresses)
for (const auto& address : addresses)
{
boost::asio::ip::udp::endpoint endpoint(boost::asio::ip::address::from_string(address, error), port);
endpoints.push_back(endpoint);
@ -51,7 +51,7 @@ bool Gnss_Synchro_Udp_Sink::write_gnss_synchro(const std::vector<Gnss_Synchro>&
oa << stocks;
std::string outbound_data = archive_stream.str();
for (auto endpoint : endpoints)
for (const auto& endpoint : endpoints)
{
socket.open(endpoint.protocol(), error);
socket.connect(endpoint, error);