remove some unused defines

This commit is contained in:
2026-08-12 14:04:49 +03:00
parent 8bf7738e8a
commit e2c0445c1b
15 changed files with 77 additions and 128 deletions
-29
View File
@@ -461,9 +461,7 @@ public:
i.performer->postQueuedEvent(__QueuedEvent(i.slot, i.dest, i.dest_o, sender));
} else {
bool ts = sender->thread_safe_;
#ifdef PIP_HAS_THREADS
if (ts) i.dest_o->mutex_.lock();
#endif
i.dest_o->eventBegin();
sender->eventBegin();
i.dest_o->emitter_ = sender;
@@ -471,9 +469,7 @@ public:
sender->eventEnd();
if (i.dest_o->isPIObject()) {
i.dest_o->emitter_ = 0;
#ifdef PIP_HAS_THREADS
if (ts) i.dest_o->mutex_.unlock();
#endif
i.dest_o->eventEnd();
}
}
@@ -498,9 +494,7 @@ public:
i.performer->postQueuedEvent(__QueuedEvent(i.slot, i.dest, i.dest_o, sender, vl));
} else {
bool ts = sender->thread_safe_;
#ifdef PIP_HAS_THREADS
if (ts) i.dest_o->mutex_.lock();
#endif
i.dest_o->eventBegin();
sender->eventBegin();
i.dest_o->emitter_ = sender;
@@ -511,9 +505,7 @@ public:
sender->eventEnd();
if (i.dest_o->isPIObject()) {
i.dest_o->emitter_ = 0;
#ifdef PIP_HAS_THREADS
if (ts) i.dest_o->mutex_.unlock();
#endif
i.dest_o->eventEnd();
}
}
@@ -538,9 +530,7 @@ public:
i.performer->postQueuedEvent(__QueuedEvent(i.slot, i.dest, i.dest_o, sender, vl));
} else {
bool ts = sender->thread_safe_;
#ifdef PIP_HAS_THREADS
if (ts) i.dest_o->mutex_.lock();
#endif
i.dest_o->eventBegin();
sender->eventBegin();
i.dest_o->emitter_ = sender;
@@ -552,9 +542,7 @@ public:
sender->eventEnd();
if (i.dest_o->isPIObject()) {
i.dest_o->emitter_ = 0;
#ifdef PIP_HAS_THREADS
if (ts) i.dest_o->mutex_.unlock();
#endif
i.dest_o->eventEnd();
}
}
@@ -580,9 +568,7 @@ public:
i.performer->postQueuedEvent(__QueuedEvent(i.slot, i.dest, i.dest_o, sender, vl));
} else {
bool ts = sender->thread_safe_;
#ifdef PIP_HAS_THREADS
if (ts) i.dest_o->mutex_.lock();
#endif
i.dest_o->eventBegin();
sender->eventBegin();
i.dest_o->emitter_ = sender;
@@ -595,9 +581,7 @@ public:
sender->eventEnd();
if (i.dest_o->isPIObject()) {
i.dest_o->emitter_ = 0;
#ifdef PIP_HAS_THREADS
if (ts) i.dest_o->mutex_.unlock();
#endif
i.dest_o->eventEnd();
}
}
@@ -629,9 +613,7 @@ public:
i.performer->postQueuedEvent(__QueuedEvent(i.slot, i.dest, i.dest_o, sender, vl));
} else {
bool ts = sender->thread_safe_;
#ifdef PIP_HAS_THREADS
if (ts) i.dest_o->mutex_.lock();
#endif
i.dest_o->eventBegin();
sender->eventBegin();
i.dest_o->emitter_ = sender;
@@ -645,9 +627,7 @@ public:
sender->eventEnd();
if (i.dest_o->isPIObject()) {
i.dest_o->emitter_ = 0;
#ifdef PIP_HAS_THREADS
if (ts) i.dest_o->mutex_.unlock();
#endif
i.dest_o->eventEnd();
}
}
@@ -658,7 +638,6 @@ public:
//! \~english Returns the first live object with name "name", or \c nullptr.
//! \~russian Возвращает первый живой объект с именем "name", либо \c nullptr.
#ifdef PIP_HAS_THREADS
static PIObject * findByName(const PIString & name) {
PIMutexLocker _ml(mutexObjects());
for (auto * i: PIObject::objects()) {
@@ -667,7 +646,6 @@ public:
}
return nullptr;
}
#endif
//! \~english Returns whether this pointer still refers to a live %PIObject instance.
//! \~russian Возвращает, указывает ли этот указатель на ещё существующий экземпляр %PIObject.
@@ -675,7 +653,6 @@ public:
//! \~english Returns whether this object belongs to class "T" or one of its registered descendants.
//! \~russian Возвращает, принадлежит ли этот объект классу "T" или одному из его зарегистрированных потомков.
#ifdef PIP_HAS_THREADS
template<typename T>
bool isTypeOf() const {
if (!isPIObject()) return false;
@@ -690,7 +667,6 @@ public:
if (!isTypeOf<T>()) return (T *)nullptr;
return (T *)this;
}
#endif
//! \~english Returns whether "o" points to a live %PIObject instance.
//! \~russian Возвращает, указывает ли "o" на ещё существующий экземпляр %PIObject.
@@ -859,13 +835,8 @@ private:
PIObject * emitter_;
std::atomic_int in_event_cnt;
#ifdef PIP_HAS_THREADS
PIMutex mutex_, mutex_connect, mutex_queue;
bool thread_safe_, proc_event_queue;
#else
PIMutex mutex_, mutex_connect, mutex_queue;
bool thread_safe_ = false, proc_event_queue = false;
#endif
};
#ifdef PIP_HAS_THREADS