Archived issue #0028470
Foundation Classes, NCollection_Array1 - add Resize() method for re-allocating array with new limits
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.
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.
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.
[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.
Patch is ready for review.
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
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?
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?
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.
[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.
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.
[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.
Remark has been applied.
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%]
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%]
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
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%]
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%]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Related records
- #0028796 · parent of · closedCoding Rules - fix declaration of Move constructor in NCollection_Array1
- #0029230 · related to · closedFoundation Classes - provide move constructors for basic collections
- #0030478 · related to · closedFoundation Classes, NCollection_Array2 - provide Resize/Move methods consistent to NCollection_Array1