]> OCCT Git - occt.git/commit
Foundation Classes, gp - Mark core types and methods constexpr/noexcept (#790)
authorPasukhin Dmitry <dpasukhi@opencascade.com>
Sun, 2 Nov 2025 00:52:32 +0000 (00:52 +0000)
committerGitHub <noreply@github.com>
Sun, 2 Nov 2025 00:52:32 +0000 (00:52 +0000)
commitb30cee01250d45c78d1ff37bf97e90b1aad29f73
treef9dc2843b8d9072c64a6cdd505b92e4e57ecf039
parent962a456f9b1cd510adb31ae4e477a59c6aab9515
Foundation Classes, gp - Mark core types and methods constexpr/noexcept (#790)

Make gp basic types and operations more constexpr-friendly and noexcept:
- Mark gp::Resolution as constexpr.
- Add constexpr and/or noexcept to many constructors and small access/modifier methods.
- Convert several functions to constexpr where safe to allow compile-time evaluation.
- Initialize members via initializer lists for several GTrsf/GTrsf2d/Mat/etc constructors.
- Add noexcept to transformation/serialization helpers and small utilities where appropriate.

This enables better compile-time optimizations and safer noexcept semantics across TKMath gp primitives.
39 files changed:
src/ApplicationFramework/TKBin/BinMDataXtd/BinMDataXtd_TriangulationDriver.cxx
src/Draw/TKQADraw/QABugs/QABugs_11.cxx
src/Draw/TKQADraw/QABugs/QABugs_3.cxx
src/Draw/TKQADraw/QABugs/QABugs_9.cxx
src/FoundationClasses/TKMath/gp/gp.hxx
src/FoundationClasses/TKMath/gp/gp_Ax1.hxx
src/FoundationClasses/TKMath/gp/gp_Ax2.hxx
src/FoundationClasses/TKMath/gp/gp_Ax22d.hxx
src/FoundationClasses/TKMath/gp/gp_Ax2d.hxx
src/FoundationClasses/TKMath/gp/gp_Ax3.hxx
src/FoundationClasses/TKMath/gp/gp_Dir.hxx
src/FoundationClasses/TKMath/gp/gp_Dir2d.hxx
src/FoundationClasses/TKMath/gp/gp_GTrsf.hxx
src/FoundationClasses/TKMath/gp/gp_GTrsf2d.hxx
src/FoundationClasses/TKMath/gp/gp_Mat.hxx
src/FoundationClasses/TKMath/gp/gp_Mat2d.hxx
src/FoundationClasses/TKMath/gp/gp_Pnt.hxx
src/FoundationClasses/TKMath/gp/gp_Pnt2d.hxx
src/FoundationClasses/TKMath/gp/gp_Quaternion.hxx
src/FoundationClasses/TKMath/gp/gp_Trsf.hxx
src/FoundationClasses/TKMath/gp/gp_Trsf2d.hxx
src/FoundationClasses/TKMath/gp/gp_Vec.hxx
src/FoundationClasses/TKMath/gp/gp_Vec2d.hxx
src/FoundationClasses/TKMath/gp/gp_XY.hxx
src/FoundationClasses/TKMath/gp/gp_XYZ.hxx
src/ModelingAlgorithms/TKBO/BOPAlgo/BOPAlgo_PaveFiller_6.cxx
src/ModelingAlgorithms/TKBO/BOPTools/BOPTools_AlgoTools.cxx
src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_CompatibleWires.cxx
src/ModelingAlgorithms/TKFeat/LocOpe/LocOpe_SplitShape.cxx
src/ModelingAlgorithms/TKGeomAlgo/ApproxInt/ApproxInt_ImpPrmSvSurfaces.gxx
src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_SectionPlacement.cxx
src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Offset.cxx
src/ModelingAlgorithms/TKOffset/Draft/Draft_Modification.cxx
src/ModelingAlgorithms/TKShHealing/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx
src/ModelingAlgorithms/TKTopAlgo/BRepExtrema/BRepExtrema_DistanceSS.cxx
src/Visualization/TKMeshVS/MeshVS/MeshVS_NodalColorPrsBuilder.cxx
src/Visualization/TKV3d/DsgPrs/DsgPrs_MidPointPresentation.cxx
src/Visualization/TKV3d/DsgPrs/DsgPrs_SymmetricPresentation.cxx
src/Visualization/TKV3d/PrsDim/PrsDim_AngleDimension.cxx