← Back to team overview

kicad-developers team mailing list archive

[PATCH] common.h tidyups

 

Hi,

I have a big set of patches on a branch that are mostly to do with
stripping seldom-used functions out of common.h into more targeted
headers:

https://code.launchpad.net/~john-j-beard/kicad/+git/kicad/+ref/tidy_ups

The idea here is to reduce the visibility of these functions from
almost every file in KiCad to just those that need them. This also
means that changing the signatures (or even just adding comments)
doesn't force a huge recompile of the whole codebase, just the files
that use them. It also makes common.h less of a "dumping ground" for
random stuff.

There were several old functions or variables that weren't used,
weren't defined, or weren't declared too, and these were tidied up.

I have used std::unique_ptr in a couple of places, at one was leaking
an object before.

I only meant to do a few, but since any big work in common.h is as bad
as small work, I did quite a few.

The patches should mostly be cherry-pickable in case not all of them are wanted.

Cheers,

John


Follow ups