mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-19 11:54:22 -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
|
@ -289,7 +289,7 @@ void GxsChannelPostItem::loadPost(const RsGxsChannelPost &post)
|
|||
|
||||
if (mFileItems.empty() == false) {
|
||||
std::list<SubFileItem *>::iterator it;
|
||||
for(it = mFileItems.begin(); it != mFileItems.end(); it++)
|
||||
for(it = mFileItems.begin(); it != mFileItems.end(); ++it)
|
||||
{
|
||||
delete(*it);
|
||||
}
|
||||
|
@ -297,7 +297,7 @@ void GxsChannelPostItem::loadPost(const RsGxsChannelPost &post)
|
|||
}
|
||||
|
||||
std::list<RsGxsFile>::const_iterator it;
|
||||
for(it = post.mFiles.begin(); it != post.mFiles.end(); it++)
|
||||
for(it = post.mFiles.begin(); it != post.mFiles.end(); ++it)
|
||||
{
|
||||
/* add file */
|
||||
std::string path;
|
||||
|
@ -390,20 +390,20 @@ void GxsChannelPostItem::updateItem()
|
|||
|
||||
/* Very slow Tick to check when all files are downloaded */
|
||||
std::list<SubFileItem *>::iterator it;
|
||||
for(it = mFileItems.begin(); it != mFileItems.end(); it++)
|
||||
for(it = mFileItems.begin(); it != mFileItems.end(); ++it)
|
||||
{
|
||||
SubFileItem *item = *it;
|
||||
|
||||
if (item->isDownloadable(startable)) {
|
||||
downloadCount++;
|
||||
++downloadCount;
|
||||
if (startable) {
|
||||
downloadStartable++;
|
||||
++downloadStartable;
|
||||
}
|
||||
}
|
||||
if (item->isPlayable(startable)) {
|
||||
playCount++;
|
||||
++playCount;
|
||||
if (startable) {
|
||||
playStartable++;
|
||||
++playStartable;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -509,7 +509,7 @@ void GxsChannelPostItem::unsubscribeChannel()
|
|||
void GxsChannelPostItem::download()
|
||||
{
|
||||
std::list<SubFileItem *>::iterator it;
|
||||
for(it = mFileItems.begin(); it != mFileItems.end(); it++)
|
||||
for(it = mFileItems.begin(); it != mFileItems.end(); ++it)
|
||||
{
|
||||
(*it)->download();
|
||||
}
|
||||
|
@ -520,7 +520,7 @@ void GxsChannelPostItem::download()
|
|||
void GxsChannelPostItem::play()
|
||||
{
|
||||
std::list<SubFileItem *>::iterator it;
|
||||
for(it = mFileItems.begin(); it != mFileItems.end(); it++)
|
||||
for(it = mFileItems.begin(); it != mFileItems.end(); ++it)
|
||||
{
|
||||
bool startable;
|
||||
if ((*it)->isPlayable(startable) && startable) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue