DiscussionsIssue archiveOCCT:Foundation Classes

Archived issue #0028470

Foundation Classes, NCollection_Array1 - add Resize() method for re-allocating array with new limits

Open CASCADEOCCT:Foundation Classesclosed13 public notes

Search issues

Description

NCollection_Array1 by design defines array of fixed size - the size that can be specified only within constructor.

In many contexts, this restriction is redundant and inconvenient - it is desirable to provide interface for resizing array to new limits.

Steps to reproduce

N/A

Public activity

13 archived notes

Participants are labeled by their role within this record.

01Commenter 3
Branch [archived branch] has been created by Author.

[revision removed]


Detailed log of new commits:

Author: Author
Date: Fri Feb 17 12:35:13 2017 +0300

    0028470: Foundation Classes, NCollection_Array1 - add Resize() method for re-allocating array with new limits
    
    NCollection_Array1 now provides method Resize() for re-allocating array to new bounds.
    Added Move Constructor and Move Assignment operator.
02Author
Patch is ready for review.
03Commenter 3
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
04Commenter 3
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
05Commenter 5
Reviewed, please test

I have only one doubt: it may be not always necessary to spent efort for copying old data in Resize(), should not we add parameter to make this step conditional?
06Commenter 3
Branch [archived branch] has been updated by Author.

[revision removed]


Detailed log of new commits:

Author: Author
Date: Mon Feb 27 13:02:00 2017 +0300

    NCollection_Array1::Resize() - added argument theToCopyData.
    Added empty constructor for NCollection_Array1.

07Commenter 3
Branch [archived branch] has been created by Author.

[revision removed]


Detailed log of new commits:

Author: Author
Date: Fri Feb 17 12:35:13 2017 +0300

    0028470: Foundation Classes, NCollection_Array1 - add Resize() method for re-allocating array with new limits
    
    NCollection_Array1 now provides method Resize() for re-allocating array to new bounds.
    Added Move Constructor and Move Assignment operator.
    Added empty constructor defining array of zero size.
    
    Poly_Triangulation, dropped duplicating fields myNbNodes and myNbTriangles.
    Removed unused file Poly_Triangulation.lxx.
08Author
Remark has been applied.
09Commenter 9
Dear Commenter 1,

Branch CR28470_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]

Number of compiler warnings:
occt component:
   Linux: 0 (0 on master)
   Windows: 0 (0 on master)
   MasOS: 0 (0 on master)
products component:
   Linux: 66
   Windows: 0
   MacOS: 1199

Regressions/Differences:
Not detected

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 92575991 / 93218501 [-0.69%]
Total CPU difference: 19896.710000000112 / 19801.68000000022 [+0.48%]

Testing on Windows:
Total MEMORY difference: 57828100 / 57829936 [-0.00%]
Total CPU difference: 18679.637740498587 / 18793.846072598604 [-0.61%]
10Commenter 3
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
11Commenter 11
Dear Commenter 1,

Branch CR28470_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]

Number of compiler warnings:
occt component:
   Linux: 0 (0 on master)
   Windows: 0 (0 on master)
   MasOS: 0 (0 on master)
products component:
   Linux: 64
   Windows: 0
   MacOS: 1209

Regressions/Differences:
Not detected

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 92886270 / 92373786 [+0.55%]
Total CPU difference: 20037.9700000003 / 19841.150000000398 [+0.99%]

Testing on Windows:
Total MEMORY difference: 57664094 / 57663643 [+0.00%]
Total CPU difference: 18485.697297298568 / 18635.5206576986 [-0.80%]
12Commenter 3
Branch [archived branch] has been deleted by Participant.

[revision removed]
13Commenter 3
Branch [archived branch] has been deleted by Participant.

[revision removed]

Related records