btrev43049 adds 1 changeset to branch 'master' old head: 85c4a8cee1811928616791a2a2972fe944b217cf new head: 8b70c20ed25f905e7e217376c9e2f65a8dee6729 overview: http://cgit.haiku-os.org/buildtools/log/?qt=range&q=8b70c20+%5E85c4a8c ---------------------------------------------------------------------------- 8b70c20: Add another standard C++ prototype for string::compare. [ Adrien Destugues <pulkomandy@xxxxxxxxx> ] ---------------------------------------------------------------------------- Revision: btrev43049 Commit: 8b70c20ed25f905e7e217376c9e2f65a8dee6729 URL: http://cgit.haiku-os.org/buildtools/commit/?id=8b70c20 Author: Adrien Destugues <pulkomandy@xxxxxxxxx> Date: Sat Jan 5 10:19:40 2013 UTC ---------------------------------------------------------------------------- 1 file changed, 4 insertions(+), 3 deletions(-) legacy/gcc/libstdc++/std/bastring.h | 7 ++++--- ---------------------------------------------------------------------------- diff --git a/legacy/gcc/libstdc++/std/bastring.h b/legacy/gcc/libstdc++/std/bastring.h index 774f7be..a9c844d 100644 --- a/legacy/gcc/libstdc++/std/bastring.h +++ b/legacy/gcc/libstdc++/std/bastring.h @@ -408,17 +408,18 @@ public: basic_string substr (size_type pos = 0, size_type n = npos) const { return basic_string (*this, pos, n); } - int compare (const basic_string& str, size_type pos = 0, size_type n = npos) const; - // There is no 'strncmp' equivalent for charT pointers. - // BeOS bogus version int compare (const charT* s, size_type pos, size_type n) const; + int compare (const basic_string& str, size_type pos = 0, size_type n = npos) const; + // There is no 'strncmp' equivalent for charT pointers. // Correct std C++ prototype int compare (size_type pos, size_type n, const charT* s) const { return compare(s, pos, n); } int compare (const charT* s, size_type pos = 0) const { return compare (s, pos, traits::length (s)); } + int compare (size_type pos, size_type n, const basic_string& str) const + { return compare(str, pos, n); } iterator begin () { selfish (); return &(*this)[0]; } iterator end () { selfish (); return &(*this)[length ()]; }