View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0025618 | Open CASCADE | OCCT:Coding | public | 2014-12-16 17:40 | 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 | 0025618: Avoid classes with an assignment operator and not implementing both a destructor and a copy constructor | ||||
Description | If you need an operator= , you also need a destructor and a copy constructor. If you need an assignment operator, 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 override the copy constructor. | ||||
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 have problem: - IntPolyh_StartPoint - Quantity_Color | ||||
Tags | No tags attached. | ||||
Test case number | |||||
occt: master 4dff6a1b 2014-12-17 08:06:13
Committer: kgv Details Diff |
0025618: Avoid classes with an assignment operator and not implementing both a destructor and a copy constructor User-defined assignment operator is removed in the classes IntPolyh_StartPoint and Quantity_Color, as default assignment will be OK |
Affected Issues 0025618 |
|
mod - src/IntPolyh/IntPolyh_StartPoint.cxx | Diff File | ||
mod - src/IntPolyh/IntPolyh_StartPoint.hxx | Diff File | ||
mod - src/Quantity/Quantity_Color.cxx | Diff File | ||
mod - src/Quantity/Quantity_Color.hxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-12-16 17:40 |
|
New Issue | |
2014-12-16 17:40 |
|
Assigned To | => azn |
2014-12-18 15:28 |
|
Relationship added | related to 0025617 |
2014-12-18 15:30 |
|
Note Added: 0035479 | |
2014-12-18 15:30 |
|
Assigned To | azn => abv |
2014-12-18 15:30 |
|
Status | new => resolved |
2014-12-18 15:30 |
|
Steps to Reproduce Updated | |
2014-12-18 15:31 |
|
Relationship added | related to 0025571 |
2015-04-21 06:08 |
|
Target Version | 6.9.0 => 7.1.0 |
2015-09-28 12:58 | kgv | Changeset attached | => occt master 4dff6a1b |
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 |