roslint
roslint copied to clipboard
Fix dict change during iteration
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.
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).