Archived issue #0028263

Coding Rules - clean up definition of the class Graphic3d_MaterialAspect

Open CASCADEOCCT:Codingclosed15 public notes

Search issues

Description

Graphic3d_MaterialAspect has interface issues, the following methods operate with raw string Standard_CString, while class is holding TCollection_AsciiString:
  //! Returns the name of this material
  Standard_EXPORT Standard_CString MaterialName() const;


Other issues:
- Class properties are sorted in sub-optimal order (from memory layout point of view).
- It will be more optimal if most trivial methods (getters) will provide inline implementation in class header.
- myRequestedMaterialName property is not-accessible outside.
- Method ::IsEqual() is currently broken (should be fixed by patch for NCollection_Vec3 in #28180).

Public activity

15 archived notes

Participants are labeled by their role within this record.

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

[revision removed]


Detailed log of new commits:

Author: Author
Date: Thu Dec 29 20:39:28 2016 +0300

    0028263: Coding Rules - clean up definition of the class Graphic3d_MaterialAspect
    
    Fixed uninitialized fields in several classes.
    Body of trivial methods have been moved to class definition (header file).
    Ensure that non-primitive types are returned by reference, when possible.
02Commenter 1
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
03Author
Patch is ready for review.
04Commenter 1
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
05Commenter 5
Branch CR28263 reviewed without remarks, ready for testing.
06Commenter 1
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
07Commenter 7
Branch [archived branch] has been rebased on the current master
08Commenter 8
09Commenter 9
Dear Kirill,

Branch [archived branch] has been rejected due to:
- compilation errors
10Commenter 1
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
11Author
Please check updated patch with fixed misprint.
12Commenter 1
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
13Commenter 13
Branch [archived branch] has been rebased on the current master
14Commenter 14
Dear BugMaster,

Branch CR28263 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: 63
   Windows: 0
   MacOS: 1151

Regressions/Differences:
Not detected

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 93105166 / 92063498 [+1.13%]
Total CPU difference: 21056.440000000253 / 21062.120000000155 [-0.03%]

Testing on Windows:
Total MEMORY difference: 58325545 / 58324216 [+0.00%]
Total CPU difference: 19347.24401999861 / 19152.585972198493 [+1.02%]
15Commenter 1
Branch [archived branch] has been deleted by Author.

[revision removed]