View Issue Details

IDProjectCategoryView StatusLast Update
0024805Open CASCADEOCCT:Codingpublic2015-02-04 10:15
ReporterabvAssigned Toapn  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version6.8.0Fixed in Version6.8.0 
Summary0024805: Eliminate unused static functions and methods: ShallowDump(), ShallowCopy(), STANDARD_TYPE(...)
DescriptionIn context of 0024023 we are going to revise implementation of OCCT RTTI for classes inheriting Standard_Transient.

However, legacy OCCT type system supports also type definitions for non-transient classes and data types, like elementary types, pointers, etc. These types are defined as static instances of Handle(Standard_Type) returned by global functions with names generated by macro STANDARD_TYPE().

Actually these definitions are never used nowadays (they were probably useful in generation of engines and clients for CCL interconnection). In many places they are not defined or defined inconsistently.

These definitions will cause problems when STANDARD_TYPE() macro is redefined to make a construct not suitable for name of global function.

Thus these definitions should be removed.

At the same time we can remove definitions of functions and methods with names ShallowDump() and ShallowCopy() which are defined in many places in legacy code but (almost) never used.
TagsNo tags attached.
Test case numberNot needed

Relationships

related to 0025790 closedbugmaster Drop unimplemented method ShallowCopy() from TCollection_HSequence.cdl 
child of 0024023 closedabv Revamp the OCCT Handle 

Activities

abv

2014-04-08 07:41

manager   ~0028721

Fix pushed to branch CR24805, please review

kgv

2014-04-08 08:07

developer   ~0028722

Please test the patch.

apn

2014-04-09 10:38

administrator   ~0028751

There is compilation error on Linux:

../../../../inc/Standard_Persistent_proto.hxx:42: error: ‘Handle_Standard_Persistent’ does not name a type

abv

2014-04-09 12:02

manager   ~0028755

I have pushed correction to the same branch, please test

apn

2014-04-10 14:45

administrator   ~0028776

There is compilation error on Linux:

../../../../src/OSD/OSD_MAllocHook.cxx: In static member function ‘static Standard_Boolean OSD_MAllocHook::LogFileHandler::MakeReport(const char*, const char*, Standard_Boolean)’:
../../../../src/OSD/OSD_MAllocHook.cxx:319: error: ‘strcmp’ was not declared in this scope

abv

2014-04-10 15:46

manager   ~0028779

I have pushed correction to CR24805, please test again

abv

2014-04-11 15:06

manager   ~0028795

Branch CR24805 rebased on current master

mkv

2014-04-14 14:46

tester   ~0028823

Dear BugMaster,

Branch CR24805 was compiled on Linux platform.
SHA-1: 850850c4a7cf46c2957ae465520fd478b510c814

There are compilation errors:
http://jenkins-test-02.nnov.opencascade.com:8080/user/mnt/my-views/view/CR24805/job/mnt-CR24805-master_build_occt_linux/1/parsed_console/?

In file included from ../../../../inc/NCollection_String.hxx:19,
from ../../../../inc/Font_FTFont.hxx:20,
from ../../../../src/Font/Font_FTFont.cxx:16:
../../../../inc/NCollection_UtfString.hxx: In static member function ‘static void NCollection_UtfString<Type>::strCopy(Standard_Byte*, const Standard_Byte*, Standard_Integer)’:
../../../../inc/NCollection_UtfString.hxx:243: error: ‘::memcpy’ has not been declared
../../../../inc/NCollection_UtfString.hxx: In static member function ‘static bool NCollection_UtfString<Type>::strAreEqual(const Type*, Standard_Integer, const Type*, Standard_Integer)’:
../../../../inc/NCollection_UtfString.hxx:253: error: ‘::memcmp’ has not been declared
make[2]: *** [Font_FTFont.lo] Error 1

kgv

2014-04-14 15:07

developer   ~0028824

Please re-test updated branch.

mkv

2014-04-15 19:53

tester   ~0028852

Dear BugMaster,

Branch CR24805 (and products from GIT master) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: dfccaa587793f4cbe3cc2e60160cf83e53cbc803

Number of compiler warnings:

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

products component :
Linux: 12 (12 on master)
Windows: 2 (2 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 348853988 / 352653700
Total CPU difference: 53883.39999999985 / 67343.38000000024

Testing on Windows:
Total MEMORY difference: 380753544 / 380717640
Total CPU difference: 34315.6875 / 39760.234375

There are no differences in images found by testdiff.

abv

2014-04-16 09:05

manager   ~0028857

I have force-pushed branch CR24805 merged in one commit be4e27ae0e7f17fea455df424ac1554035e77051, equivalent to dfccaa587793f4cbe3cc2e60160cf83e53cbc803; please new one when integrating

Related Changesets

occt: master 2cb44241

2014-04-11 09:59:41

abv


Committer: apn Details Diff
0024805: Eliminate unused static functions and methods: ShallowDump(), ShallowCopy(), STANDARD_TYPE(...)

Implementation of global functions STANDARD_TYPE() for types not inheriting Standard_Transient or Standard_Persistent are eliminated.

Global functions and class methods ShallowCopy() are removed; also removed unused classes Visual3d_PickPath and Visual3d_PickDescriptor.

Global functions and class methods ShallowDump() are removed, except for classes Standard_GUID, TopLoc_Datum, and TopLoc_Location as the latter are still used in some Debug printouts.
Affected Issues
0024805
rm - src/Aspect/Aspect_CLayer2d.cxx Diff File
mod - src/Aspect/Aspect_CLayer2d.hxx Diff File
mod - src/Aspect/Aspect_Display.hxx Diff File
mod - src/Aspect/Aspect_Drawable.hxx Diff File
rm - src/Aspect/Aspect_FStream.cxx Diff File
mod - src/Aspect/Aspect_FStream.hxx Diff File
mod - src/Aspect/Aspect_GraphicCallbackProc.hxx Diff File
rm - src/Aspect/Aspect_Handle.cxx Diff File
mod - src/Aspect/Aspect_Handle.hxx Diff File
rm - src/Aspect/Aspect_IFStream.cxx Diff File
mod - src/Aspect/Aspect_IFStream.hxx Diff File
mod - src/Aspect/Aspect_RenderingContext.hxx Diff File
rm - src/Aspect/Aspect_RGBPixel.cxx Diff File
mod - src/Aspect/Aspect_RGBPixel.hxx Diff File
mod - src/Aspect/FILES Diff File
mod - src/DBC/DBC_BaseArray.cdl Diff File
mod - src/DBC/DBC_BaseArray.cxx Diff File
mod - src/DBC/DBC_BaseArray_objs.hxx Diff File
mod - src/DDataStd/DDataStd_BasicCommands.cxx Diff File
mod - src/Graphic3d/FILES Diff File
rm - src/Graphic3d/Graphic3d_CBitFields16.cxx Diff File
mod - src/Graphic3d/Graphic3d_CBitFields16.hxx Diff File
rm - src/Graphic3d/Graphic3d_CBitFields20.cxx Diff File
mod - src/Graphic3d/Graphic3d_CBitFields20.hxx Diff File
rm - src/Graphic3d/Graphic3d_CBitFields4.cxx Diff File
mod - src/Graphic3d/Graphic3d_CBitFields4.hxx Diff File
rm - src/Graphic3d/Graphic3d_CBitFields8.cxx Diff File
mod - src/Graphic3d/Graphic3d_CBitFields8.hxx Diff File
rm - src/Graphic3d/Graphic3d_CBounds.cxx Diff File
mod - src/Graphic3d/Graphic3d_CBounds.hxx Diff File
rm - src/Graphic3d/Graphic3d_CGraduatedTrihedron.cxx Diff File
mod - src/Graphic3d/Graphic3d_CGraduatedTrihedron.hxx Diff File
rm - src/Graphic3d/Graphic3d_CLight.cxx Diff File
mod - src/Graphic3d/Graphic3d_CLight.hxx Diff File
rm - src/Graphic3d/Graphic3d_CPick.cxx Diff File
mod - src/Graphic3d/Graphic3d_CPick.hxx Diff File
rm - src/Graphic3d/Graphic3d_CTexture.cxx Diff File
mod - src/Graphic3d/Graphic3d_CTexture.hxx Diff File
rm - src/Graphic3d/Graphic3d_CTransPersStruct.cxx Diff File
mod - src/Graphic3d/Graphic3d_CTransPersStruct.hxx Diff File
rm - src/Graphic3d/Graphic3d_CUserDraw.cxx Diff File
mod - src/Graphic3d/Graphic3d_CUserDraw.hxx Diff File
rm - src/Graphic3d/Graphic3d_CView.cxx Diff File
mod - src/Graphic3d/Graphic3d_CView.hxx Diff File
mod - src/IFSelect/FILES Diff File
rm - src/IFSelect/IFSelect_ActFunc.cxx Diff File
mod - src/IFSelect/IFSelect_ActFunc.hxx Diff File
mod - src/MoniTool/FILES Diff File
rm - src/MoniTool/MoniTool_ValueInterpret.cxx Diff File
mod - src/MoniTool/MoniTool_ValueInterpret.hxx Diff File
rm - src/MoniTool/MoniTool_ValueSatisfies.cxx Diff File
mod - src/MoniTool/MoniTool_ValueSatisfies.hxx Diff File
mod - src/NCollection/NCollection_UtfString.hxx Diff File
mod - src/OSD/FILES Diff File
rm - src/OSD/OSD_Function.cxx Diff File
mod - src/OSD/OSD_Function.hxx Diff File
mod - src/OSD/OSD_MAllocHook.cxx Diff File
mod - src/PCollection/PCollection_HArray1.cdl Diff File
mod - src/PCollection/PCollection_HArray1.gxx Diff File
mod - src/PCollection/PCollection_HArray2.cdl Diff File
mod - src/PCollection/PCollection_HArray2.gxx Diff File
mod - src/PCollection/PCollection_HAsciiString.cdl Diff File
mod - src/PCollection/PCollection_HAsciiString.cxx Diff File
mod - src/PCollection/PCollection_HDoubleList.cdl Diff File
mod - src/PCollection/PCollection_HDoubleList.gxx Diff File
mod - src/PCollection/PCollection_HExtendedString.cdl Diff File
mod - src/PCollection/PCollection_HExtendedString.cxx Diff File
mod - src/PCollection/PCollection_HSequence.cdl Diff File
mod - src/PCollection/PCollection_HSequence.gxx Diff File
mod - src/PCollection/PCollection_HSingleList.cdl Diff File
mod - src/PCollection/PCollection_HSingleList.gxx Diff File
mod - src/PMMgt/PMMgt_PManaged.cxx Diff File
mod - src/ShapeProcess/FILES Diff File
rm - src/ShapeProcess/ShapeProcess_OperFunc.cxx Diff File
mod - src/ShapeProcess/ShapeProcess_OperFunc.hxx Diff File
mod - src/Standard/FILES Diff File
mod - src/Standard/Handle_Standard_Persistent.hxx Diff File
rm - src/Standard/Standard_Address.cxx Diff File
mod - src/Standard/Standard_Address.hxx Diff File
rm - src/Standard/Standard_Boolean.cxx Diff File
mod - src/Standard/Standard_Boolean.hxx Diff File
rm - src/Standard/Standard_Character.cxx Diff File
mod - src/Standard/Standard_Character.hxx Diff File
mod - src/Standard/Standard_CString.cxx Diff File
mod - src/Standard/Standard_CString.hxx Diff File
rm - src/Standard/Standard_ExtCharacter.cxx Diff File
mod - src/Standard/Standard_ExtCharacter.hxx Diff File
mod - src/Standard/Standard_ExtString.cxx Diff File
mod - src/Standard/Standard_ExtString.hxx Diff File
mod - src/Standard/Standard_GUID.cdl Diff File
rm - src/Standard/Standard_Integer.cxx Diff File
mod - src/Standard/Standard_Integer.hxx Diff File
rm - src/Standard/Standard_IStream.cxx Diff File
mod - src/Standard/Standard_IStream.hxx Diff File
rm - src/Standard/Standard_OId.hxx Diff File
rm - src/Standard/Standard_OStream.cxx Diff File
mod - src/Standard/Standard_OStream.hxx Diff File
mod - src/Standard/Standard_Persistent.cdl Diff File
mod - src/Standard/Standard_Persistent.cxx Diff File
mod - src/Standard/Standard_Persistent_proto.hxx Diff File
mod - src/Standard/Standard_PrimitiveTypes.hxx Diff File
mod - src/Standard/Standard_Real.cxx Diff File
mod - src/Standard/Standard_Real.hxx Diff File
rm - src/Standard/Standard_ShallowDump.cxx Diff File
mod - src/Standard/Standard_ShortReal.cxx Diff File
mod - src/Standard/Standard_ShortReal.hxx Diff File
mod - src/Standard/Standard_Storable.cdl Diff File
mod - src/Standard/Standard_Storable.cxx Diff File
rm - src/Standard/Standard_Time.cxx Diff File
mod - src/Standard/Standard_Time.hxx Diff File
mod - src/Standard/Standard_Transient.cxx Diff File
mod - src/Standard/Standard_Transient_proto.hxx Diff File
mod - src/Standard/Standard_Type.cdl Diff File
mod - src/Standard/Standard_Type.cxx Diff File
mod - src/Standard/Standard_UUID.cxx Diff File
mod - src/Standard/Standard_UUID.hxx Diff File
mod - src/Storage/FILES Diff File
rm - src/Storage/Storage_Container.cxx Diff File
mod - src/Storage/Storage_Container.hxx Diff File
mod - src/Storage/Storage_Macros.hxx Diff File
mod - src/SWDRAW/SWDRAW.cxx Diff File
mod - src/TCollection/TCollection_HAsciiString.cdl Diff File
mod - src/TCollection/TCollection_HAsciiString.cxx Diff File
mod - src/TCollection/TCollection_HExtendedString.cdl Diff File
mod - src/TCollection/TCollection_HExtendedString.cxx Diff File
mod - src/TCollection/TCollection_HSequence.gxx Diff File
mod - src/TCollection/TCollection_HSet.cdl Diff File
mod - src/TCollection/TCollection_HSet.gxx Diff File
mod - src/TDF/TDF_Attribute.cxx Diff File
mod - src/V3d/V3d_DirectionalLight.cxx Diff File
mod - src/V3d/V3d_PositionalLight.cxx Diff File
mod - src/V3d/V3d_PositionLight.cxx Diff File
mod - src/V3d/V3d_SpotLight.cxx Diff File
mod - src/Visual3d/Visual3d.cdl Diff File
rm - src/Visual3d/Visual3d_PickDescriptor.cdl Diff File
rm - src/Visual3d/Visual3d_PickDescriptor.cxx Diff File
rm - src/Visual3d/Visual3d_PickPath.cdl Diff File
rm - src/Visual3d/Visual3d_PickPath.cxx Diff File
mod - src/Visual3d/Visual3d_ViewManager.cdl Diff File
mod - src/Visual3d/Visual3d_ViewManager.cxx Diff File
mod - src/WNT/WNT_Dword.hxx Diff File
mod - src/WNT/WNT_Uint.hxx Diff File
mod - src/WNT/WNT_WindowData.hxx Diff File

Issue History

Date Modified Username Field Change
2014-04-07 20:11 abv New Issue
2014-04-07 20:11 abv Assigned To => kgv
2014-04-07 20:11 abv Relationship added child of 0024023
2014-04-08 07:41 abv Note Added: 0028721
2014-04-08 07:41 abv Status new => resolved
2014-04-08 08:07 kgv Note Added: 0028722
2014-04-08 08:07 kgv Assigned To kgv => bugmaster
2014-04-08 08:07 kgv Status resolved => reviewed
2014-04-08 16:01 apn Assigned To bugmaster => apn
2014-04-09 10:38 apn Note Added: 0028751
2014-04-09 10:38 apn Test case number => Not needed
2014-04-09 10:38 apn Assigned To apn => abv
2014-04-09 10:38 apn Status reviewed => assigned
2014-04-09 12:02 abv Note Added: 0028755
2014-04-09 12:02 abv Assigned To abv => bugmaster
2014-04-09 12:02 abv Status assigned => resolved
2014-04-09 12:02 abv Status resolved => reviewed
2014-04-09 13:47 apn Assigned To bugmaster => apn
2014-04-10 14:45 apn Note Added: 0028776
2014-04-10 14:46 apn Assigned To apn => abv
2014-04-10 14:46 apn Status reviewed => assigned
2014-04-10 15:45 abv Status assigned => resolved
2014-04-10 15:46 abv Note Added: 0028779
2014-04-10 15:46 abv Assigned To abv => bugmaster
2014-04-10 15:46 abv Status resolved => reviewed
2014-04-11 14:41 apn Assigned To bugmaster => apn
2014-04-11 15:06 abv Note Added: 0028795
2014-04-14 14:46 mkv Note Added: 0028823
2014-04-14 14:46 mkv Assigned To apn => abv
2014-04-14 14:46 mkv Status reviewed => assigned
2014-04-14 15:07 kgv Note Added: 0028824
2014-04-14 15:07 kgv Assigned To abv => bugmaster
2014-04-14 15:07 kgv Status assigned => resolved
2014-04-14 15:08 kgv Status resolved => reviewed
2014-04-14 16:37 mkv Assigned To bugmaster => mkv
2014-04-15 19:53 mkv Note Added: 0028852
2014-04-15 19:54 mkv Assigned To mkv => bugmaster
2014-04-15 19:54 mkv Status reviewed => tested
2014-04-16 09:05 abv Note Added: 0028857
2014-04-18 16:02 apn Changeset attached => occt master 2cb44241
2014-04-18 16:02 apn Assigned To bugmaster => apn
2014-04-18 16:02 apn Status tested => verified
2014-04-18 16:02 apn Resolution open => fixed
2014-11-11 12:47 aiv Fixed in Version => 6.8.0
2014-11-11 12:52 aiv Status verified => closed
2015-02-04 10:15 kgv Relationship added related to 0025790