Archived issue #0023483
Use appropriate type for handling integer time
Description
Currently OCCT does not provide a type equivalent to time_t on CDL level. This leads to using Standard_Integer or Standard_Size in situations where time_t would need to be used in CDL. Hence, all conversions from time_t need to be either explicit casts, or trigger compiler warnings (see e.g. Material_MaterialsDictionary).
To eliminate this problem, a new type (Standard_Time) can be added in Standard package (either in Standard_TypeDef.hxx, or in separate header as primitive CDL type -- to be decided) and used in all places where time_t is needed.
To eliminate this problem, a new type (Standard_Time) can be added in Standard package (either in Standard_TypeDef.hxx, or in separate header as primitive CDL type -- to be decided) and used in all places where time_t is needed.
Public activity
6 archived notes
Participants are labeled by their role within this record.
Dear INV,
Fix is integrated into branch CR23483.
Please, review.
Fix is integrated into branch CR23483.
Please, review.
Patch is incomplete - Standard.cdl has no definition of Standard_Time.
Dear KGV,
I've fixed mistakes you noticed above.
Please, review.
I've fixed mistakes you noticed above.
Please, review.
Patch is ready for testing in CR23483_1 branch.
Please check compiler warnings as well.
Please check compiler warnings as well.
Dear BugMaster,
Branch CR23483_1 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
Number of compiler warnings:
occt component :
Linux: 3 (3 on master)
Windows: 80 (85 on master)
products component :
Linux: 9 (9 on master)
Windows: 54 (54 on master)
Regressions:
No regressions
Improvements:
No improvements
Testing cases:
No testing cases
Testing on Linux:
Total MEMORY difference: 222795564 / 223181100
Total CPU difference: 8885.62000000042 / 8335.420000000542
Testing on Windows:
Total MEMORY difference: 298273164 / 298125568
Total CPU difference: 11223.71875 / 11645.421875
There are not serious differences in images found by testdiff.
Branch CR23483_1 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
Number of compiler warnings:
occt component :
Linux: 3 (3 on master)
Windows: 80 (85 on master)
products component :
Linux: 9 (9 on master)
Windows: 54 (54 on master)
Regressions:
No regressions
Improvements:
No improvements
Testing cases:
No testing cases
Testing on Linux:
Total MEMORY difference: 222795564 / 223181100
Total CPU difference: 8885.62000000042 / 8335.420000000542
Testing on Windows:
Total MEMORY difference: 298273164 / 298125568
Total CPU difference: 11223.71875 / 11645.421875
There are not serious differences in images found by testdiff.
Dear mkv,
the number of warnings should be 80 for OCCT component according to tests log.
the number of warnings should be 80 for OCCT component according to tests log.