refactor: rename PIP_NO_\* to PIP_HAS_\* with inverted logic
All feature flags now use positive naming (enabled by default): - PIP_HAS_FILESYSTEM, PIP_HAS_THREADS, PIP_HAS_SOCKET - PIP_HAS_PROCESS, PIP_HAS_DYNLIB, PIP_HAS_FFT, PIP_HAS_SERIAL Preprocessor guards inverted: - #ifndef PIP_NO_X → #ifdef PIP_HAS_X - #ifdef PIP_NO_X → #ifndef PIP_HAS_X CMake options default ON instead of OFF. Platform blocks set flags OFF to disable features. 85 files transformed via Python script + 2 manual fixes.
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
#include "pifile.h"
|
||||
#include "pithread.h"
|
||||
|
||||
#ifndef PIP_NO_THREADS
|
||||
#ifdef PIP_HAS_THREADS
|
||||
|
||||
//! \~\ingroup Application
|
||||
//! \~\brief
|
||||
@@ -206,12 +206,12 @@ public:
|
||||
PIString name;
|
||||
};
|
||||
|
||||
# ifndef PIP_NO_PROCESS
|
||||
# ifdef PIP_HAS_PROCESS
|
||||
|
||||
//! \~english Starts monitoring the process with PID "pID" using the given update interval.
|
||||
//! \~russian Запускает мониторинг процесса с PID "pID" с указанным интервалом обновления.
|
||||
bool startOnProcess(int pID, PISystemTime interval = PISystemTime::fromSeconds(1.));
|
||||
# endif // PIP_NO_PROCESS
|
||||
# endif // PIP_HAS_PROCESS
|
||||
|
||||
//! \~english Starts monitoring the current application process.
|
||||
//! \~russian Запускает мониторинг текущего процесса приложения.
|
||||
@@ -272,9 +272,9 @@ private:
|
||||
PIMap<llong, PIString> tbid;
|
||||
mutable PIMutex stat_mutex;
|
||||
int pID_, page_size, cpu_count, cycle;
|
||||
# ifndef PIP_NO_PROCESS
|
||||
# ifdef PIP_HAS_PROCESS
|
||||
PRIVATE_DECLARATION(PIP_EXPORT)
|
||||
# endif // PIP_NO_PROCESS
|
||||
# endif // PIP_HAS_PROCESS
|
||||
|
||||
class PIP_EXPORT Pool {
|
||||
friend class PISystemMonitor;
|
||||
@@ -338,5 +338,5 @@ BINARY_STREAM_READ(PISystemMonitor::ThreadStats) {
|
||||
return s;
|
||||
}
|
||||
|
||||
#endif // PIP_NO_THREADS
|
||||
#endif // PIP_HAS_THREADS
|
||||
#endif // PISYSTEMMONITOR_H
|
||||
|
||||
Reference in New Issue
Block a user