Skip to content

Commit

Permalink
Fix for loop copy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jmackay2 committed Jan 25, 2025
1 parent a744cfc commit b05b894
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gtsam/discrete/Assignment.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class Assignment : public std::map<L, size_t> {
const std::vector<std::pair<L, size_t>>& keys) {
std::vector<AssignmentType> allPossValues;
AssignmentType assignment;
for (const auto [idx, _] : keys) assignment[idx] = 0; // Initialize from 0
for (const auto& [idx, _] : keys) assignment[idx] = 0; // Initialize from 0

const size_t nrKeys = keys.size();
while (true) {
Expand Down

0 comments on commit b05b894

Please sign in to comment.