View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0024456 | Open CASCADE | OCCT:Visualization | public | 2013-12-11 17:15 | 2014-05-05 13:37 |
| Reporter | kgv | Assigned To | bugmaster | ||
| Priority | low | Severity | integration request | ||
| Status | closed | Resolution | fixed | ||
| Platform | A | OS | L | ||
| Target Version | 6.7.1 | Fixed in Version | 6.7.1 | ||
| Summary | 0024456: Graphic3d_MaterialAspect - use static assert instead of runtime exception | ||||
| Description | It is suggested to replace runtime check with compile-time check within the following piece of code:
Standard_Integer Graphic3d_MaterialAspect::NumberOfMaterials() {
Standard_Integer n =sizeof(theMaterials)/sizeof(Material);
if( n > Graphic3d_NOM_DEFAULT ) {
cout << " *** Graphic3d_MaterialAspect::NumberOfMaterials() may return a badvalue due to incoherente size between material name array and enum" << endl;
}
return Graphic3d_NOM_DEFAULT;
}
| ||||
| Tags | No tags attached. | ||||
| Test case number | Not needed | ||||
|
|
Dear kgv, The fix has been made in branch CR24456. Please, review. |
|
|
Patch is ready for testing. |
|
|
The assert used in CR24456 is not a static one |
|
|
Dear abv, The fix has been made within branch CR24456_1. Please, review. |
|
|
Dear BugMaster, Branch CR24456_1 (and products from GIT master) was compiled on Linux and Windows platforms and tested. SHA-1: 0282572efc2bf9ab2430339e64446709e7f0d8d3 Number of compiler warnings: occt component : Linux: 103 (103 on master) Windows: 0 (0 on master) products component : Linux: 21 (21 on master) Windows: 8 (8 on master) Regressions/Differences: No regressions/differences Testing cases: Not needed Testing on Linux: Total MEMORY difference: 359088036 / 359777368 Total CPU difference: 43823.73000000012 / 56948.770000000084 Testing on Windows: Total MEMORY difference: 413526316 / 412942520 Total CPU difference: 33900.53125 / 29160.5 There are not differences in images found by testdiff. |
|
occt: master b5eb7166 2013-12-19 10:17:33
Committer: bugmaster Details Diff |
0024456: Graphic3d_MaterialAspect - use static assert instead of runtime exception Graphic3d_MaterialAspect::NumberOfMaterials() : Standard_ASSERT_RAISE instead of run-time check is now used. Replaced with Standard_STATIC_ASSERT |
Affected Issues 0024456 |
|
| mod - src/Graphic3d/Graphic3d_MaterialAspect.cxx | Diff File | ||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2013-12-11 17:15 | kgv | New Issue | |
| 2013-12-11 17:15 | kgv | Assigned To | => omy |
| 2013-12-11 17:15 | kgv | Status | new => assigned |
| 2013-12-11 17:16 | kgv | Summary | Graphic3d_MaterialAspect - use static assert instead of runtime exeption => Graphic3d_MaterialAspect - use static assert instead of runtime exception |
| 2013-12-11 18:39 |
|
Note Added: 0027173 | |
| 2013-12-11 18:39 |
|
Assigned To | omy => kgv |
| 2013-12-11 18:39 |
|
Status | assigned => resolved |
| 2013-12-12 11:30 | kgv | Note Added: 0027182 | |
| 2013-12-12 11:30 | kgv | Assigned To | kgv => bugmaster |
| 2013-12-12 11:30 | kgv | Status | resolved => reviewed |
| 2013-12-12 12:20 |
|
Note Added: 0027183 | |
| 2013-12-12 12:27 | kgv | Assigned To | bugmaster => omy |
| 2013-12-12 12:27 | kgv | Status | reviewed => assigned |
| 2013-12-12 13:13 |
|
Note Added: 0027186 | |
| 2013-12-12 13:13 |
|
Assigned To | omy => abv |
| 2013-12-12 13:13 |
|
Status | assigned => resolved |
| 2013-12-13 08:50 | kgv | Assigned To | abv => bugmaster |
| 2013-12-13 08:50 | kgv | Status | resolved => reviewed |
| 2013-12-13 16:09 | apn | Assigned To | bugmaster => apn |
| 2013-12-16 18:14 | apn | Note Added: 0027225 | |
| 2013-12-16 18:15 | apn | Test case number | => Not needed |
| 2013-12-16 18:15 | apn | Assigned To | apn => bugmaster |
| 2013-12-16 18:15 | apn | Status | reviewed => tested |
| 2013-12-23 13:05 | bugmaster | Changeset attached | => occt master b5eb7166 |
| 2013-12-23 13:05 | bugmaster | Status | tested => verified |
| 2013-12-23 13:05 | bugmaster | Resolution | open => fixed |
| 2014-05-05 13:36 |
|
Status | verified => closed |
| 2014-05-05 13:37 |
|
Fixed in Version | => 6.7.1 |