Address warnings in Xcode >= 9.3 about using %zd for NSInteger (#1026)

This commit is contained in:
Adlai Holler
2018-07-13 11:56:54 -07:00
committed by GitHub
parent 8986838b48
commit af7f71f92d
8 changed files with 20 additions and 23 deletions

View File

@@ -2225,7 +2225,7 @@ ASDISPLAYNODE_INLINE BOOL subtreeIsRasterized(ASDisplayNode *node) {
NSUInteger subnodesCount = _subnodes.count;
__instanceLock__.unlock();
if (subnodeIndex > subnodesCount || subnodeIndex < 0) {
ASDisplayNodeFailAssert(@"Cannot insert a subnode at index %zd. Count is %zd", subnodeIndex, subnodesCount);
ASDisplayNodeFailAssert(@"Cannot insert a subnode at index %ld. Count is %ld", (long)subnodeIndex, (long)subnodesCount);
return;
}
@@ -2540,7 +2540,7 @@ ASDISPLAYNODE_INLINE BOOL subtreeIsRasterized(ASDisplayNode *node) {
ASDN::MutexLocker l(__instanceLock__);
if (idx > _subnodes.count || idx < 0) {
ASDisplayNodeFailAssert(@"Cannot insert a subnode at index %zd. Count is %zd", idx, _subnodes.count);
ASDisplayNodeFailAssert(@"Cannot insert a subnode at index %ld. Count is %ld", (long)idx, (long)_subnodes.count);
return;
}