From 0b568b2d288e79a422633eda506da4ec4b855087 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Tue, 14 Jun 2016 19:23:36 +0200 Subject: [PATCH] Documentation --- GRDB/Core/DatabaseValue.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GRDB/Core/DatabaseValue.swift b/GRDB/Core/DatabaseValue.swift index d17bc43ea..d620c2db2 100644 --- a/GRDB/Core/DatabaseValue.swift +++ b/GRDB/Core/DatabaseValue.swift @@ -186,7 +186,10 @@ public func ==(lhs: DatabaseValue, rhs: DatabaseValue) -> Bool { /// Returns true if i and d hold exactly the same value, and if converting one /// type into the other does not lose any information. private func int64EqualDouble(_ i: Int64, _ d: Double) -> Bool { - // See http://stackoverflow.com/questions/33719132/how-to-test-for-lossless-double-integer-conversion/33784296#33784296 + // 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 return (d >= Double(Int64.min)) && (d < Double(Int64.max)) && (round(d) == d)