From 1776251394e4ffece3507e55f1a89ee075d8a006 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ph=E1=BA=A1m=20Minh=20Th=C3=A0nh?= Date: Fri, 4 Dec 2015 11:09:06 +0800 Subject: [PATCH] [stdlib] Make comparison operator choices consistent Since all other comparisons in the `min` and `max` functions use the less-than operator, this line should use the same operator as well. --- stdlib/public/core/Algorithm.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/public/core/Algorithm.swift b/stdlib/public/core/Algorithm.swift index 770971bec5bb9..233d4fdb04d79 100644 --- a/stdlib/public/core/Algorithm.swift +++ b/stdlib/public/core/Algorithm.swift @@ -92,7 +92,7 @@ public func max(x: T, _ y: T, _ z: T, _ rest: T...) -> T { r = z } for t in rest { - if t >= r { + if r < t { r = t } }