Fix #7948: add correct prototype for String::compare alongside the wrong one

for BeOS compatibility.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43023 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adrien Destugues 2011-10-31 09:56:00 +00:00
parent 924ead9a3e
commit 837b16251d

View File

@ -407,7 +407,13 @@ public:
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;
// 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)); }