View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0025617 | Open CASCADE | OCCT:Coding | public | 2014-12-16 17:35 | 2016-04-20 15:48 |
Reporter | Assigned To | kgv | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 6.7.0 | ||||
Target Version | 7.0.0 | Fixed in Version | 7.0.0 | ||
Summary | 0025617: Avoid classes with a copy constructor and the default destructor or assignment operator | ||||
Description | If you need a copy constructor, you also need a destructor and 'operator='. If you need a copy constructor, it's because you need something like a deep copy, or some other management of resources. Thus it is almost certain that you will need a destructor and assignment operator. | ||||
Steps To Reproduce | not applicable | ||||
Additional information and documentation updates | According to the CAST report in most cases the problem is associated to DEFINE_STANDARD_HANDLECLASS. It is necessary to add empty virtual destructor in DEFINE_STANDARD_HANDLECLASS macros to avoid this problem. The following classes contain a problem: - Graphic3d_Vertex - LDOM_Attr - LDOM_CDATASection - LDOM_Comment - LDOM_Element - LDOM_Text - LDOMString - NCollection_Mat4 - NCollection_StdAllocator - NCollection_Vec2 - NCollection_Vec3 - NCollection_Vec4 - BOPCol_NCVector - NCollection_BaseVector (::Iterator) - NCollection_StdAllocator (assignment operator) - NCollection_Vector - Prs3d_DimensionUnits - VrmlData_DataMapOfShapeAppearance | ||||
Tags | No tags attached. | ||||
Test case number | |||||
occt: master 9533a866 2014-12-17 08:17:28
Committer: kgv Details Diff |
0025617: Avoid classes with a copy constructor and the default destructor or assignment operator Removed useless user-defined copy constructors and assignment operators in BOPCol_NCVector, NCollection_Mat4, NCollection_Vec* User-defined assignment operator matching copy constructor added in NCollection_StdAllocator. Class VrmlData_DataMapOfShapeAppearance redefined as simple typedef to NCollection_DataMap<>. |
Affected Issues 0025617 |
|
mod - src/BOPCol/BOPCol_NCVector.hxx | Diff File | ||
mod - src/NCollection/NCollection_Mat4.hxx | Diff File | ||
mod - src/NCollection/NCollection_StdAllocator.hxx | Diff File | ||
mod - src/NCollection/NCollection_Vec2.hxx | Diff File | ||
mod - src/NCollection/NCollection_Vec3.hxx | Diff File | ||
mod - src/NCollection/NCollection_Vec4.hxx | Diff File | ||
mod - src/VrmlData/VrmlData_DataMapOfShapeAppearance.hxx | Diff File | ||
mod - src/VrmlData/VrmlData_Group.hxx | Diff File | ||
mod - src/VrmlData/VrmlData_Scene.hxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-12-16 17:35 |
|
New Issue | |
2014-12-16 17:35 |
|
Assigned To | => kgv |
2014-12-16 17:38 |
|
Assigned To | kgv => azn |
2014-12-18 15:28 |
|
Relationship added | related to 0025618 |
2014-12-18 15:31 |
|
Note Added: 0035480 | |
2014-12-18 15:31 |
|
Assigned To | azn => kgv |
2014-12-18 15:31 |
|
Status | new => resolved |
2014-12-18 15:31 |
|
Steps to Reproduce Updated | |
2014-12-18 15:31 |
|
Relationship added | related to 0025571 |
2014-12-18 15:36 |
|
Assigned To | kgv => azn |
2014-12-18 15:37 |
|
Assigned To | azn => abv |
2015-04-21 06:08 |
|
Target Version | 6.9.0 => 7.1.0 |
2015-09-28 12:58 | kgv | Changeset attached | => occt master 9533a866 |
2015-09-28 12:58 | kgv | Assigned To | abv => kgv |
2015-09-28 12:58 | kgv | Status | resolved => verified |
2015-09-28 12:58 | kgv | Resolution | open => fixed |
2015-09-29 08:55 |
|
Target Version | 7.1.0 => 7.0.0 |
2016-04-20 15:44 |
|
Fixed in Version | => 7.0.0 |
2016-04-20 15:48 |
|
Status | verified => closed |