mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-30 19:34:31 -04:00
optim: changed postfixed ++ into prefix++ for non trivial operators, replaced test on std::list::size() by std::list::empty() (Patch from Phenom, modified)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7627 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
491a655889
commit
b593a918a0
99 changed files with 571 additions and 571 deletions
|
@ -432,7 +432,7 @@ void WikiDialog::loadPages(const uint32_t &token)
|
|||
return;
|
||||
}
|
||||
|
||||
for(vit = snapshots.begin(); vit != snapshots.end(); vit++)
|
||||
for(vit = snapshots.begin(); vit != snapshots.end(); ++vit)
|
||||
{
|
||||
RsWikiSnapshot page = *vit;
|
||||
|
||||
|
@ -649,7 +649,7 @@ void WikiDialog::insertGroupsData(const std::list<RsGroupMetaData> &wikiList)
|
|||
QList<GroupItemInfo> otherList;
|
||||
std::multimap<uint32_t, GroupItemInfo> popMap;
|
||||
|
||||
for (it = wikiList.begin(); it != wikiList.end(); it++) {
|
||||
for (it = wikiList.begin(); it != wikiList.end(); ++it) {
|
||||
/* sort it into Publish (Own), Subscribed, Popular and Other */
|
||||
uint32_t flags = it->mSubscribeFlags;
|
||||
|
||||
|
@ -677,12 +677,12 @@ void WikiDialog::insertGroupsData(const std::list<RsGroupMetaData> &wikiList)
|
|||
uint32_t i = 0;
|
||||
uint32_t popLimit = 0;
|
||||
std::multimap<uint32_t, GroupItemInfo>::reverse_iterator rit;
|
||||
for(rit = popMap.rbegin(); ((rit != popMap.rend()) && (i < popCount)); rit++, i++) ;
|
||||
for(rit = popMap.rbegin(); ((rit != popMap.rend()) && (i < popCount)); ++rit, i++) ;
|
||||
if (rit != popMap.rend()) {
|
||||
popLimit = rit->first;
|
||||
}
|
||||
|
||||
for (rit = popMap.rbegin(); rit != popMap.rend(); rit++) {
|
||||
for (rit = popMap.rbegin(); rit != popMap.rend(); ++rit) {
|
||||
if (rit->second.popularity < (int) popLimit) {
|
||||
otherList.append(rit->second);
|
||||
} else {
|
||||
|
|
|
@ -185,7 +185,7 @@ void WikiEditDialog::updateHistoryStatus()
|
|||
|
||||
/* iterate through every History Item */
|
||||
int count = ui.treeWidget_History->topLevelItemCount();
|
||||
for(int i = 0; i < count; i++)
|
||||
for(int i = 0; i < count; ++i)
|
||||
{
|
||||
QTreeWidgetItem *item = ui.treeWidget_History->topLevelItem(i);
|
||||
bool isLatest = (i==count-1);
|
||||
|
@ -197,7 +197,7 @@ void WikiEditDialog::updateHistoryStatus()
|
|||
void WikiEditDialog::updateHistoryChildren(QTreeWidgetItem *item, bool isLatest)
|
||||
{
|
||||
int count = item->childCount();
|
||||
for(int i = 0; i < count; i++)
|
||||
for(int i = 0; i < count; ++i)
|
||||
{
|
||||
QTreeWidgetItem *child = item->child(i);
|
||||
|
||||
|
@ -701,7 +701,7 @@ void WikiEditDialog::loadBaseHistory(const uint32_t &token)
|
|||
return;
|
||||
}
|
||||
|
||||
for(vit = snapshots.begin(); vit != snapshots.end(); vit++)
|
||||
for(vit = snapshots.begin(); vit != snapshots.end(); ++vit)
|
||||
{
|
||||
RsWikiSnapshot &page = *vit;
|
||||
|
||||
|
@ -789,7 +789,7 @@ void WikiEditDialog::loadEditTreeData(const uint32_t &token)
|
|||
|
||||
// Grab the existing TopLevelItems, and insert into map.
|
||||
int itemCount = ui.treeWidget_History->topLevelItemCount();
|
||||
for (int nIndex = 0; nIndex < itemCount; nIndex++)
|
||||
for (int nIndex = 0; nIndex < itemCount; ++nIndex)
|
||||
{
|
||||
QTreeWidgetItem *item = ui.treeWidget_History->topLevelItem(nIndex);
|
||||
|
||||
|
@ -799,7 +799,7 @@ void WikiEditDialog::loadEditTreeData(const uint32_t &token)
|
|||
}
|
||||
|
||||
|
||||
for(vit = snapshots.begin(); vit != snapshots.end(); vit++)
|
||||
for(vit = snapshots.begin(); vit != snapshots.end(); ++vit)
|
||||
{
|
||||
RsWikiSnapshot &snapshot = *vit;
|
||||
|
||||
|
@ -863,7 +863,7 @@ void WikiEditDialog::loadEditTreeData(const uint32_t &token)
|
|||
items[snapshot.mMeta.mOrigMsgId] = modItem;
|
||||
}
|
||||
|
||||
for(uit = unparented.begin(); uit != unparented.end(); uit++)
|
||||
for(uit = unparented.begin(); uit != unparented.end(); ++uit)
|
||||
{
|
||||
RsGxsMessageId parentId ( (*uit)->data(WET_DATA_COLUMN, WET_ROLE_PARENTID).toString().toStdString());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue