summaryrefslogtreecommitdiff
path: root/libstdc++
diff options
context:
space:
mode:
authordrepper <drepper@138bc75d-0d04-0410-961f-82ee72b054a4>1999-02-16 11:58:18 +0000
committerdrepper <drepper@138bc75d-0d04-0410-961f-82ee72b054a4>1999-02-16 11:58:18 +0000
commit75b281c12494563464e504aacd7e14f90c2522b8 (patch)
treea5329dddc85c79d5dc495e47e1c31687b781b6f3 /libstdc++
parentaa3bb955217206205e2a580eca2c6072d4bae400 (diff)
downloadgcc-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.h3
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 ()); }