Convert #define in Macros.h to bools
This helps ensure that compiler can verify the code inside the
bool-protected blocks at all times, not just when the #define's are
active.
Bug: 198472780
Test: compile only
Change-Id: I43920d6fdba87742a205f4c3068712e14a686bf1
diff --git a/services/inputflinger/reader/InputReader.cpp b/services/inputflinger/reader/InputReader.cpp
index 0b632f7..929e100 100644
--- a/services/inputflinger/reader/InputReader.cpp
+++ b/services/inputflinger/reader/InputReader.cpp
@@ -113,9 +113,9 @@
if (mNextTimeout != LLONG_MAX) {
nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC);
if (now >= mNextTimeout) {
-#if DEBUG_RAW_EVENTS
- ALOGD("Timeout expired, latency=%0.3fms", (now - mNextTimeout) * 0.000001f);
-#endif
+ if (DEBUG_RAW_EVENTS) {
+ ALOGD("Timeout expired, latency=%0.3fms", (now - mNextTimeout) * 0.000001f);
+ }
mNextTimeout = LLONG_MAX;
timeoutExpiredLocked(now);
}
@@ -155,9 +155,9 @@
}
batchSize += 1;
}
-#if DEBUG_RAW_EVENTS
- ALOGD("BatchSize: %zu Count: %zu", batchSize, count);
-#endif
+ if (DEBUG_RAW_EVENTS) {
+ ALOGD("BatchSize: %zu Count: %zu", batchSize, count);
+ }
processEventsForDeviceLocked(deviceId, rawEvent, batchSize);
} else {
switch (rawEvent->type) {