mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
Operator of cast to non-const reference is declared deprecated to produce compiler warning if used (usually implicitly). OCCT code is updated to avoid that cast, occurring when function accepting non-const reference to handle is called with handle to derived type. For that, local variable of argument type is passed instead, and down-cast is used to get it to desired type after the call. A few occurrences of use of uninitialized variable are corrected.
26 lines
702 B
Plaintext
26 lines
702 B
Plaintext
puts "TODO OCC24023 ALL: Checking local reference of handle to base type to temporary handle object"
|
|
|
|
puts "========"
|
|
puts "CR24023, check operability and performance of OCCT RTTI and handles"
|
|
puts "========"
|
|
puts ""
|
|
|
|
pload QAcommands
|
|
|
|
# check RTTI
|
|
QAHandleBool
|
|
QAHandleKind
|
|
QAHandleOps
|
|
|
|
# check performance of creation and destruction handles, vs. C++ shared_ptr
|
|
set res [QAHandleInc]
|
|
set res_lines [split $res \n]
|
|
set time_occt [lindex [split [lindex $res_lines 1] :] end]
|
|
set time_std [lindex [split [lindex $res_lines 2] :] end]
|
|
set ratio [expr $time_occt / $time_std]
|
|
|
|
# allow 5% deviation
|
|
if { $ratio > 1.05 } {
|
|
puts "Error: OCCT handle is too slow: $time_occt vs. $time_std of shared_ptr"
|
|
}
|