On Jul 1, 2011, at 7:30 PM, Campbell Barton wrote:
Waited for the weekend to do this, heres a patch on inkscapes current source which converts dynamic sized arrays to std::vector's.
http://www.graphicall.org/ftp/ideasman42/clang_compat_r10398.diff
if this can be committed there is only 2 multi dimensional arrays to figure out what to do with, I tried using vectors here too but it didn't work using some examples I found online but rather try solve this in a separate patch.
Eeeek!!! scary code style!!!
But that was the existing style, so you're safe. :-)
It did touch on one other item to consider. Some of that code had several variables declared in a single statement, but with commas. There are a few reasons to keep them separate, including ongoing maintenance (easier to see diffs if one adds or removes one, or changes the type of a single one), and avoidance of bugs (mssing '*' on latter ones when declaring pointers, etc.)
I think two of the general rules that are good for variables are "each on it's own line" and "always initialize". Unfortunately we still have a bit to go in getting our codebase cleaned up. Definitely, though, go ahead and fix any uninitialized variables you might see.
Overall it seems good, so I'll commit once I run through some tests.