Commit e3d36f21 authored by Pavel Vainerman's avatar Pavel Vainerman

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

parent ae2f29f5
......@@ -130,18 +130,22 @@ class UniSetActivator:
struct Info
{
Info( pid_t p ):msgpid(p){}
pid_t msgpid; // pid порожденого потока обработки сообщений
};
struct OInfo:
public Info
{
OInfo( UniSetObject* o, pid_t p ):Info(p),obj(o){}
UniSetObject* obj;
};
struct MInfo:
public Info
{
MInfo( UniSetManager* m, pid_t p ):Info(p),mnr(m){}
UniSetManager* mnr;
};
......
......@@ -383,20 +383,10 @@ void UniSetActivator::work()
void UniSetActivator::getinfo()
{
for( auto it=beginMList(); it!=endMList(); ++it )
{
MInfo mi;
mi.mnr = (*it);
mi.msgpid = (*it)->getMsgPID();
lstMInfo.push_back(mi);
}
lstMInfo.emplace_back( (*it), (*it)->getMsgPID() );
for( auto it=beginOList(); it!= endOList(); ++it )
{
OInfo oi;
oi.obj = (*it);
oi.msgpid = (*it)->getMsgPID();
lstOInfo.push_back(oi);
}
lstOInfo.emplace_back( (*it), (*it)->getMsgPID() );
}
// ------------------------------------------------------------------------------------------
void UniSetActivator::sysCommand( const UniSetTypes::SystemMessage *sm )
......
......@@ -211,7 +211,7 @@ std::list<std::string> UniSetTypes::explode_str( const string& str, char sep )
string s(str.substr(prev,pos-prev));
if( !s.empty() )
{
l.push_back(s);
l.emplace_back(s);
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