View Issue Details

IDProjectCategoryView StatusLast Update
0025765Open CASCADEOCCT:Codingpublic2016-12-29 23:19
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityintegration request 
Status closedResolutionfixed 
Target Version6.9.0Fixed in Version6.9.0 
Summary0025765: Coding rules - clean up code from obsolete macro checks
DescriptionCode of many packages, especially in Visualization domain (AIS, Prs3d, V3d), is bloated with macro checks GER61351, BUC60688, IMP160701, ALE70590, CTS17340, CSR577, PRO8619 and many others. Code looks like this:
#define PRO8619   //GG_160697
...
Standard_Real Units::ToSI(const Standard_Real aData,
                          const Standard_CString aUnit,
                          Handle(Units_Dimensions) &dim)
{
...
  dim = lastdimension;
#ifdef PRO8619
  return (aData + lastmove) * lastvalue;
#else
  return aData * lastvalue;
#endif


Unused code paths (including definition of these macros and meaningless comments) should be eliminated.
TagsNo tags attached.
Test case numberNot needed

Relationships

related to 0025859 assignedgka Open CASCADE Coding Rules - Macro TRANSLOG should be handled 

Activities

git

2015-02-11 18:09

administrator   ~0037372

Branch CR25765 has been created by apn.

SHA-1: 21c40215573a17c619b6b685bb7282df082074b1


Detailed log of new commits:

Author: apn
Date: Wed Feb 11 18:09:16 2015 +0300

    0025765: Coding rules - clean up code from obsolete macro checks
    
    Unused code paths (including definition of these macros and meaningless comments) were eliminated.

git

2015-02-24 12:29

administrator   ~0037806

Branch CR25765 has been updated by apn.

SHA-1: 807b6a99e91ebe3a7bdc1fc9753edd44a9fc801f


Detailed log of new commits:

Author: apn
Date: Tue Feb 24 12:28:49 2015 +0300

    Removed comments from cdl

git

2015-02-24 15:54

administrator   ~0037823

Branch CR25765 has been updated by apn.

SHA-1: beebc41ad6382485189c0bba3edc6ecd03d6677d


Detailed log of new commits:

Author: apn
Date: Tue Feb 24 15:54:37 2015 +0300

    Fixed compilation error.

apn

2015-02-24 15:55

administrator   ~0037824

Please review CR25765.

kgv

2015-02-24 16:28

developer   ~0037827

Last edited: 2015-02-24 16:29

Dear apn,

-#define XTRACE
-#define XDESTROY

these macros (XTRACE -> TRACE, XDESTROY -> DESTROY) have been removed partially - they still occur in the code (e.g. by "#ifdef TRACE").
Please remove all related code blocks within files with removed XTRACE/XDESTROY.

The following macros have different nature and should be handled in another way:
-#define TRANSLOG

please revert modifications in the file STEPControl_ActorRead.cxx, dedicated issue should be created for this case.

-#define NEGATIVE_POFFSET

Please don't touch the dead code - revert changes in NIS_TriangulatedDrawer.cxx.

-#ifdef MgtBRepSpeedDownCast

this code looks suspicious and should be analyzed - please revert changes in the file MgtPoly.cxx.

#ifdef VARIANT1

this code looks suspicious and should be analyzed - please revert changes in the file ChFi3d_Builder_C1.cxx.

git

2015-02-24 19:17

administrator   ~0037835

Branch CR25765 has been updated by apn.

SHA-1: 4da0910687e86eb2de5a2f4f6716a54c89ca1200


Detailed log of new commits:

Author: apn
Date: Tue Feb 24 19:17:21 2015 +0300

    Removed with XTRACE/XDESTROY. Revert modifications in in files.

apn

2015-02-24 19:22

administrator   ~0037836

Remarks were applied. Please review CR25765.

git

2015-02-24 19:29

administrator   ~0037837

Branch CR25765_1 has been created by kgv.

SHA-1: 5b3e8e6ddf97bff0ea7760d5ef3bdc026b9c2773


Detailed log of new commits:

Author: apn
Date: Tue Feb 24 19:27:20 2015 +0300

    0025765: Coding rules - clean up code from obsolete macro checks
    
    Unused code paths (including definition of these macros and meaningless comments) were eliminated.

kgv

2015-02-24 19:29

developer   ~0037838

Please test the patch in branch CR25765_1.

git

2015-02-25 14:11

administrator   ~0037856

Branch CR25765_1 has been updated forcibly by mkv.

SHA-1: 529de5381173868b645c7c3925a452348f212719

mkv

2015-02-26 15:03

tester   ~0037924

Dear BugMaster,
Branch CR25765_1 was rebased on current master of occt git-repository.

mkv

2015-02-26 15:04

tester   ~0037925

Dear BugMaster,
Branch CR25765_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 529de5381173868b645c7c3925a452348f212719

Number of compiler warnings:

occt component :
Linux: 18 (18 on master)
Windows: 2 (2 on master)

products component :
Linux: 11 (11 on master)
Windows: 4 (4 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 90394807 / 91650774
Total CPU difference: 55369.60000000002 / 53741.12000000005
products component :
Total MEMORY difference: 22076773 / 22087503
Total CPU difference: 15228.299999999976 / 14930.379999999976

Testing on Windows:
occt component :
Total MEMORY difference: 53071141 / 53074258
Total CPU difference: 32374.4375 / 33888.703125
products component :

There are no differences in images found by testdiff.

git

2015-03-18 13:37

administrator   ~0038579

Branch CR25765 has been deleted by inv.

SHA-1: 4da0910687e86eb2de5a2f4f6716a54c89ca1200

git

2015-03-18 13:37

administrator   ~0038580

Branch CR25765_1 has been deleted by inv.

SHA-1: 529de5381173868b645c7c3925a452348f212719

Related Changesets

occt: master d2094e11

2015-02-24 16:27:20

apn


Committer: bugmaster Details Diff
0025765: Coding rules - clean up code from obsolete macro checks

Unused code paths (including definition of these macros and meaningless comments) were eliminated.
Affected Issues
0025765
mod - src/AIS/AIS_Axis.cdl Diff File
mod - src/AIS/AIS_Axis.cxx Diff File
mod - src/AIS/AIS_Chamf2dDimension.cxx Diff File
mod - src/AIS/AIS_Chamf3dDimension.cxx Diff File
mod - src/AIS/AIS_Circle.cdl Diff File
mod - src/AIS/AIS_Circle.cxx Diff File
mod - src/AIS/AIS_EqualRadiusRelation.cxx Diff File
mod - src/AIS/AIS_FixRelation.cxx Diff File
mod - src/AIS/AIS_GraphicTool.cdl Diff File
mod - src/AIS/AIS_GraphicTool.cxx Diff File
mod - src/AIS/AIS_InteractiveContext.cdl Diff File
mod - src/AIS/AIS_InteractiveContext_1.cxx Diff File
mod - src/AIS/AIS_InteractiveContext_2.cxx Diff File
mod - src/AIS/AIS_InteractiveObject.cdl Diff File
mod - src/AIS/AIS_InteractiveObject.cxx Diff File
mod - src/AIS/AIS_InteractiveObject.lxx Diff File
mod - src/AIS/AIS_Line.cdl Diff File
mod - src/AIS/AIS_Line.cxx Diff File
mod - src/AIS/AIS_LocalContext.cdl Diff File
mod - src/AIS/AIS_LocalContext.cxx Diff File
mod - src/AIS/AIS_LocalContext_1.cxx Diff File
mod - src/AIS/AIS_MaxRadiusDimension.cxx Diff File
mod - src/AIS/AIS_MinRadiusDimension.cxx Diff File
mod - src/AIS/AIS_ParallelRelation.cxx Diff File
mod - src/AIS/AIS_Plane.cdl Diff File
mod - src/AIS/AIS_Plane.cxx Diff File
mod - src/AIS/AIS_PlaneTrihedron.cdl Diff File
mod - src/AIS/AIS_PlaneTrihedron.cxx Diff File
mod - src/AIS/AIS_PlaneTrihedron.lxx Diff File
mod - src/AIS/AIS_Point.cdl Diff File
mod - src/AIS/AIS_Point.cxx Diff File
mod - src/AIS/AIS_Relation.cdl Diff File
mod - src/AIS/AIS_Relation.cxx Diff File
mod - src/AIS/AIS_Relation.lxx Diff File
mod - src/AIS/AIS_Selection.cxx Diff File
mod - src/AIS/AIS_Shape.cdl Diff File
mod - src/AIS/AIS_SymmetricRelation.cxx Diff File
mod - src/AIS/AIS_Trihedron.cdl Diff File
mod - src/AIS/AIS_Trihedron.cxx Diff File
mod - src/Aspect/Aspect_AspectFillArea.cxx Diff File
mod - src/Aspect/Aspect_CircularGrid.cxx Diff File
mod - src/Aspect/Aspect_Grid.cdl Diff File
mod - src/Aspect/Aspect_Grid.cxx Diff File
mod - src/Aspect/Aspect_RectangularGrid.cxx Diff File
mod - src/ChFi2d/ChFi2d_Builder.cxx Diff File
mod - src/DBC/DBC_VArray.gxx Diff File
mod - src/FSD/FSD_CmpFile.cxx Diff File
mod - src/GeomFill/GeomFill_SweepSectionGenerator.cxx Diff File
mod - src/Graphic3d/Graphic3d.cdl Diff File
mod - src/Graphic3d/Graphic3d_DataStructureManager.cxx Diff File
mod - src/Graphic3d/Graphic3d_MaterialAspect.cdl Diff File
mod - src/Graphic3d/Graphic3d_StructureManager.cxx Diff File
mod - src/HLRBRep/HLRBRep_Data.cxx Diff File
mod - src/IFGraph/IFGraph_SCRoots.cxx Diff File
mod - src/IFGraph/IFGraph_StrongComponants.cxx Diff File
mod - src/MDataStd/MDataStd_NameRetrievalDriver.cxx Diff File
mod - src/MDataStd/MDataStd_NameStorageDriver.cxx Diff File
mod - src/MgtBRep/MgtBRep_TranslateTool.cxx Diff File
mod - src/MgtPoly/MgtPoly.cxx Diff File
mod - src/OSD/OSD_File.cxx Diff File
mod - src/Prs3d/Prs3d_ArrowAspect.cdl Diff File
mod - src/Prs3d/Prs3d_ArrowAspect.cxx Diff File
mod - src/Prs3d/Prs3d_IsoAspect.cdl Diff File
mod - src/Prs3d/Prs3d_IsoAspect.cxx Diff File
mod - src/Prs3d/Prs3d_LineAspect.cdl Diff File
mod - src/Prs3d/Prs3d_LineAspect.cxx Diff File
mod - src/Prs3d/Prs3d_PointAspect.cdl Diff File
mod - src/Prs3d/Prs3d_PointAspect.cxx Diff File
mod - src/Prs3d/Prs3d_Presentation.cdl Diff File
mod - src/Prs3d/Prs3d_Presentation.cxx Diff File
mod - src/Prs3d/Prs3d_ShadingAspect.cdl Diff File
mod - src/Prs3d/Prs3d_TextAspect.cdl Diff File
mod - src/Prs3d/Prs3d_TextAspect.cxx Diff File
mod - src/PrsMgr/PrsMgr_PresentableObject.cdl Diff File
mod - src/Quantity/Quantity_Color.cxx Diff File
mod - src/Resource/Resource_Shiftjis.h Diff File
mod - src/Select3D/Select3D_SensitiveTriangulation.cxx Diff File
mod - src/SelectMgr/SelectMgr_ViewerSelector.lxx Diff File
mod - src/Standard/Standard_GUID.cxx Diff File
mod - src/StdPrs/StdPrs_Curve.cxx Diff File
mod - src/StdPrs/StdPrs_DeflectionCurve.cxx Diff File
mod - src/StdPrs/StdPrs_ShadedSurface.cxx Diff File
mod - src/StdPrs/StdPrs_ToolRFace.cxx Diff File
mod - src/StdSelect/StdSelect_BRepOwner.cxx Diff File
mod - src/StdSelect/StdSelect_FaceFilter.cxx Diff File
mod - src/TDataStd/TDataStd_IntegerArray.cxx Diff File
mod - src/TDataStd/TDataStd_RealArray.cxx Diff File
mod - src/TDataStd/TDataStd_Relation.cxx Diff File
mod - src/TDataStd/TDataStd_TreeNode.cxx Diff File
mod - src/TDataXtd/TDataXtd_Axis.cxx Diff File
mod - src/TDataXtd/TDataXtd_Plane.cxx Diff File
mod - src/TDataXtd/TDataXtd_Point.cxx Diff File
mod - src/TDataXtd/TDataXtd_Shape.cxx Diff File
mod - src/TDF/TDF_Attribute.cxx Diff File
mod - src/TDF/TDF_CopyLabel.cxx Diff File
mod - src/TDF/TDF_Data.cxx Diff File
mod - src/TDocStd/TDocStd_Application.cxx Diff File
mod - src/TDocStd/TDocStd_Document.cxx Diff File
mod - src/TNaming/TNaming_Localizer.cxx Diff File
mod - src/TNaming/TNaming_Name.cxx Diff File
mod - src/TNaming/TNaming_NamedShape.cxx Diff File
mod - src/TNaming/TNaming_Naming.cxx Diff File
mod - src/TNaming/TNaming_Selector.cxx Diff File
mod - src/TNaming/TNaming_ShapesSet.cxx Diff File
mod - src/TNaming/TNaming_Tool.cxx Diff File
mod - src/TNaming/TNaming_UsedShapes.cxx Diff File
mod - src/TPrsStd/TPrsStd_AISPresentation.cxx Diff File
mod - src/TPrsStd/TPrsStd_ConstraintTools.cxx Diff File
mod - src/Units/Units.cxx Diff File
mod - src/Units/Units_ShiftedToken.cxx Diff File
mod - src/Units/Units_Token.cxx Diff File
mod - src/Units/Units_UnitsSystem.cxx Diff File
mod - src/V3d/V3d_CircularGrid.cdl Diff File
mod - src/V3d/V3d_CircularGrid.cxx Diff File
mod - src/V3d/V3d_Light.cdl Diff File
mod - src/V3d/V3d_Light.cxx Diff File
mod - src/V3d/V3d_RectangularGrid.cdl Diff File
mod - src/V3d/V3d_RectangularGrid.cxx Diff File
mod - src/V3d/V3d_View.cdl Diff File
mod - src/V3d/V3d_View.cxx Diff File
mod - src/V3d/V3d_Viewer.cdl Diff File
mod - src/V3d/V3d_Viewer_3.cxx Diff File
mod - src/V3d/V3d_View_2.cxx Diff File
mod - src/Visual3d/Visual3d.cdl Diff File
mod - src/Visual3d/Visual3d_ContextView.cxx Diff File
mod - src/Visual3d/Visual3d_View.cdl Diff File
mod - src/Visual3d/Visual3d_ViewManager.cxx Diff File
mod - src/XmlMDataStd/XmlMDataStd_NamedDataDriver.cxx Diff File
mod - src/XmlMDataStd/XmlMDataStd_RealDriver.cxx Diff File
mod - src/XmlMPrsStd/XmlMPrsStd_AISPresentationDriver.cxx Diff File

Issue History

Date Modified Username Field Change
2015-01-29 16:59 kgv New Issue
2015-01-29 16:59 kgv Assigned To => kgv
2015-01-29 17:00 kgv Assigned To kgv => apn
2015-01-29 17:00 kgv Status new => assigned
2015-02-11 18:09 git Note Added: 0037372
2015-02-24 12:29 git Note Added: 0037806
2015-02-24 15:54 git Note Added: 0037823
2015-02-24 15:55 apn Note Added: 0037824
2015-02-24 15:55 apn Test case number => Not needed
2015-02-24 15:55 apn Assigned To apn => kgv
2015-02-24 15:55 apn Status assigned => resolved
2015-02-24 16:28 kgv Note Added: 0037827
2015-02-24 16:28 kgv Assigned To kgv => apn
2015-02-24 16:28 kgv Status resolved => assigned
2015-02-24 16:29 kgv Note Edited: 0037827
2015-02-24 19:17 git Note Added: 0037835
2015-02-24 19:21 apn Relationship added related to 0025859
2015-02-24 19:22 apn Note Added: 0037836
2015-02-24 19:22 apn Assigned To apn => kgv
2015-02-24 19:22 apn Status assigned => resolved
2015-02-24 19:29 git Note Added: 0037837
2015-02-24 19:29 kgv Note Added: 0037838
2015-02-24 19:29 kgv Assigned To kgv => bugmaster
2015-02-24 19:29 kgv Status resolved => reviewed
2015-02-25 13:39 mkv Assigned To bugmaster => mkv
2015-02-25 14:11 git Note Added: 0037856
2015-02-26 15:03 mkv Note Added: 0037924
2015-02-26 15:04 mkv Note Added: 0037925
2015-02-26 15:04 mkv Assigned To mkv => bugmaster
2015-02-26 15:04 mkv Status reviewed => tested
2015-03-06 15:13 bugmaster Changeset attached => occt master d2094e11
2015-03-06 15:13 bugmaster Status tested => verified
2015-03-06 15:13 bugmaster Resolution open => fixed
2015-03-18 13:37 git Note Added: 0038579
2015-03-18 13:37 git Note Added: 0038580
2015-05-14 15:29 aiv Status verified => closed
2015-05-14 15:32 aiv Fixed in Version => 6.9.0