[haiku-commits] haiku: hrev49833 - headers/cpp/std

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 12 Nov 2015 22:25:50 +0100 (CET)

hrev49833 adds 1 changeset to branch 'master'
old head: 4e3137c085bae361922078f123dceb92da700640
new head: 691e517bbdd54eec2f197ba9996a50c4d20f80af
overview:
http://cgit.haiku-os.org/haiku/log/?qt=range&q=691e517bbdd5+%5E4e3137c085ba

----------------------------------------------------------------------------

691e517bbdd5: build fix.

* can't use min here, this header is not supposed to #include
<algorithm>.

[ Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision: hrev49833
Commit: 691e517bbdd54eec2f197ba9996a50c4d20f80af
URL: http://cgit.haiku-os.org/haiku/commit/?id=691e517bbdd5
Author: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date: Thu Nov 12 21:24:16 2015 UTC

----------------------------------------------------------------------------

1 file changed, 1 insertion(+), 1 deletion(-)
headers/cpp/std/bastring.h | 2 +-

----------------------------------------------------------------------------

diff --git a/headers/cpp/std/bastring.h b/headers/cpp/std/bastring.h
index ce57ea3..59eceab 100644
--- a/headers/cpp/std/bastring.h
+++ b/headers/cpp/std/bastring.h
@@ -420,7 +420,7 @@ public:
int compare (size_type pos, size_type n, const charT* s) const
{ return compare(s, pos, n); }
int compare (size_type pos, size_type n, const charT* s, size_type n2) const
- { return compare(s, pos, std::min(n, n2)); }
+ { if (n > n2) n = n2; return compare(s, pos, n); }
int compare (const charT* s, size_type pos = 0) const
{ return compare (s, pos, traits::length (s)); }



Other related posts:

  • » [haiku-commits] haiku: hrev49833 - headers/cpp/std - pulkomandy