From 75b281c12494563464e504aacd7e14f90c2522b8 Mon Sep 17 00:00:00 2001 From: drepper 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 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 | 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 ()); } -- 2.11.0