Skip to content

Fix dict change during iteration#90

Open
peci1 wants to merge 1 commit intoros:masterfrom
peci1:patch-2
Open

Fix dict change during iteration#90
peci1 wants to merge 1 commit intoros:masterfrom
peci1:patch-2

Conversation

@peci1
Copy link
Contributor

@peci1 peci1 commented Nov 12, 2024

Without this PR, I got an exception from cpplint saying that the dict iterated over has been changed during iteration.

The comment above my change says we operate on a copy, but it's not actually creating a copy (I think it gets a generator). So I instead forced the copy.

@peci1
Copy link
Contributor Author

peci1 commented Jan 8, 2025

As a workaround, I've found out that this error is usually triggered by a .cpp file that misses some includes from its corresponding .h file. So just make sure your .cpp files contain all includes from their .h files (and some more if needed, obviously).

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.

1 participant