Need to check availability before use of macros. (#3254)

* Need to check availability before use of macros.

* Get rid of PCH and enforce macro definition.

* Remove prefix

* Switch to global warning instead, much better.
This commit is contained in:
Garrett Moon
2017-04-10 15:06:40 -07:00
committed by GitHub
parent 68a8d5f468
commit 8c3775f5e2
26 changed files with 62 additions and 41 deletions

View File

@@ -10,6 +10,7 @@
// of patent rights can be found in the PATENTS file in the same directory.
//
#import <AsyncDisplayKit/ASAvailability.h>
#import <AsyncDisplayKit/ASRunLoopQueue.h>
#import <AsyncDisplayKit/ASThread.h>
#import <AsyncDisplayKit/ASLog.h>
@@ -282,13 +283,13 @@ static void runLoopSourceCallback(void *info) {
// itemsToProcess will be empty if _queueConsumer == nil so no need to check again.
if (itemsToProcess.empty() == false) {
#if ASRunloopQueueLoggingEnabled
#if ASRunLoopQueueLoggingEnabled
NSLog(@"<%@> - Starting processing of: %ld", self, itemsToProcess.size());
#endif
auto itemsEnd = itemsToProcess.cend();
for (auto iterator = itemsToProcess.begin(); iterator < itemsEnd; iterator++) {
_queueConsumer(*iterator, isQueueDrained && iterator == itemsEnd - 1);
#if ASRunloopQueueLoggingEnabled
#if ASRunLoopQueueLoggingEnabled
NSLog(@"<%@> - Finished processing 1 item", self);
#endif
}