From ce03e9e15aef44d62bd7e5ce6604c9a0e12be97f Mon Sep 17 00:00:00 2001 From: Baron Roberts Date: Tue, 16 Feb 1999 11:58:18 +0000 Subject: [PATCH] (c_str): Change return of "" to return of traits::empty() call so that proper... (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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libstdc++/std/bastring.h b/libstdc++/std/bastring.h index f188628cc77..30fb669a842 100644 --- a/libstdc++/std/bastring.h +++ b/libstdc++/std/bastring.h @@ -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 ()); }