// // ASEqualityHelpers.h // AsyncDisplayKit // // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. // This source code is licensed under the BSD-style license found in the // LICENSE file in the root directory of this source tree. An additional grant // of patent rights can be found in the PATENTS file in the same directory. // #import /** @abstract Correctly equates two objects, including cases where both objects are nil. The latter is a case where `isEqual:` fails. @param obj The first object in the comparison. Can be nil. @param otherObj The second object in the comparison. Can be nil. @result YES if the objects are equal, including cases where both object are nil. */ ASDISPLAYNODE_INLINE BOOL ASObjectIsEqual(id obj, id otherObj) { return obj == otherObj || [obj isEqual:otherObj]; }