projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
769affc
)
(c_str): Change return of "" to return of traits::empty() call so that proper...
author
Baron Roberts
<baron@sgi.com>
Tue, 16 Feb 1999 11:58:18 +0000
(11:58 +0000)
committer
Ulrich Drepper
<drepper@gcc.gnu.org>
Tue, 16 Feb 1999 11:58:18 +0000
(11:58 +0000)
(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
patch
|
blob
|
history
diff --git
a/libstdc++/std/bastring.h
b/libstdc++/std/bastring.h
index f188628cc77b40855c091cb118ecd917940fb8c5..30fb669a842ad0847ac98a6e77f772ab989417fe 100644
(file)
--- 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 ()); }