summaryrefslogtreecommitdiffstats
path: root/libstdc++/std/bastring.cc
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2000-08-11 22:41:38 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2000-08-11 22:41:38 +0000
commit1ef33a5e946899dadcabd97bdfc0af1acfa9d88e (patch)
treea60805c840ee94f03189163f278c237b8628e4cf /libstdc++/std/bastring.cc
parent3414548c6ce8d9f2cbb2a951afdcd3f1cf6f2e44 (diff)
downloadppe42-gcc-1ef33a5e946899dadcabd97bdfc0af1acfa9d88e.tar.gz
ppe42-gcc-1ef33a5e946899dadcabd97bdfc0af1acfa9d88e.zip
* std/straits.h (is_del): Boolify with !!.
* std/bastring.cc (compare to charT*): Add rlen==n check. * std/bastring.h (Rep::grab): Add x86 atomic version. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35647 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++/std/bastring.cc')
-rw-r--r--libstdc++/std/bastring.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/libstdc++/std/bastring.cc b/libstdc++/std/bastring.cc
index f86f6d30157..b8fec4fa7db 100644
--- a/libstdc++/std/bastring.cc
+++ b/libstdc++/std/bastring.cc
@@ -1,5 +1,5 @@
// Member templates for the -*- C++ -*- string classes.
-// Copyright (C) 1994, 1999 Free Software Foundation
+// Copyright (C) 1994, 1999, 2000 Free Software Foundation
// This file is part of the GNU ANSI C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -423,6 +423,8 @@ compare (const charT* s, size_type pos, size_type n) const
int r = traits::compare (data () + pos, s, rlen);
if (r != 0)
return r;
+ if (rlen == n)
+ return 0;
return (length () - pos) - n;
}
OpenPOWER on IntegriCloud