From 058cc1915b007ce35e7231d017c291051d419d3f Mon Sep 17 00:00:00 2001 From: John Estropia Date: Tue, 27 Aug 2019 14:21:33 +0900 Subject: [PATCH] fix optimization issues in release build --- Sources/CoreStoreObject+Observing.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/CoreStoreObject+Observing.swift b/Sources/CoreStoreObject+Observing.swift index 81d4365..06db158 100644 --- a/Sources/CoreStoreObject+Observing.swift +++ b/Sources/CoreStoreObject+Observing.swift @@ -462,8 +462,8 @@ extension AttributeProtocol { let notification = CoreStoreObjectValueDiff( kind: kind, - newNativeValue: newValue as! V.QueryableNativeType?, - oldNativeValue: oldValue as! V.QueryableNativeType?, + newNativeValue: newValue as? V.QueryableNativeType, + oldNativeValue: oldValue as? V.QueryableNativeType, isPrior: isPrior ) changeHandler( @@ -485,8 +485,8 @@ extension AttributeProtocol { let notification = CoreStoreObjectTransformableDiff( kind: kind, - newValue: newValue as! V?, - oldValue: oldValue as! V?, + newValue: newValue as? V, + oldValue: oldValue as? V, isPrior: isPrior ) changeHandler(