OSDN Git Service

(c_str): Change return of "" to return of traits::empty() call so that
authordrepper <drepper@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Feb 1999 11:58:18 +0000 (11:58 +0000)
committerdrepper <drepper@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Feb 1999 11:58:18 +0000 (11:58 +0000)
proper empty string is returned based on the character type (i.e. ""
or L"").

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25246 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++/std/bastring.h

index f188628..30fb669 100644 (file)
@@ -298,7 +298,8 @@ private:
 
 public:
   const charT* c_str () const
-    { if (length () == 0) return ""; terminate (); return data (); }
+    { if (length () == 0) return traits::empty();
+      terminate (); return data (); }
   void resize (size_type n, charT c);
   void resize (size_type n)
     { resize (n, eos ()); }