Merge pull request #2001 from jmackay2/fix_copy_warning

Fix for loop copy warning
release/4.3a0
Frank Dellaert 2025-01-25 09:58:49 -05:00 committed by GitHub
commit 82731b894c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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) {