roslint icon indicating copy to clipboard operation
roslint copied to clipboard

Fix dict change during iteration

Open peci1 opened this issue 1 year ago • 1 comments

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 avatar Nov 12 '24 01:11 peci1

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).

peci1 avatar Jan 08 '25 11:01 peci1