From 61d114f297a54cd4f84cbd05575898b8bae034ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sat, 18 Mar 2017 18:37:55 +0100 Subject: [PATCH] Remove inaccurate documentation for int64EqualDouble(_:_:): Swift standard library does not aim at providing this function. --- GRDB/Core/DatabaseValue.swift | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/GRDB/Core/DatabaseValue.swift b/GRDB/Core/DatabaseValue.swift index e69e428bc..92d343b34 100644 --- a/GRDB/Core/DatabaseValue.swift +++ b/GRDB/Core/DatabaseValue.swift @@ -202,10 +202,7 @@ extension DatabaseValue : Hashable { /// Returns true if i and d hold exactly the same value, and if converting one /// type to the other does not lose any information. private func int64EqualDouble(_ i: Int64, _ d: Double) -> Bool { - // TODO: wait for https://github.com/apple/swift-evolution/blob/master/proposals/0080-failable-numeric-initializers.md - // Bug: https://bugs.swift.org/browse/SR-1491 - // - // For current implementation, see http://stackoverflow.com/questions/33719132/how-to-test-for-lossless-double-integer-conversion/33784296#33784296 + // See http://stackoverflow.com/questions/33719132/how-to-test-for-lossless-double-integer-conversion/33784296#33784296 return (d >= Double(Int64.min)) && (d < Double(Int64.max)) && (round(d) == d)