Skip to content

Coding - ApplicationFramework module improvements and GTest coverage#1144

Draft
dpasukhi wants to merge 4 commits intoOpen-Cascade-SAS:IRfrom
dpasukhi:some_optimization
Draft

Coding - ApplicationFramework module improvements and GTest coverage#1144
dpasukhi wants to merge 4 commits intoOpen-Cascade-SAS:IRfrom
dpasukhi:some_optimization

Conversation

@dpasukhi
Copy link
Copy Markdown
Member

@dpasukhi dpasukhi commented Mar 6, 2026

Algorithmic improvements:

  • CDM_Document: Replace NCollection_List with NCollection_DataMap for myToReferences providing O(1) lookup by reference identifier instead of O(n) linear scan. Keep myFromReferences as List (non-unique keys).
  • CDM_Document: Add cycle detection to DeepReferences() via visited set in private deepReferences() helper method.
  • CDM_Document: Fix ShallowReferences/DeepReferences to iterate myToReferences (outgoing) instead of myFromReferences (incoming).
  • TDF_Data: Optimize FixOrder() from two-pass to single-pass partition.

Template deduplication:

  • TDataStd: Introduce TDataStd_DeltaOnModificationOfArray.hxx template helper with ComputeDelta/ApplyDelta methods, reducing ~840 lines of near-identical code across 4 delta array classes to shared template.

Code consolidation:

  • TNaming: Extract shared MakeShape(), ApplyOrientation(), IsForbidden() into TNaming namespace, eliminating duplicate static functions across TNaming_Tool.cxx, TNaming_NamingTool.cxx, and TNaming_Name.cxx.

C++ modernization (165 files):

  • Replace C-style casts with appropriate modern casts (static_cast, reinterpret_cast, const_cast) across BinMDataStd, BinMFunction, BinLDrivers, XmlMDataStd, XmlObjMgt, TNaming, TDF drivers.
  • Remove redundant casts on NCollection_LocalArray (already has operator T*()) and NCollection_Array1 (non-const access).
  • Replace NCollection_LocalArray C-style casts with static_cast for LDOMString construction (two implicit conversions needed).
  • Replace old TopExp_Explorer::Init() patterns with modern constructor style in TPrsStd_ConstraintTools, TNaming_Naming, TNaming_Name.
  • Replace strcpy/strlen with TCollection_AsciiString in TNaming_Selector debug code.
  • Modernize method separators from old 3-line guards (// function: / // purpose:) to single-line modern style across ~90 files.

GTest coverage (57 new tests):

  • CDM_Document_Test: 15 tests for reference management, cycle detection, document modifications.
  • TDF_Data_Test: 6 tests for transactions, undo/redo, abort.
  • TDataStd_DeltaOnModificationOfArray_Test: 5 tests for array delta modification and undo correctness.
  • TNaming_NamedShape_Test: Tests for TNaming_Builder, TNaming_Iterator, TNaming_NamedShape evolution chain operations.
  • TObj_Model_Test: 40 tests for TObj_Model and TObj_Object lifecycle, naming, flags, ordering, iteration, and serialization.

Algorithmic improvements:
- CDM_Document: Replace NCollection_List with NCollection_DataMap for
  myToReferences providing O(1) lookup by reference identifier instead
  of O(n) linear scan. Keep myFromReferences as List (non-unique keys).
- CDM_Document: Add cycle detection to DeepReferences() via visited set
  in private deepReferences() helper method.
- CDM_Document: Fix ShallowReferences/DeepReferences to iterate
  myToReferences (outgoing) instead of myFromReferences (incoming).
- TDF_Data: Optimize FixOrder() from two-pass to single-pass partition.

Template deduplication:
- TDataStd: Introduce TDataStd_DeltaOnModificationOfArray.hxx template
  helper with ComputeDelta/ApplyDelta methods, reducing ~840 lines of
  near-identical code across 4 delta array classes to shared template.

Code consolidation:
- TNaming: Extract shared MakeShape(), ApplyOrientation(), IsForbidden()
  into TNaming namespace, eliminating duplicate static functions across
  TNaming_Tool.cxx, TNaming_NamingTool.cxx, and TNaming_Name.cxx.

C++ modernization (165 files):
- Replace C-style casts with appropriate modern casts (static_cast,
  reinterpret_cast, const_cast) across BinMDataStd, BinMFunction,
  BinLDrivers, XmlMDataStd, XmlObjMgt, TNaming, TDF drivers.
- Remove redundant casts on NCollection_LocalArray (already has
  operator T*()) and NCollection_Array1 (non-const access).
- Replace NCollection_LocalArray C-style casts with static_cast for
  LDOMString construction (two implicit conversions needed).
- Replace old TopExp_Explorer::Init() patterns with modern constructor
  style in TPrsStd_ConstraintTools, TNaming_Naming, TNaming_Name.
- Replace strcpy/strlen with TCollection_AsciiString in
  TNaming_Selector debug code.
- Modernize method separators from old 3-line guards (// function: /
  // purpose:) to single-line modern style across ~90 files.

GTest coverage (57 new tests):
- CDM_Document_Test: 15 tests for reference management, cycle
  detection, document modifications.
- TDF_Data_Test: 6 tests for transactions, undo/redo, abort.
- TDataStd_DeltaOnModificationOfArray_Test: 5 tests for array delta
  modification and undo correctness.
- TNaming_NamedShape_Test: Tests for TNaming_Builder, TNaming_Iterator,
  TNaming_NamedShape evolution chain operations.
- TObj_Model_Test: 40 tests for TObj_Model and TObj_Object lifecycle,
  naming, flags, ordering, iteration, and serialization.
dpasukhi added 2 commits March 6, 2026 08:13
- Added detailed comments for naming resolution functions in TNaming_Name and TNaming_Naming.
- Introduced IsReferenceTarget method in CDM_Document for better reference checking.
- Updated CDM_Document_Test to ensure shallow and deep references do not trigger retrieval.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes and improves the OCCT ApplicationFramework stack by refactoring/documenting many drivers, optimizing core data-structure operations (references, deltas, ordering), consolidating duplicated TNaming logic, and adding substantial new GTest coverage to reduce regression risk.

Changes:

  • Performance/algorithm updates in core document/data logic (e.g., reference lookup/cycle detection, delta ordering, FixOrder partitioning).
  • Large-scale C++ modernization (cast cleanup, TopExp_Explorer constructor usage, modern method separators) across XML/BIN drivers and framework code.
  • New shared template helper(s) and expanded GTest suites (TKCDF/TKLCAF/TKTObj/TKCAF).

Reviewed changes

Copilot reviewed 165 out of 165 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/ApplicationFramework/TKXmlTObj/XmlTObjDrivers/XmlTObjDrivers_XYZDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKXmlTObj/XmlTObjDrivers/XmlTObjDrivers_ReferenceDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKXmlTObj/XmlTObjDrivers/XmlTObjDrivers_ObjectDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKXmlTObj/XmlTObjDrivers/XmlTObjDrivers_ModelDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKXmlTObj/XmlTObjDrivers/XmlTObjDrivers_IntSparseArrayDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKXmlL/XmlObjMgt/XmlObjMgt_SRelocationTable.cxx Modernizes method separators.
src/ApplicationFramework/TKXmlL/XmlObjMgt/XmlObjMgt_RRelocationTable.cxx Modernizes method separators.
src/ApplicationFramework/TKXmlL/XmlObjMgt/XmlObjMgt_Persistent.cxx Modernizes method separators.
src/ApplicationFramework/TKXmlL/XmlObjMgt/XmlObjMgt_Array1.cxx Modernizes method separators.
src/ApplicationFramework/TKXmlL/XmlObjMgt/XmlObjMgt.cxx Modernizes separators and updates casts/string handling.
src/ApplicationFramework/TKXmlL/XmlMFunction/XmlMFunction_ScopeDriver.cxx Updates DOM element casts during XML retrieval.
src/ApplicationFramework/TKXmlL/XmlMDocStd/XmlMDocStd_XLinkDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKXmlL/XmlMDataStd/XmlMDataStd_TreeNodeDriver.cxx Replaces C-style cast for attribute value storage.
src/ApplicationFramework/TKXmlL/XmlMDataStd/XmlMDataStd_ReferenceListDriver.cxx Modernizes separators and DOM element casts.
src/ApplicationFramework/TKXmlL/XmlMDataStd/XmlMDataStd_ReferenceArrayDriver.cxx Modernizes separators and DOM element casts.
src/ApplicationFramework/TKXmlL/XmlMDataStd/XmlMDataStd_RealListDriver.cxx Modernizes separators and string buffer casts.
src/ApplicationFramework/TKXmlL/XmlMDataStd/XmlMDataStd_RealDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKXmlL/XmlMDataStd/XmlMDataStd_RealArrayDriver.cxx Modernizes separators and string buffer casts.
src/ApplicationFramework/TKXmlL/XmlMDataStd/XmlMDataStd_IntegerListDriver.cxx Modernizes separators and string buffer casts.
src/ApplicationFramework/TKXmlL/XmlMDataStd/XmlMDataStd_IntegerDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKXmlL/XmlMDataStd/XmlMDataStd_IntegerArrayDriver.cxx Modernizes separators and string buffer casts.
src/ApplicationFramework/TKXmlL/XmlMDataStd/XmlMDataStd_IntPackedMapDriver.cxx Modernizes separators and string buffer casts.
src/ApplicationFramework/TKXmlL/XmlMDataStd/XmlMDataStd_ExtStringListDriver.cxx Modernizes separators and DOM element casts.
src/ApplicationFramework/TKXmlL/XmlMDataStd/XmlMDataStd_ExtStringArrayDriver.cxx Modernizes separators and DOM element casts.
src/ApplicationFramework/TKXmlL/XmlMDataStd/XmlMDataStd_ExpressionDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKXmlL/XmlMDataStd/XmlMDataStd_ByteArrayDriver.cxx Modernizes separators and string buffer casts.
src/ApplicationFramework/TKXmlL/XmlMDataStd/XmlMDataStd_BooleanListDriver.cxx Modernizes separators and string buffer casts.
src/ApplicationFramework/TKXmlL/XmlMDataStd/XmlMDataStd_BooleanArrayDriver.cxx Modernizes separators and string buffer casts.
src/ApplicationFramework/TKXmlL/XmlMDF/XmlMDF_TagSourceDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKXmlL/XmlMDF/XmlMDF_ReferenceDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKXmlL/XmlMDF/XmlMDF_ADriver.cxx Modernizes method separators.
src/ApplicationFramework/TKXmlL/XmlMDF/XmlMDF.cxx Modernizes method separators.
src/ApplicationFramework/TKXml/XmlMNaming/XmlMNaming_NamingDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKXml/XmlMNaming/XmlMNaming_NamedShapeDriver.cxx Modernizes separators and updates string casts.
src/ApplicationFramework/TKXml/XmlMDataXtd/XmlMDataXtd_TriangulationDriver.cxx Modernizes separators and updates string casts.
src/ApplicationFramework/TKXml/XmlMDataXtd/XmlMDataXtd_PresentationDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKXml/XmlMDataXtd/XmlMDataXtd_PositionDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKXml/XmlMDataXtd/XmlMDataXtd_ConstraintDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKXml/XmlMDataXtd/XmlMDataXtd.cxx Modernizes method separators.
src/ApplicationFramework/TKVCAF/TPrsStd/TPrsStd_DriverTable.cxx Modernizes method separators.
src/ApplicationFramework/TKVCAF/TPrsStd/TPrsStd_ConstraintTools.cxx Updates TopExp_Explorer usage and separators.
src/ApplicationFramework/TKVCAF/TPrsStd/TPrsStd_AISPresentation.cxx Modernizes method separators.
src/ApplicationFramework/TKTObj/GTests/FILES.cmake Registers new TKTObj GTest source(s).
src/ApplicationFramework/TKStd/StdPersistent/StdPersistent_TopLoc.cxx Modernizes method separators.
src/ApplicationFramework/TKStd/StdPersistent/StdPersistent_PPrsStd.cxx Modernizes method separators.
src/ApplicationFramework/TKStd/StdPersistent/StdPersistent_Naming.cxx Modernizes method separators.
src/ApplicationFramework/TKStd/StdPersistent/StdPersistent_DataXtd_PatternStd.cxx Modernizes method separators.
src/ApplicationFramework/TKStd/StdPersistent/StdPersistent_DataXtd_Constraint.cxx Modernizes method separators.
src/ApplicationFramework/TKStd/StdPersistent/StdPersistent_DataXtd.cxx Modernizes method separators.
src/ApplicationFramework/TKStd/StdObject/StdObject_Shape.cxx Modernizes method separators.
src/ApplicationFramework/TKStd/StdObject/StdObject_Location.cxx Modernizes method separators.
src/ApplicationFramework/TKStd/StdDrivers/StdDrivers.cxx Modernizes method separators.
src/ApplicationFramework/TKStd/ShapePersistent/ShapePersistent_TopoDS.cxx Modernizes method separators.
src/ApplicationFramework/TKStd/ShapePersistent/ShapePersistent_Geom.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TFunction/TFunction_Scope.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TFunction/TFunction_Logbook.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TFunction/TFunction_Iterator.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TFunction/TFunction_IFunction.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TFunction/TFunction_GraphNode.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TFunction/TFunction_Function.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TFunction/TFunction_DriverTable.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TFunction/TFunction_Driver.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDocStd/TDocStd_Document.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDataStd/TDataStd_ReferenceList.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDataStd/TDataStd_ReferenceArray.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDataStd/TDataStd_RealList.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDataStd/TDataStd_RealArray.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDataStd/TDataStd_Real.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDataStd/TDataStd_Name.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDataStd/TDataStd_IntegerList.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDataStd/TDataStd_IntegerArray.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDataStd/TDataStd_Integer.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDataStd/TDataStd_HDataMapOfStringString.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDataStd/TDataStd_HDataMapOfStringReal.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDataStd/TDataStd_HDataMapOfStringInteger.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDataStd/TDataStd_HDataMapOfStringHArray1OfReal.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDataStd/TDataStd_HDataMapOfStringHArray1OfInteger.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDataStd/TDataStd_HDataMapOfStringByte.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDataStd/TDataStd_ExtStringList.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDataStd/TDataStd_ExtStringArray.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDataStd/TDataStd_DeltaOnModificationOfIntArray.cxx Switches to shared delta helper.
src/ApplicationFramework/TKLCAF/TDataStd/TDataStd_DeltaOnModificationOfArray.hxx Adds shared delta compute/apply helper.
src/ApplicationFramework/TKLCAF/TDataStd/TDataStd_ByteArray.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDataStd/TDataStd_BooleanList.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDataStd/TDataStd_BooleanArray.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDataStd/TDataStd_AsciiString.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDataStd/TDataStd.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDataStd/FILES.cmake Registers new shared delta helper header.
src/ApplicationFramework/TKLCAF/TDF/TDF_Transaction.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDF/TDF_Tool.cxx Modernizes separators and cast usage.
src/ApplicationFramework/TKLCAF/TDF/TDF_RelocationTable.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDF/TDF_Reference.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDF/TDF_LabelNode.cxx Modernizes separators and updates cast.
src/ApplicationFramework/TKLCAF/TDF/TDF_Label.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDF/TDF_DerivedAttribute.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDF/TDF_Data.cxx Optimizes FixOrder() ordering pass; modern separators.
src/ApplicationFramework/TKLCAF/TDF/TDF_CopyTool.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDF/TDF_ComparisonTool.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDF/TDF_ClosureTool.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDF/TDF_AttributeIterator.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/TDF/TDF_Attribute.cxx Modernizes method separators.
src/ApplicationFramework/TKLCAF/GTests/TDF_Data_Test.cxx Adds TDF transaction/undo/redo/abort tests.
src/ApplicationFramework/TKLCAF/GTests/FILES.cmake Registers new TKLCAF GTests.
src/ApplicationFramework/TKCDF/GTests/FILES.cmake Registers new TKCDF GTests.
src/ApplicationFramework/TKCDF/CDM/CDM_ReferenceIterator.hxx Updates iterator to DataMap-based references.
src/ApplicationFramework/TKCDF/CDM/CDM_Document.hxx Refactors reference storage and adds cycle-detection helpers.
src/ApplicationFramework/TKCDF/CDM/CDM_Application.cxx Modernizes method separators.
src/ApplicationFramework/TKCAF/TNaming/TNaming_UsedShapes.cxx Modernizes method separators.
src/ApplicationFramework/TKCAF/TNaming/TNaming_Translator.cxx Modernizes method separators.
src/ApplicationFramework/TKCAF/TNaming/TNaming_TranslateTool.cxx Modernizes method separators.
src/ApplicationFramework/TKCAF/TNaming/TNaming_Tool.cxx Deduplicates helper logic via TNaming namespace helpers.
src/ApplicationFramework/TKCAF/TNaming/TNaming_Selector.cxx Replaces unsafe C-string ops with TCollection_AsciiString.
src/ApplicationFramework/TKCAF/TNaming/TNaming_NamingTool.cxx Uses TNaming namespace helpers; modern separators.
src/ApplicationFramework/TKCAF/TNaming/TNaming_NamedShape.cxx Modernizes separators and updates casts.
src/ApplicationFramework/TKCAF/TNaming/TNaming_Name.cxx Modernizes separators and TopExp_Explorer usage; clarifies comments.
src/ApplicationFramework/TKCAF/TNaming/TNaming_Localizer.cxx Modernizes method separators.
src/ApplicationFramework/TKCAF/TNaming/TNaming_Identifier.cxx Modernizes method separators.
src/ApplicationFramework/TKCAF/TNaming/TNaming_CopyShape.cxx Modernizes method separators.
src/ApplicationFramework/TKCAF/TNaming/TNaming.hxx Adds shared TNaming helper declarations.
src/ApplicationFramework/TKCAF/TNaming/TNaming.cxx Implements shared TNaming helper functions.
src/ApplicationFramework/TKCAF/TDataXtd/TDataXtd_Presentation.cxx Modernizes method separators.
src/ApplicationFramework/TKCAF/TDataXtd/TDataXtd.cxx Modernizes method separators.
src/ApplicationFramework/TKCAF/GTests/FILES.cmake Registers new TKCAF GTests.
src/ApplicationFramework/TKBinTObj/BinTObjDrivers/BinTObjDrivers_XYZDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKBinTObj/BinTObjDrivers/BinTObjDrivers_ReferenceDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKBinTObj/BinTObjDrivers/BinTObjDrivers_ObjectDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKBinTObj/BinTObjDrivers/BinTObjDrivers_ModelDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKBinTObj/BinTObjDrivers/BinTObjDrivers_IntSparseArrayDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKBinL/BinObjMgt/BinObjMgt_Position.cxx Replaces C-style cast with reinterpret_cast for stream write.
src/ApplicationFramework/TKBinL/BinMFunction/BinMFunction_ScopeDriver.cxx Removes redundant array-to-pointer cast.
src/ApplicationFramework/TKBinL/BinMFunction/BinMFunction_GraphNodeDriver.cxx Removes redundant array-to-pointer casts.
src/ApplicationFramework/TKBinL/BinMDataStd/BinMDataStd_RealListDriver.cxx Removes redundant array-to-pointer cast.
src/ApplicationFramework/TKBinL/BinMDataStd/BinMDataStd_RealArrayDriver.cxx Updates pointer casts for PutRealArray.
src/ApplicationFramework/TKBinL/BinMDataStd/BinMDataStd_NamedDataDriver.cxx Updates pointer casts for PutInt/RealArray.
src/ApplicationFramework/TKBinL/BinMDataStd/BinMDataStd_IntegerListDriver.cxx Removes redundant array-to-pointer cast.
src/ApplicationFramework/TKBinL/BinMDataStd/BinMDataStd_IntegerArrayDriver.cxx Updates pointer casts for PutIntArray.
src/ApplicationFramework/TKBinL/BinMDataStd/BinMDataStd_ByteArrayDriver.cxx Removes redundant array-to-pointer cast.
src/ApplicationFramework/TKBinL/BinMDataStd/BinMDataStd_BooleanListDriver.cxx Removes redundant array-to-pointer cast.
src/ApplicationFramework/TKBinL/BinMDataStd/BinMDataStd_BooleanArrayDriver.cxx Removes redundant array-to-pointer cast.
src/ApplicationFramework/TKBinL/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx Modernizes casts for stream offsets and binary writes.
src/ApplicationFramework/TKBinL/BinLDrivers/BinLDrivers_DocumentSection.cxx Modernizes stream casts and binary read/write casts.
src/ApplicationFramework/TKBinL/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx Modernizes binary read casts.
src/ApplicationFramework/TKBin/BinMNaming/BinMNaming_NamingDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKBin/BinMNaming/BinMNaming_NamedShapeDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKBin/BinMDataXtd/BinMDataXtd_TriangulationDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKBin/BinMDataXtd/BinMDataXtd_PresentationDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKBin/BinMDataXtd/BinMDataXtd_PositionDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKBin/BinMDataXtd/BinMDataXtd_GeometryDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKBin/BinMDataXtd/BinMDataXtd_ConstraintDriver.cxx Modernizes method separators.
src/ApplicationFramework/TKBin/BinMDataXtd/BinMDataXtd.cxx Modernizes method separators.
src/ApplicationFramework/TKBin/BinDrivers/BinDrivers_DocumentStorageDriver.cxx Modernizes cast for section offset.

Comment on lines +395 to 396
char* cc = const_cast<char*>(anEntry.ToCString());
int n = 0;
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TagList(const TCollection_AsciiString&, ...) casts away const from anEntry.ToCString() even though the function only reads the string. This unnecessary const_cast can be removed by using const char* for the iterator variable.

Copilot uses AI. Check for mistakes.
Comment on lines +359 to +362
// Make all OnRemoval (which will cause addition of the attribute) are in the end
// to not put two attributes with the same GUID at one label during undo/redo.
// Single-pass partition: non-removals go directly to the ordered list,
// removals are collected separately and appended at the end.
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The updated comment grammar in FixOrder() is awkward/unclear (e.g., “Make all OnRemoval ... are in the end” / “to not put ...”). Consider rephrasing to a grammatically correct sentence so future readers clearly understand the ordering constraint.

Copilot uses AI. Check for mistakes.
- Eliminated debug print statements related to repeatability checks in TNaming_Naming.cxx.
- Removed unused debug functions and print statements in TNaming_NamingTool.cxx, TNaming_Selector.cxx, and TNaming_ShapesSet.cxx.
- Cleaned up debug-related code in TDataStd classes and XmlMDataStd_RealDriver.cxx.
- Streamlined FillValidMap function in DNaming_SelectionCommands.cxx by removing debug output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants