compute_synthetic_book doesn't copy leg market tuples as it iterates through them

This commit is contained in:
John Colvin committed 2020-12-09 00:11:51 -06:00
1 parent 590ca3892d
commit ff02801000
1 file changed
+1 -1
@@ -72,7 +72,7 @@ void compute_synthetic_book(
};
std::vector<Leg> legs;
for (auto [qty, price_mult, book] : leg_mkts) {
for (const auto& [qty, price_mult, book] : leg_mkts) {
// todo: implement price mult logic (for now just assert nan or 1)
bts_assert(price_mult.is_nan() || price_mult.price() == 1);
auto& l = legs.emplace_back();