mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-18 10:02:41 -05:00
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:
parent
490b88c16a
commit
ebd5da5e83
4 changed files with 13 additions and 26 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue