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

Avoid moving a temporary object since it prevents copy elision

This commit is contained in:
Carles Fernandez 2018-06-03 18:39:51 +02:00
parent 11ffef0574
commit 52eb3ba240
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -323,7 +323,7 @@ TEST(GNSSBlockFactoryTest, InstantiateChannels)
configuration->set_property("Channel1.item_type", "gr_complex");
gr::msg_queue::sptr queue = gr::msg_queue::make(0);
std::unique_ptr<GNSSBlockFactory> factory;
std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> channels = std::move(factory->GetChannels(configuration, queue));
std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> channels = factory->GetChannels(configuration, queue);
EXPECT_EQ(static_cast<unsigned int>(2), channels->size());
channels->erase(channels->begin(), channels->end());
}