← Back to team overview

kicad-developers team mailing list archive

Re: Patch: Extract LIB_PART read/write from SCH_LEGACY_PLUGIN_CACHE



On 3/14/19 1:24 PM, Wayne Stambaugh wrote:
I thought so.  I take it your are storing a LIB_PART as string in each
row and that the database itself is acting like the library.
Two things I forget to mention about your last patch.  Please use the
version test macros rather than a passing single passed to loadPart().
Pass the major and minor file versions and use the version macro to make
it clear that what your are testing.
Fair enough.  Will do.

Also, please don't put all of the
switch case statements on the same line.  It makes harder to read unless
you tidy them up by aligning them vertically.
I'm not sure what you're talking about, but if you mean this:

    case 'I': pin->m_type = PIN_INPUT; break;

That's not code I wrote, and that's not my typical form (I would write that as three lines).  What may have happened is when I did a copy/paste, Kate (my editor of choice at the moment) "helpfully" sucked out some "excess" horizontal whitespace from what was formerly "tidied up" as you say.  At any rate, since this new approach doesn't involve moving any code between files, that particular problem shouldn't crop up.

On the topic of vertical alignment across lines, what do you suggest for this situation?

void    someFn;
void    someOtherFn;
wordy_return_type    outlyingFn();
void    theLastFn();

What would you suggest for where to align the name of "outlyingFn", since its return type doesn't fit the column of space the rest of the nearby declarations need?  Should all of the names be pushed out far enough to accommodate "wordy_return_type"?  Or should the declaration for outlyingFn be moved so that it's not in the middle of the others?


Follow ups