From dc1a8faa4554321423f5d32f86d0963544ab729b Mon Sep 17 00:00:00 2001 From: Leo Natan Date: Sat, 8 Jul 2017 21:57:33 +0300 Subject: [PATCH] Assert the class is the same, not return nil. --- LNInterpolation/Color+Interpolation.m | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/LNInterpolation/Color+Interpolation.m b/LNInterpolation/Color+Interpolation.m index 1d0654f..0107e8a 100644 --- a/LNInterpolation/Color+Interpolation.m +++ b/LNInterpolation/Color+Interpolation.m @@ -137,10 +137,7 @@ - (instancetype)interpolateToValue:(Color*)toValue progress:(double)p - (instancetype)interpolateToValue:(id)toValue progress:(double)p behavior:(LNInterpolationBehavior)behavior { - if([toValue isKindOfClass:[Color class]] == NO) - { - return nil; - } + NSParameterAssert([toValue isKindOfClass:[Color class]]); if(p <= 0) {