Skip to content

Conversation

jmackay2
Copy link
Contributor

This fixes a warning seen building on Ubuntu 24.04.

Warning:

gtsam/gtsam/discrete/Assignment.h:93:21: error: loop variable ‘<structured bindings>’ creates a copy from type ‘const std::pair<long unsigned int, long unsigned int>’ [-Werror=range-loop-construct]
   93 |     for (const auto [idx, _] : keys) assignment[idx] = 0;  // Initialize from 0

This change uses a reference to avoid the copy.

@dellaert dellaert merged commit 82731b8 into borglab:develop Jan 25, 2025
35 checks passed
@jmackay2 jmackay2 deleted the fix_copy_warning branch January 25, 2025 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants