From: Roman Lygin Date: Fri, 18 Jan 2013 09:50:27 +0000 (+0400) Subject: CR23684: TCollection_HExtendedString::String() returns a copy instead of const reference X-Git-Tag: V6_6_0_beta~125 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=5ae15e0ef704e1e76c5956bebe4c7e9820197e69;p=occt-copy.git CR23684: TCollection_HExtendedString::String() returns a copy instead of const reference Update TCollection_HExtendedString::String() implementation as well --- diff --git a/src/TCollection/TCollection_HExtendedString.cdl b/src/TCollection/TCollection_HExtendedString.cdl index 57a2ab55d0..4ff3e040d5 100755 --- a/src/TCollection/TCollection_HExtendedString.cdl +++ b/src/TCollection/TCollection_HExtendedString.cdl @@ -216,7 +216,8 @@ is raises OutOfRange from Standard; String(me) returns ExtendedString from TCollection; - ---Purpose: Returns the field myString + ---Purpose: Returns the field myString + ---C++: return const & Print (me ; astream : out OStream); ---Purpose: Displays . diff --git a/src/TCollection/TCollection_HExtendedString.cxx b/src/TCollection/TCollection_HExtendedString.cxx index 9472fcbc07..223e31f58f 100755 --- a/src/TCollection/TCollection_HExtendedString.cxx +++ b/src/TCollection/TCollection_HExtendedString.cxx @@ -279,9 +279,9 @@ Standard_ExtCharacter TCollection_HExtendedString::Value // ---------------------------------------------------------------------------- // String // ---------------------------------------------------------------------------- -TCollection_ExtendedString TCollection_HExtendedString::String() const +const TCollection_ExtendedString& TCollection_HExtendedString::String() const { - return myString; + return myString; }