diff options
author | drepper <drepper@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-02-16 11:58:18 +0000 |
---|---|---|
committer | drepper <drepper@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-02-16 11:58:18 +0000 |
commit | 75b281c12494563464e504aacd7e14f90c2522b8 (patch) | |
tree | a5329dddc85c79d5dc495e47e1c31687b781b6f3 /libstdc++ | |
parent | aa3bb955217206205e2a580eca2c6072d4bae400 (diff) | |
download | gcc-75b281c12494563464e504aacd7e14f90c2522b8.tar.gz |
(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
Diffstat (limited to 'libstdc++')
-rw-r--r-- | libstdc++/std/bastring.h | 3 |
1 files changed, 2 insertions, 1 deletions
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 ()); } |