DiscussionsIssue archiveOCCT:Application Framework

Archived issue #0031219

Application Framework - TObj_Object::SetName(const Standard_CString theName) should use conversion to TCollection_HAsciiString

Open CASCADEOCCT:Application Frameworkclosed14 public notes

Search issues

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.

01Commenter 1
02Commenter 2
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.
03Commenter 2
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.
04Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
05Commenter 5
Mikhail, can you please provide example of warnings you mentioned in #0031219?
06Commenter 6
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
07Commenter 7
08Commenter 8
Branch CR31219_1 is ready to be reviewed.
09Commenter 9
Reviewed
OCCT branch: [archived branch]
Products branch: [archived branch]
10Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
11Commenter 11
Branch CR31219_1 is ready to be reviewed
12Commenter 12
Reviewed
13Commenter 1
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
14Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]