From 5ae15e0ef704e1e76c5956bebe4c7e9820197e69 Mon Sep 17 00:00:00 2001 From: Roman Lygin Date: Fri, 18 Jan 2013 13:50:27 +0400 Subject: [PATCH] CR23684: TCollection_HExtendedString::String() returns a copy instead of const reference Update TCollection_HExtendedString::String() implementation as well --- src/TCollection/TCollection_HExtendedString.cdl | 3 ++- src/TCollection/TCollection_HExtendedString.cxx | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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; } -- 2.39.5