Commit Graph

10 Commits

Author SHA1 Message Date
Markus Reitböck
73c97bc90f App: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-14 09:47:02 +02:00
Weston Schmidt
87a4ce2e8d Add test causing crash and fix map sorting function. (#22889)
* Add test causing crash and fix map sorting function.

When opening a model from FreeCAD 0.7, the model would crash when I
changed some of the parameters.  This turned out to be due to the
ElementNameComparator::operator() not correctly sorting the items going
into the map, which caused the map to be invalid.

This change adds a test that represented the exact names causing the
crash as well as a fix for the problem.  Names are now sorted:

1. Empty names first
2. Identifier based names second.
3. Hex based names last.

Identifiers are sorted lexicographically for the name portion and
numerically for the number portion, smallest to largest.

Hex based names are sorted by the value of the hex number, smallest to
largest.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix lint issues.

* Add another test form to the mix.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-05 14:07:02 -05:00
wmayer
6f5259af26 App: Apply clang format (part 1) 2024-11-21 07:54:24 +01:00
bgbsww
16eecee812 Toposhape/Part:: Fix, relocate and test element methods in ComplexGeoData and TopoShape 2024-03-07 23:00:48 -05:00
bgbsww
2ede6a667e Merge branch 'main' into bgbsww-toponaming-makeElementFace 2024-01-21 15:52:31 -05:00
Zheng, Lei
e425b5b2db Toponaming move makEFace as makeElementFace and dependencies 2024-01-17 20:38:50 -05:00
Chris Hennes
210d4e9253 App/Toponaming: ElementNameComparator linter cleanup
Does not address cognitive complexity.
2024-01-15 21:50:32 -06:00
Zheng, Lei
3a53a69379 App/Toponaming: Add Comparator for mapped elements
This is the original code from the Toponaming branch, modified slightly to update the
method name and correct some grammatical errors in the descriptive comment.

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-01-15 21:28:02 -06:00
Chris Hennes
d871779299 App/Toponaming: Add tests to MappedElement 2023-03-24 10:05:09 -05:00
Chris Hennes
320d06239e App/Toponaming: Add MappedElement class 2023-03-23 09:46:32 -05:00