aboutsummaryrefslogtreecommitdiff
path: root/libstdc++/std
diff options
context:
space:
mode:
authorBaron Roberts <baron@sgi.com>1999-02-16 11:58:18 +0000
committerUlrich Drepper <drepper@gcc.gnu.org>1999-02-16 11:58:18 +0000
commitce03e9e15aef44d62bd7e5ce6604c9a0e12be97f (patch)
treea5329dddc85c79d5dc495e47e1c31687b781b6f3 /libstdc++/std
parent769affc265047477cfc7491c8aaef267ffbca236 (diff)
downloadgcc-ce03e9e15aef44d62bd7e5ce6604c9a0e12be97f.zip
gcc-ce03e9e15aef44d62bd7e5ce6604c9a0e12be97f.tar.gz
gcc-ce03e9e15aef44d62bd7e5ce6604c9a0e12be97f.tar.bz2
(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
Diffstat (limited to 'libstdc++/std')
-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 f188628..30fb669 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 ()); }