View Issue Details

IDProjectCategoryView StatusLast Update
0027900Open CASCADEOCCT:Codingpublic2021-01-14 17:08
Reporterkgv Assigned Tokgv  
PrioritynormalSeverityintegration request 
Status closedResolutionfixed 
Target Version7.1.0Fixed in Version7.1.0 
Summary0027900: Coding rules - drop redundant Name parameter from V3d_Viewer constructor
DescriptionV3d_Viewer constructor has a mandatory parameter "theName":
  Standard_EXPORT V3d_Viewer(const Handle(Graphic3d_GraphicDriver)& theDriver, const Standard_ExtString theName, const Standard_CString theDomain = "", const Quantity_Length theViewSize = 1000.0, const V3d_TypeOfOrientation theViewProj = V3d_XposYnegZpos, const Quantity_NameOfColor theViewBackground = Quantity_NOC_GRAY30, const V3d_TypeOfVisualization theVisualization = V3d_ZBUFFER, const V3d_TypeOfShadingModel theShadingModel = V3d_GOURAUD, const V3d_TypeOfUpdate theUpdateMode = V3d_WAIT, const Standard_Boolean theComputedMode = Standard_True, const Standard_Boolean theDefaultComputedMode = Standard_True);

This parameter has confusing definition (Standard_ExtString which can not be easily constructed from normal string) and the value is actually unused (only undocumented method ::NextName() uses myName, but its implementation is broken - method returns the pointer to a local variable).

Therefore, it is proposed removing this parameter.
Steps To ReproduceN/A
TagsNo tags attached.
Test case numberNot needed

Relationships

parent of 0032056 closedbugmaster Open CASCADE Coding Rules - remove package MMgt and other types deprecated since OCCT 7.2.0 
related to 0028186 closedapn Community Foundation Classes, NCollection_List - methods "Remove" and "Contains" prevent template usage 

Activities

git

2016-09-25 19:12

administrator   ~0058123

Branch CR27900 has been created by kgv.

SHA-1: 3f04592fa67f933348145092ccade5017f86eefe


Detailed log of new commits:

Author: kgv
Date: Sun Sep 25 19:09:23 2016 +0300

    0027900: Coding rules - drop redundant Name parameter from V3d_Viewer constructor
    
    Removed unused methods AIS_InteractiveContext::DomainOfMainViewer(),
    V3d_Viewer::NextName(), V3d_Viewer::Domain().
    
    NCollection_List - added methods Contains() and Remove() taking item value.
    V3d_Viewer now uses V3d_ListOfLight, V3d_ListOfView instead of V3d_ListOfTransient.
    
    Removed obsolete ZFit workaround from command XShow.

git

2016-09-25 19:35

administrator   ~0058125

Branch CR27900 has been updated forcibly by kgv.

SHA-1: 34a87de19087820062c816e8b0d596c50f89c149

kgv

2016-09-25 19:36

developer   ~0058126

Patch is ready for review.

git

2016-09-26 19:35

administrator   ~0058179

Branch CR27900 has been updated forcibly by kgv.

SHA-1: 55b4b763c2a7d67414a798862b46e8bf5a6d7fc5

san

2016-09-26 19:38

developer   ~0058181

Branch CR27900 reviewed without remarks in occt.git and occt-products.git, ready for testing.

mkv

2016-09-27 13:32

tester   ~0058202

Dear BugMaster,
Branch CR27900 from occt git-repository (and CR27900 from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 55b4b763c2a7d67414a798862b46e8bf5a6d7fc5
SHA-1: 3d2549f0b56ceaff78108964b434ec5fb6d5b4be

There are following compilation errors:

Windows:
http://jenkins-test-07.nnov.opencascade.com:8080/view/CR27900-CR27900/job/CR27900-CR27900-Products-Windows-64-VC10-csharp-samples/1/parsed_console/
1>d:/install/CR27900-CR27900/Windows-64-VC10-opt/OCCT/inc\NCollection_List.hxx(207): error C2678: binary '==' : no operator found which takes a left-hand operand of type 'Message_Msg' (or there is no acceptable conversion)

http://jenkins-test-07.nnov.opencascade.com:8080/view/CR27900-CR27900/job/CR27900-CR27900-Products-Windows-64-VC10-java-samples/1/parsed_console/
d:\install\CR27900-CR27900\Windows-64-VC10-opt\OCCT\inc\NCollection_List.hxx(207): error C2678: binary '==' : no operator found which takes a left-hand operand of type 'Message_Msg' (or there is no acceptable conversion) [D:\install\CR27900-CR27900\Windows-64-VC10-opt\Products\samples\java\win64\VC10\cmake\OCCwrapJava.vcxproj]
  d:\install\CR27900-CR27900\Windows-64-VC10-opt\OCCT\inc\NCollection_List.hxx(207): error C2678: binary '==' : no operator found which takes a left-hand operand of type 'Message_Msg' (or there is no acceptable conversion) [D:\install\CR27900-CR27900\Windows-64-VC10-opt\Products\samples\java\win64\VC10\cmake\OCCwrapJava.vcxproj]

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 4 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 64 (64 on master)
Windows: 0 (0 on master)
MacOS : 1130

There are new additional compilation warnings on Windows platform:
http://jenkins-test-07.nnov.opencascade.com:8080/user/mnt/my-views/view/A_mnt_warnings/portlet/dashboard_portlet_13912/job/CR27900-CR27900-OCCT-Windows-64-VC10-opt-compile/1/warnings34Result/
V3d_Viewer.cxx:53, MSBuild, Priority: Normal
'this' : used in base member initializer list
V3d_Viewer.cxx:54, MSBuild, Priority: Normal
'this' : used in base member initializer list
V3d_Viewer.cxx:91, MSBuild, Priority: Normal
'this' : used in base member initializer list
V3d_Viewer.cxx:92, MSBuild, Priority: Normal
'this' : used in base member initializer list

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 90437946 / 90241282 [+0.22%]
Total CPU difference: 19473.459999999857 / 19252.119999999875 [+1.15%]
products component :
Total MEMORY difference: 30013011 / 30044992 [-0.11%]
Total CPU difference: 5132.759999999978 / 5150.999999999975 [-0.35%]

Testing on Windows:
occt component :
Total MEMORY difference: 57215625 / 57221541 [-0.01%]
Total CPU difference: 17895.873116398736 / 18310.78897609872 [-2.27%]
products component :
Total MEMORY difference: 21271560 / 21235672 [+0.17%]
Total CPU difference: 4902.924228799943 / 4988.631178199945 [-1.72%]

There are no differences in images found by testdiff.

mkv

2016-09-27 13:33

tester   ~0058203

Dear kgv,
Branch CR27900 has been rejected due to:
- compilation errors
- additional warnings

git

2016-09-27 15:36

administrator   ~0058218

Branch CR27900 has been updated forcibly by kgv.

SHA-1: 2dbdd225711bf2bb70413679e8fb037ea48dbd40

kgv

2016-09-27 16:23

developer   ~0058222

Please check updated patch.

mkv

2016-09-28 14:27

tester   ~0058258

Dear BugMaster,
Branch CR27900 from occt git-repository (and CR27900 from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 2dbdd225711bf2bb70413679e8fb037ea48dbd40
SHA-1: 112539912b2950f457ef402bc73515f106c577b7

There are following compilation errors:
Windows:

http://jenkins-test-07.nnov.opencascade.com:8080/view/CR27900-CR27900/job/CR27900-CR27900-Products-Windows-64-VC10-csharp-samples/1/parsed_console/
1>d:/install/CR27900-CR27900/Windows-64-VC10-opt/OCCT/inc\NCollection_List.hxx(207): error C2678: binary '==' : no operator found which takes a left-hand operand of type 'IntTools_SurfaceRangeSample' (or there is no acceptable conversion)

http://jenkins-test-07.nnov.opencascade.com:8080/view/CR27900-CR27900/job/CR27900-CR27900-Products-Windows-64-VC10-java-samples/1/parsed_console/
d:\install\CR27900-CR27900\Windows-64-VC10-opt\OCCT\inc\NCollection_List.hxx(207): error C2678: binary '==' : no operator found which takes a left-hand operand of type 'IntTools_SurfaceRangeSample' (or there is no acceptable conversion) [D:\install\CR27900-CR27900\Windows-64-VC10-opt\Products\samples\java\win64\VC10\cmake\OCCwrapJava.vcxproj]
  d:\install\CR27900-CR27900\Windows-64-VC10-opt\OCCT\inc\NCollection_List.hxx(207): error C2678: binary '==' : no operator found which takes a left-hand operand of type 'IntTools_SurfaceRangeSample' (or there is no acceptable conversion) [D:\install\CR27900-CR27900\Windows-64-VC10-opt\Products\samples\java\win64\VC10\cmake\OCCwrapJava.vcxproj]

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 64 (64 on master)
Windows: 0 (0 on master)
MacOS : 1169

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 90493369 / 90241272 [+0.28%]
Total CPU difference: 19387.029999999897 / 19251.749999999876 [+0.70%]
products component :
Total MEMORY difference: 30040861 / 30044992 [-0.01%]
Total CPU difference: 5137.849999999971 / 5150.999999999975 [-0.26%]

Testing on Windows:
occt component :
Total MEMORY difference: 57215293 / 57221541 [-0.01%]
Total CPU difference: 17981.12766289865 / 18310.78897609872 [-1.80%]
products component :
Total MEMORY difference: 21271579 / 21235672 [+0.17%]
Total CPU difference: 4902.097423499954 / 4988.631178199945 [-1.73%]

There are no differences in images found by testdiff.

mkv

2016-09-28 14:28

tester   ~0058259

Dear kgv,
Branch CR27900 has been rejected due to:
- compilation errors

kgv

2016-09-28 14:44

developer   ~0058261

Please check compilation of corrected C#/Java samples.

mkv

2016-09-28 18:42

tester   ~0058284

Dear BugMaster,
Branch CR27900 from occt git-repository (and CR27900 from products git-repository) was recompiled on Linux, MacOS and Windows platforms on Release mode without errors.

mkv

2016-09-28 18:42

tester   ~0058285

Dear BugMaster,
Branch CR27900 from occt git-repository and CR27900 from products git-repository are TESTED.

git

2016-10-28 21:42

administrator   ~0059459

Branch CR27900 has been deleted by kgv.

SHA-1: 2dbdd225711bf2bb70413679e8fb037ea48dbd40

Related Changesets

occt: master 6a24c6de

2016-09-25 16:09:23

kgv

Details Diff
0027900: Coding rules - drop redundant Name parameter from V3d_Viewer constructor

Removed unused methods AIS_InteractiveContext::DomainOfMainViewer(),
V3d_Viewer::NextName(), V3d_Viewer::Domain().

NCollection_List - added methods Contains() and Remove() taking item value.
V3d_Viewer now uses V3d_ListOfLight, V3d_ListOfView instead of V3d_ListOfTransient.

Removed obsolete ZFit workaround from command XShow.
Affected Issues
0027900
mod - samples/CSharp/OCCTProxy/OCCTProxy.cpp Diff File
mod - samples/CSharp/OCCTProxy_D3D/OCCTProxyD3D.cpp Diff File
mod - samples/java/jniviewer/jni/OcctJni_Viewer.cxx Diff File
mod - samples/mfc/occtdemo/Common/WNT/OCCDemoDoc.cpp Diff File
mod - samples/mfc/standard/01_Geometry/src/GeometryDoc.cpp Diff File
mod - samples/mfc/standard/08_HLR/src/HLRDoc.cpp Diff File
mod - samples/mfc/standard/08_HLR/src/SelectionDialog.cpp Diff File
mod - samples/mfc/standard/09_Animation/src/AnimationDoc.cpp Diff File
mod - samples/mfc/standard/10_Convert/src/WNT/OCCDemoDoc.cpp Diff File
mod - samples/mfc/standard/Common/OCC_2dDoc.cpp Diff File
mod - samples/mfc/standard/Common/OCC_3dBaseDoc.cpp Diff File
mod - samples/qt/AndroidQt/AndroidQt.cxx Diff File
mod - samples/qt/Common/src/DocumentCommon.cxx Diff File
mod - src/AIS/AIS_ColorScale.cxx Diff File
mod - src/AIS/AIS_InteractiveContext.cxx Diff File
mod - src/AIS/AIS_InteractiveContext.hxx Diff File
mod - src/AIS/AIS_InteractiveContext_2.cxx Diff File
mod - src/AIS/AIS_LocalContext_1.cxx Diff File
mod - src/DDocStd/DDocStd_ApplicationCommands.cxx Diff File
mod - src/NCollection/NCollection_List.hxx Diff File
mod - src/PrsMgr/PrsMgr_PresentationManager.cxx Diff File
mod - src/V3d/FILES Diff File
add - src/V3d/V3d_ListOfLight.hxx Diff File
rm - src/V3d/V3d_ListOfTransient.hxx Diff File
add - src/V3d/V3d_ListOfView.hxx Diff File
mod - src/V3d/V3d_View.cxx Diff File
mod - src/V3d/V3d_View.hxx Diff File
mod - src/V3d/V3d_Viewer.cxx Diff File
mod - src/V3d/V3d_Viewer.hxx Diff File
rm - src/V3d/V3d_Viewer_1.cxx Diff File
rm - src/V3d/V3d_Viewer_2.cxx Diff File
mod - src/V3d/V3d_Viewer_3.cxx Diff File
mod - src/V3d/V3d_Viewer_4.cxx Diff File
mod - src/V3d/V3d_View_2.cxx Diff File
mod - src/ViewerTest/ViewerTest.cxx Diff File
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff File
mod - src/XDEDRAW/XDEDRAW.cxx Diff File

Issue History

Date Modified Username Field Change
2016-09-25 14:41 kgv New Issue
2016-09-25 14:41 kgv Assigned To => kgv
2016-09-25 19:12 git Note Added: 0058123
2016-09-25 19:35 git Note Added: 0058125
2016-09-25 19:36 kgv Note Added: 0058126
2016-09-25 19:36 kgv Assigned To kgv => san
2016-09-25 19:36 kgv Status new => resolved
2016-09-26 19:35 git Note Added: 0058179
2016-09-26 19:38 san Note Added: 0058181
2016-09-26 19:38 san Assigned To san => bugmaster
2016-09-26 19:38 san Status resolved => reviewed
2016-09-26 20:03 mkv Assigned To bugmaster => mkv
2016-09-27 13:32 mkv Note Added: 0058202
2016-09-27 13:33 mkv Note Added: 0058203
2016-09-27 13:33 mkv Assigned To mkv => kgv
2016-09-27 13:33 mkv Status reviewed => assigned
2016-09-27 13:33 mkv Test case number => Not needed
2016-09-27 15:36 git Note Added: 0058218
2016-09-27 16:23 kgv Note Added: 0058222
2016-09-27 16:23 kgv Assigned To kgv => bugmaster
2016-09-27 16:23 kgv Status assigned => resolved
2016-09-27 16:23 kgv Status resolved => reviewed
2016-09-27 17:55 mkv Assigned To bugmaster => mkv
2016-09-28 14:27 mkv Note Added: 0058258
2016-09-28 14:28 mkv Note Added: 0058259
2016-09-28 14:28 mkv Assigned To mkv => kgv
2016-09-28 14:28 mkv Status reviewed => assigned
2016-09-28 14:44 kgv Note Added: 0058261
2016-09-28 14:44 kgv Assigned To kgv => bugmaster
2016-09-28 14:44 kgv Status assigned => resolved
2016-09-28 14:44 kgv Status resolved => reviewed
2016-09-28 17:34 mkv Assigned To bugmaster => mkv
2016-09-28 18:42 mkv Note Added: 0058284
2016-09-28 18:42 mkv Note Added: 0058285
2016-09-28 18:42 mkv Assigned To mkv => bugmaster
2016-09-28 18:42 mkv Status reviewed => tested
2016-10-03 13:47 kgv Changeset attached => occt master 6a24c6de
2016-10-03 13:47 kgv Assigned To bugmaster => kgv
2016-10-03 13:47 kgv Status tested => verified
2016-10-03 13:47 kgv Resolution open => fixed
2016-10-28 21:42 git Note Added: 0059459
2016-12-05 08:37 abv Relationship added related to 0028186
2016-12-09 16:28 aiv Status verified => closed
2016-12-09 16:40 aiv Fixed in Version => 7.1.0
2021-01-14 17:08 kgv Relationship added parent of 0032056