← Back to team overview

kicad-developers team mailing list archive

Re: Patch: Extract LIB_PART read/write from SCH_LEGACY_PLUGIN_CACHE

 

Brian,

On 3/14/2019 2:34 PM, Brian wrote:
> Wayne,
> 
> 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.
> Precisely.
>> 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.

If it's already like that, leave it as is.

> 
> 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?

I don't have a preference on this.  I typically don't align them because
I can never be sure if the next person will go through the enter file
and realign everything when they add an_even_more_wordy_return_type.

Wayne

> 
> Thanks,
> -Brian
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp


References