Archived issue #0031219
Application Framework - TObj_Object::SetName(const Standard_CString theName) should use conversion to TCollection_HAsciiString
Description
TObj_Object::SetName(const Standard_CString theName) should use conversion to TCollection_HAsciiString instead of direct conversion to TCollection_HExtendedString to avoid possible problems with Unicode symbols.
Steps to reproduce
There is not possible reproduce from Test Harness
Public activity
14 archived notes
Participants are labeled by their role within this record.
Results of tests can be found by path:
http://jenkins-test-12.nnov.opencascade.com/view/CR31452_1-master-gka/view/COMPARE/
http://jenkins-test-12.nnov.opencascade.com/view/CR31452_1-master-gka/view/COMPARE/
Please, improve the creation of Handles in two last SetName methods in TObj_Object class. The first two methods take references to Handles (like the first : const Handle(TCollection_HAsciiString)& theName), so, creation of Handles "on the fly" for this argument could produce warnings or invalid memory management on some systems.
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: gka
Date: Fri Sep 11 20:52:42 2020 +0300
0031219: TObj_Object::SetName(const Standard_CString theName) should use conversion to TCollection_HAsciiString
In the method TObj_Object::TObj_Object::SetName(const Standard_CString theName) conversion to the HAsciiString was used instead of the conversion to the TCollection_HExtendedString.
Author: gka
Date: Mon Dec 9 14:43:47 2019 +0300
0031219: TObj_Object::SetName(const Standard_CString theName) should use conversion to TCollection_HAsciiString
In the method TObj_Object::TObj_Object::SetName(const Standard_CString theName) conversion to the HAsciiString was used instead of the conversion to the TCollection_HExtendedString.
[revision removed]
Detailed log of new commits:
Author: gka
Date: Fri Sep 11 20:52:42 2020 +0300
0031219: TObj_Object::SetName(const Standard_CString theName) should use conversion to TCollection_HAsciiString
In the method TObj_Object::TObj_Object::SetName(const Standard_CString theName) conversion to the HAsciiString was used instead of the conversion to the TCollection_HExtendedString.
Author: gka
Date: Mon Dec 9 14:43:47 2019 +0300
0031219: TObj_Object::SetName(const Standard_CString theName) should use conversion to TCollection_HAsciiString
In the method TObj_Object::TObj_Object::SetName(const Standard_CString theName) conversion to the HAsciiString was used instead of the conversion to the TCollection_HExtendedString.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Mikhail, can you please provide example of warnings you mentioned in #0031219?
It is the same for VC9, VC10 or VC11:
Message : opencascade::handle<T>::operator opencascade::handle<T> &: Passing non-const reference to handle of base type in function is unsafe; use variable of exact type
Message : opencascade::handle<T>::operator opencascade::handle<T> &: Passing non-const reference to handle of base type in function is unsafe; use variable of exact type
Please see results of tests by path:
http://jenkins-test-12.nnov.opencascade.com/view/CR31219_1-master-gka/view/COMPARE/
http://jenkins-test-12.nnov.opencascade.com/view/CR31219_1-master-gka/view/COMPARE/
Branch CR31219_1 is ready to be reviewed.
Reviewed
OCCT branch: [archived branch]
Products branch: [archived branch]
OCCT branch: [archived branch]
Products branch: [archived branch]
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch CR31219_1 is ready to be reviewed
Reviewed
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17528.97000000011 / 17378.390000000145 [+0.87%]
Products
Total CPU difference: 12127.32000000009 / 12079.540000000095 [+0.40%]
Windows-64-VC14:
OCCT
Total CPU difference: 18862.703125 / 18898.921875 [-0.19%]
Products
Total CPU difference: 13314.828125 / 13329.21875 [-0.11%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17528.97000000011 / 17378.390000000145 [+0.87%]
Products
Total CPU difference: 12127.32000000009 / 12079.540000000095 [+0.40%]
Windows-64-VC14:
OCCT
Total CPU difference: 18862.703125 / 18898.921875 [-0.19%]
Products
Total CPU difference: 13314.828125 / 13329.21875 [-0.11%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]