Optimizations in RsGenExchange, p3GxsForums and p3GxsChannels.

- Removed not used variables
- avoid copy constructors
- Use swap instead of operator= to move elements of std containers
This commit is contained in:
thunder2 2015-09-08 16:34:22 +02:00
parent 490b88c16a
commit ebd5da5e83
4 changed files with 13 additions and 26 deletions

View file

@ -337,7 +337,6 @@ bool p3GxsChannels::getPostData(const uint32_t &token, std::vector<RsGxsChannelP
for(; mit != msgData.end(); ++mit)
{
RsGxsGroupId grpId = mit->first;
std::vector<RsGxsMsgItem*>& msgItems = mit->second;
std::vector<RsGxsMsgItem*>::iterator vit = msgItems.begin();

View file

@ -199,8 +199,7 @@ bool p3GxsForums::getGroupData(const uint32_t &token, std::vector<RsGxsForumGrou
if (item)
{
RsGxsForumGroup grp = item->mGroup;
item->mGroup.mMeta = item->meta;
grp.mMeta = item->mGroup.mMeta;
grp.mMeta = item->meta;
delete item;
groups.push_back(grp);
}
@ -230,7 +229,6 @@ bool p3GxsForums::getMsgData(const uint32_t &token, std::vector<RsGxsForumMsg> &
for(; mit != msgData.end(); ++mit)
{
RsGxsGroupId grpId = mit->first;
std::vector<RsGxsMsgItem*>& msgItems = mit->second;
std::vector<RsGxsMsgItem*>::iterator vit = msgItems.begin();