← Back to team overview

kicad-developers team mailing list archive

Re: 6387 code organization

 

This sort of thing is the reason I still find it impossible to find 
anything in kicad's code without liberal use of grep or ag. We're 
_almost_ consistent, putting all the dialog GUI code in "dialogs". Why 
would you break this consistency _just because the code is small_?

The entire block you added to pcbnew/modules.cpp from line 64 to line 93 
should be in pcbnew/dialogs/dialog_get_footprint_by_name.cpp. The 
matching _base.* files are there, why split it?


On Sun, Dec 20, 2015 at 09:23:53PM +0100, jp charras wrote:
> Le 20/12/2015 20:37, Chris Pavlina a écrit :
> > Why is class DIALOG_GET_FOOTPRINT_BY_NAME in pcbnew/modules.cpp instead 
> > of pcbnew/dialogs/dialog_get_footprint_by_name.cpp in rev 6387?
> > 
> > 
> 
> Because this is not very useful:
> * dialog_get_footprint_by_name.cpp is not needed (nothing to put in this
> file)
> * It is only a code which could be in dialog_get_footprint_by_name.h
>  (it is just an header), but this code has only 15 lines and is used
> only in modules.cpp.
> * Many other files contains this kind of small code.
> 
> Of course, if (when) it is used in other .cpp files, put it in
> dialog_get_footprint_by_name.h could be good.
> 
> -- 
> Jean-Pierre CHARRAS
> 
> _______________________________________________
> 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