]> OCCT Git - occt-copy.git/commitdiff
CR23684: TCollection_HExtendedString::String() returns a copy instead of const reference
authorRoman Lygin <roman.lygin@gmail.com>
Fri, 18 Jan 2013 09:50:27 +0000 (13:50 +0400)
committerRoman Lygin <roman.lygin@gmail.com>
Fri, 18 Jan 2013 09:50:27 +0000 (13:50 +0400)
Update TCollection_HExtendedString::String() implementation as well

src/TCollection/TCollection_HExtendedString.cdl
src/TCollection/TCollection_HExtendedString.cxx

index 57a2ab55d0cd14fc5397a7bb844c58ee1455c3cb..4ff3e040d539e2a00e6d1ca905715e13062dcec7 100755 (executable)
@@ -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 <me> .
index 9472fcbc074cb5b8d1939754ee601fe9c7b9d3d6..223e31f58f17578102a92290c2b718a09f8774b9 100755 (executable)
@@ -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;
 }