mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-08 00:55:13 -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
|
@ -499,7 +499,7 @@ bool GxsGroupFrameDialog::navigate(const RsGxsGroupId groupId, const RsGxsMessag
|
|||
// QTreeWidgetItemIterator itemIterator(ui->threadTreeWidget);
|
||||
// QTreeWidgetItem *item = NULL;
|
||||
// while ((item = *itemIterator) != NULL) {
|
||||
// itemIterator++;
|
||||
// ++itemIterator;
|
||||
//
|
||||
// if (item->data(COLUMN_THREAD_DATA, ROLE_THREAD_MSGID).toString().toStdString() == msgId) {
|
||||
// ui->threadTreeWidget->setCurrentItem(item);
|
||||
|
@ -685,7 +685,7 @@ void GxsGroupFrameDialog::insertGroupsData(const std::list<RsGroupMetaData> &gro
|
|||
QList<GroupItemInfo> otherList;
|
||||
std::multimap<uint32_t, GroupItemInfo> popMap;
|
||||
|
||||
for (it = groupList.begin(); it != groupList.end(); it++) {
|
||||
for (it = groupList.begin(); it != groupList.end(); ++it) {
|
||||
/* sort it into Publish (Own), Subscribed, Popular and Other */
|
||||
uint32_t flags = it->mSubscribeFlags;
|
||||
|
||||
|
@ -721,12 +721,12 @@ void GxsGroupFrameDialog::insertGroupsData(const std::list<RsGroupMetaData> &gro
|
|||
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 {
|
||||
|
@ -756,10 +756,10 @@ void GxsGroupFrameDialog::updateMessageSummaryList(RsGxsGroupId groupId)
|
|||
|
||||
if (groupId.isNull()) {
|
||||
QTreeWidgetItem *items[2] = { mYourGroups, mSubscribedGroups };
|
||||
for (int item = 0; item < 2; item++) {
|
||||
for (int item = 0; item < 2; ++item) {
|
||||
int child;
|
||||
int childCount = items[item]->childCount();
|
||||
for (child = 0; child < childCount; child++) {
|
||||
for (child = 0; child < childCount; ++child) {
|
||||
QTreeWidgetItem *childItem = items[item]->child(child);
|
||||
QString childId = ui->groupTreeWidget->itemId(childItem);
|
||||
if (childId.isEmpty()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue