1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00

0031219: Application Framework - 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. -
This commit is contained in:
gka 2019-12-09 14:43:47 +03:00 committed by bugmaster
parent 6c9f3cf15c
commit 8b77b2fc99

View File

@ -289,7 +289,8 @@ Standard_Boolean TObj_Object::SetName(const Handle(TCollection_HExtendedString)&
Standard_Boolean TObj_Object::SetName(const Handle(TCollection_HAsciiString)& theName) const
{
return SetName( new TCollection_HExtendedString ( theName ) );
Handle(TCollection_HExtendedString) aName = new TCollection_HExtendedString(theName);
return SetName(aName);
}
//=======================================================================
@ -299,7 +300,8 @@ Standard_Boolean TObj_Object::SetName(const Handle(TCollection_HAsciiString)& th
Standard_Boolean TObj_Object::SetName(const Standard_CString theName) const
{
return SetName ( new TCollection_HExtendedString ( theName ) );
Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString(theName);
return SetName (aName);
}
//=======================================================================