get rid of piForeach
apply some code analyzer recommendations ICU flag now check if libicu exists prepare for more accurate growth of containers (limited PoT, then constantly increase size)
This commit is contained in:
@@ -360,9 +360,9 @@ PIObject::Connection PIObject::piConnectU(PIObject * src,
|
||||
void *addr_src(0), *addr_dest(0);
|
||||
int args(0);
|
||||
bool que = (performer != 0);
|
||||
piForeachC(__MetaFunc & fs, m_src) {
|
||||
for (const auto & fs: m_src) {
|
||||
if (addr_src != 0) break;
|
||||
piForeachC(__MetaFunc & fd, m_dest) {
|
||||
for (const auto & fd: m_dest) {
|
||||
if (addr_src != 0) break;
|
||||
if (fs.canConnectTo(fd, args)) {
|
||||
addr_src = fs.addr;
|
||||
@@ -477,7 +477,7 @@ void PIObject::piDisconnectAll() {
|
||||
PIMutexLocker _ml(mutex_connect);
|
||||
PIVector<PIObject *> cv = connectors.toVector();
|
||||
// piCout << "disconnect connectors =" << connectors.size();
|
||||
piForeach(PIObject * o, cv) {
|
||||
for (auto * o: cv) {
|
||||
// piCout << "disconnect"<< src << o;
|
||||
if (!o || (o == this)) continue;
|
||||
if (!o->isPIObject()) continue;
|
||||
@@ -496,7 +496,7 @@ void PIObject::piDisconnectAll() {
|
||||
}
|
||||
}
|
||||
// piCout << "disconnect connections =" << connections.size();
|
||||
piForeachC(PIObject::Connection & c, connections) {
|
||||
for (const auto & c: connections) {
|
||||
if (c.functor) continue;
|
||||
if (!c.dest_o) continue;
|
||||
if (!c.dest_o->isPIObject()) continue;
|
||||
@@ -512,10 +512,10 @@ void PIObject::updateConnectors() {
|
||||
// piCout << "*** updateConnectors" << this;
|
||||
connectors.clear();
|
||||
PIMutexLocker _ml(mutexObjects());
|
||||
piForeach(PIObject * o, objects()) {
|
||||
for (auto * o: objects()) {
|
||||
if (o == this) continue;
|
||||
PIVector<Connection> & oc(o->connections);
|
||||
piForeach(Connection & c, oc)
|
||||
for (auto & c: oc)
|
||||
if (c.dest == this) connectors << o;
|
||||
}
|
||||
}
|
||||
@@ -551,7 +551,7 @@ void PIObject::callQueuedEvents() {
|
||||
PIVector<__QueuedEvent> qe = events_queue;
|
||||
events_queue.clear();
|
||||
mutex_queue.unlock();
|
||||
piForeachC(__QueuedEvent & e, qe) {
|
||||
for (const auto & e: qe) {
|
||||
if (e.dest_o->thread_safe_) e.dest_o->mutex_.lock();
|
||||
e.dest_o->emitter_ = e.src;
|
||||
callAddrV(e.slot, e.dest, e.values.size_s(), e.values);
|
||||
|
||||
Reference in New Issue
Block a user