(c_str): Change return of "" to return of traits::empty() call so that proper...
authorBaron Roberts <baron@sgi.com>
Tue, 16 Feb 1999 11:58:18 +0000 (11:58 +0000)
committerUlrich Drepper <drepper@gcc.gnu.org>
Tue, 16 Feb 1999 11:58:18 +0000 (11:58 +0000)
(c_str): Change return of "" to return of traits::empty() call so that
proper empty string is returned based on the character type (i.e. ""
or L"").

From-SVN: r25246

libstdc++/std/bastring.h

index f188628cc77b40855c091cb118ecd917940fb8c5..30fb669a842ad0847ac98a6e77f772ab989417fe 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 ()); }