Initializing m_last to time_point::min() causes signed integer
overflow when computing now - m_last, since the nanosecond
difference exceeds int64_t range. Initialize to now - interval
instead so the first Ready() call passes naturally.
Five call sites independently reimplemented the same
time-gated throttle pattern. This consolidates them all
into a single THROTTLE class backed by steady_clock.
Three call sites duplicated the wxWidgets YieldFor workaround
for timer-event backlog (wxWidgets issue #26192). This replaces them
with a shared DrainPendingEvents free function.
GlobalLibraries and PreloadedFootprints each have deep object
hierarchies that take noticeable time to destroy during shutdown.
Since the OS reclaims all process memory anyway, running these
destructors is wasted work. The new LEAK_AT_EXIT template wrapper
heap-allocates the wrapped object on first access and never frees it,
speeding up program exit.
When built with address sanitizer, it uses __lsan_ignore_object to
prevent false positive leak reports. Also added a valgrind
suppression file for the same purpose.
This is a zero-dimensional object that can be used for snapping
and documentation of useful, but non-physical features on a
board or footprint. They do not correspond to any physical
output in exports or plots.
Points do have a "size", but this is a graphical property only
and determines how large they are drawn on the board.
They also have a layer, which allows them to be selected and
made visible according to layer filters.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/4691
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo. Avoids needing to
repeatly update.
Also updates AUTHORS.txt from current repo with contributor names
There was a gentle mish-mash of booleans, some with
true being left/right and some up/down, and some functions that
can flip in both axes (which is never actually done, and doesn't
really make geometric sense).
Replace all this with the FLIP_DIRECTION enum class, which makes
the intention completely unambiguous.
This also then allows a small scattering of simplifications,
because everything takes the same type and you don't have to
fiddle booleans to fit.
Includes:
- Fix GAL to draw closed polygons in eeschema
- Add functionality to eeschema to draw arbitary polygons
- Update polygon item previews to have customisable edge colour
- Add new SCH_RULE_AREA class, derived from a poly SCH_SHAPE
- Add SCH_RULE_AREA to paint and plot methods
- Add new rule area color preference to themes
This library is meant to move non-EDA items (language extensions,
library extensions, etc.) into the lowest-level of our dependency chain.
This library should never depend on anyother non-thirdparty code in the
kicad codebase.
The hash table for integer hashes is extremely limited and places most
elements in the same buckets. This leads to a linear search time for
structures built on this.
This blocks hashes, directing the coder to utilize std::set or std::map
structures instead of hash tables for implementing integer-based
lookups.
Also fixes some plot bugs with arcs.
Also moves polygonization of arcs (when required) in plotting code
from 5 degrees to calculated based on ARC_HIGH_DEF.
Fixes https://gitlab.com/kicad/code/kicad/issues/5017