zeroc-ice / datastorm

Data centric pub/sub framework based on Ice
GNU General Public License v2.0
13 stars 7 forks source link

Bogus use after move in DataStorm/config test #27

Open pepone opened 1 month ago

pepone commented 1 month ago

https://github.com/zeroc-ice/datastorm/blob/fba29e653d53d3493c423ad1f853f4bee15952cd/cpp/test/DataStorm/config/Writer.cpp#L304

Unless I'm mistaken the call to move(topic) is bogus, as it is also used in makeSingleKeyWriter(topic, "elem")

pepone commented 1 month ago

we can do

auto singleKeyWriter = makeSingleKeyWriter(topic, "elem");
w.emplace_back(
    std::move(holder),
    std::move(node),
    std::move(topic),
    std::move(singleKeyWriter));