Archived issue #0027900
Coding rules - drop redundant Name parameter from V3d_Viewer constructor
Description
V3d_Viewer constructor has a mandatory parameter "theName":
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.
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 reproduce
N/A
Public activity
15 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
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.
[revision removed]
Detailed log of new commits:
Author: Author
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.
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Patch is ready for review.
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Branch CR27900 reviewed without remarks in occt.git and occt-products.git, ready for testing.
Dear Commenter 1,
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.
[revision removed]
[revision removed]
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.
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.
[revision removed]
[revision removed]
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.
Dear kgv,
Branch [archived branch] has been rejected due to:
- compilation errors
- additional warnings
Branch [archived branch] has been rejected due to:
- compilation errors
- additional warnings
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Please check updated patch.
Dear Commenter 1,
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.
[revision removed]
[revision removed]
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.
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.
[revision removed]
[revision removed]
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.
Dear kgv,
Branch [archived branch] has been rejected due to:
- compilation errors
Branch [archived branch] has been rejected due to:
- compilation errors
Please check compilation of corrected C#/Java samples.
Dear Commenter 1,
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.
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.
Dear Commenter 1,
Branch CR27900 from occt git-repository and CR27900 from products git-repository are TESTED.
Branch CR27900 from occt git-repository and CR27900 from products git-repository are TESTED.
Branch [archived branch] has been deleted by Author.
[revision removed]
[revision removed]
Related records