Commit e3d36f21 authored by Pavel Vainerman's avatar Pavel Vainerman

(UnisetActivator): ещё немного "emplace_back"

parent ae2f29f5
...@@ -130,18 +130,22 @@ class UniSetActivator: ...@@ -130,18 +130,22 @@ class UniSetActivator:
struct Info struct Info
{ {
Info( pid_t p ):msgpid(p){}
pid_t msgpid; // pid порожденого потока обработки сообщений pid_t msgpid; // pid порожденого потока обработки сообщений
}; };
struct OInfo: struct OInfo:
public Info public Info
{ {
OInfo( UniSetObject* o, pid_t p ):Info(p),obj(o){}
UniSetObject* obj; UniSetObject* obj;
}; };
struct MInfo: struct MInfo:
public Info public Info
{ {
MInfo( UniSetManager* m, pid_t p ):Info(p),mnr(m){}
UniSetManager* mnr; UniSetManager* mnr;
}; };
......
...@@ -383,20 +383,10 @@ void UniSetActivator::work() ...@@ -383,20 +383,10 @@ void UniSetActivator::work()
void UniSetActivator::getinfo() void UniSetActivator::getinfo()
{ {
for( auto it=beginMList(); it!=endMList(); ++it ) for( auto it=beginMList(); it!=endMList(); ++it )
{ lstMInfo.emplace_back( (*it), (*it)->getMsgPID() );
MInfo mi;
mi.mnr = (*it);
mi.msgpid = (*it)->getMsgPID();
lstMInfo.push_back(mi);
}
for( auto it=beginOList(); it!= endOList(); ++it ) for( auto it=beginOList(); it!= endOList(); ++it )
{ lstOInfo.emplace_back( (*it), (*it)->getMsgPID() );
OInfo oi;
oi.obj = (*it);
oi.msgpid = (*it)->getMsgPID();
lstOInfo.push_back(oi);
}
} }
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
void UniSetActivator::sysCommand( const UniSetTypes::SystemMessage *sm ) void UniSetActivator::sysCommand( const UniSetTypes::SystemMessage *sm )
......
...@@ -211,7 +211,7 @@ std::list<std::string> UniSetTypes::explode_str( const string& str, char sep ) ...@@ -211,7 +211,7 @@ std::list<std::string> UniSetTypes::explode_str( const string& str, char sep )
string s(str.substr(prev,pos-prev)); string s(str.substr(prev,pos-prev));
if( !s.empty() ) if( !s.empty() )
{ {
l.push_back(s); l.emplace_back(s);
prev=pos+1; prev=pos+1;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment