]> git.sesse.net Git - stockfish/blobdiff - src/misc.cpp
Use #ifndef instead of #if !defined
[stockfish] / src / misc.cpp
index 16ae0a6b338d5986dea9c03c0232771d4546eb20..0ca56571ee96f723e8b25991ebbc8efbc29a5e47 100644 (file)
@@ -24,7 +24,7 @@
 #include "misc.h"
 #include "thread.h"
 
-#if defined(__hpux)
+#ifdef __hpux
 #    include <sys/pstat.h>
 #endif
 
@@ -173,7 +173,7 @@ void start_logger(bool b) { Logger::start(b); }
 
 int cpu_count() {
 
-#if defined(_WIN32)
+#ifdef _WIN32
   SYSTEM_INFO s;
   GetSystemInfo(&s);
   return s.dwNumberOfProcessors;
@@ -199,7 +199,7 @@ int cpu_count() {
 
 void timed_wait(WaitCondition& sleepCond, Lock& sleepLock, int msec) {
 
-#if defined(_WIN32)
+#ifdef _WIN32
   int tm = msec;
 #else
   timespec ts, *tm = &ts;
@@ -216,7 +216,7 @@ void timed_wait(WaitCondition& sleepCond, Lock& sleepLock, int msec) {
 /// prefetch() preloads the given address in L1/L2 cache. This is a non
 /// blocking function and do not stalls the CPU waiting for data to be
 /// loaded from memory, that can be quite slow.
-#if defined(NO_PREFETCH)
+#ifdef NO_PREFETCH
 
 void prefetch(char*) {}