a few more "postfix to prefix" operator++ changes

This commit is contained in:
Andrzej Rybczak
2009-08-02 09:58:30 +02:00
parent d9b844fce2
commit e5e8261c40

View File

@@ -735,7 +735,7 @@ int main(int argc, char *argv[])
myPlaylist->UpdateTimer(); myPlaylist->UpdateTimer();
for (std::vector<size_t>::iterator it = list.begin(); it != list.end(); ++it) for (std::vector<size_t>::iterator it = list.begin(); it != list.end(); ++it)
{ {
(*it)--; --*it;
myPlaylist->Main()->at((*it)+1).SetPosition(*it); myPlaylist->Main()->at((*it)+1).SetPosition(*it);
myPlaylist->Main()->at(*it).SetPosition((*it)+1); myPlaylist->Main()->at(*it).SetPosition((*it)+1);
myPlaylist->Main()->Swap(*it, (*it)+1); myPlaylist->Main()->Swap(*it, (*it)+1);
@@ -761,7 +761,7 @@ int main(int argc, char *argv[])
TraceMpdStatus(); TraceMpdStatus();
Playlist::BlockUpdate = 1; Playlist::BlockUpdate = 1;
myPlaylist->UpdateTimer(); myPlaylist->UpdateTimer();
to--; --to;
myPlaylist->Main()->at(from).SetPosition(to); myPlaylist->Main()->at(from).SetPosition(to);
myPlaylist->Main()->at(to).SetPosition(from); myPlaylist->Main()->at(to).SetPosition(from);
myPlaylist->Main()->Swap(to, to+1); myPlaylist->Main()->Swap(to, to+1);
@@ -790,7 +790,7 @@ int main(int argc, char *argv[])
myPlaylist->UpdateTimer(); myPlaylist->UpdateTimer();
for (std::vector<size_t>::iterator it = list.begin(); it != list.end(); ++it) for (std::vector<size_t>::iterator it = list.begin(); it != list.end(); ++it)
{ {
(*it)--; --*it;
myPlaylistEditor->Content->Swap(*it, (*it)+1); myPlaylistEditor->Content->Swap(*it, (*it)+1);
} }
myPlaylistEditor->Content->Highlight(list[(list.size()-1)/2]); myPlaylistEditor->Content->Highlight(list[(list.size()-1)/2]);
@@ -811,7 +811,7 @@ int main(int argc, char *argv[])
{ {
TraceMpdStatus(); TraceMpdStatus();
myPlaylist->UpdateTimer(); myPlaylist->UpdateTimer();
to--; --to;
myPlaylistEditor->Content->Swap(to, to+1); myPlaylistEditor->Content->Swap(to, to+1);
myPlaylistEditor->Content->Scroll(wUp); myPlaylistEditor->Content->Scroll(wUp);
myPlaylistEditor->Content->Refresh(); myPlaylistEditor->Content->Refresh();
@@ -847,7 +847,7 @@ int main(int argc, char *argv[])
myPlaylist->UpdateTimer(); myPlaylist->UpdateTimer();
for (std::vector<size_t>::reverse_iterator it = list.rbegin(); it != list.rend(); ++it) for (std::vector<size_t>::reverse_iterator it = list.rbegin(); it != list.rend(); ++it)
{ {
(*it)++; ++*it;
myPlaylist->Main()->at((*it)-1).SetPosition(*it); myPlaylist->Main()->at((*it)-1).SetPosition(*it);
myPlaylist->Main()->at(*it).SetPosition((*it)-1); myPlaylist->Main()->at(*it).SetPosition((*it)-1);
myPlaylist->Main()->Swap(*it, (*it)-1); myPlaylist->Main()->Swap(*it, (*it)-1);
@@ -873,7 +873,7 @@ int main(int argc, char *argv[])
TraceMpdStatus(); TraceMpdStatus();
Playlist::BlockUpdate = 1; Playlist::BlockUpdate = 1;
myPlaylist->UpdateTimer(); myPlaylist->UpdateTimer();
to++; ++to;
myPlaylist->Main()->at(from).SetPosition(to); myPlaylist->Main()->at(from).SetPosition(to);
myPlaylist->Main()->at(to).SetPosition(from); myPlaylist->Main()->at(to).SetPosition(from);
myPlaylist->Main()->Swap(to, to-1); myPlaylist->Main()->Swap(to, to-1);
@@ -903,7 +903,7 @@ int main(int argc, char *argv[])
myPlaylist->UpdateTimer(); myPlaylist->UpdateTimer();
for (std::vector<size_t>::reverse_iterator it = list.rbegin(); it != list.rend(); ++it) for (std::vector<size_t>::reverse_iterator it = list.rbegin(); it != list.rend(); ++it)
{ {
(*it)++; ++*it;
myPlaylistEditor->Content->Swap(*it, (*it)-1); myPlaylistEditor->Content->Swap(*it, (*it)-1);
} }
myPlaylistEditor->Content->Highlight(list[(list.size()-1)/2]); myPlaylistEditor->Content->Highlight(list[(list.size()-1)/2]);
@@ -924,7 +924,7 @@ int main(int argc, char *argv[])
{ {
TraceMpdStatus(); TraceMpdStatus();
myPlaylist->UpdateTimer(); myPlaylist->UpdateTimer();
to++; ++to;
myPlaylistEditor->Content->Swap(to, to-1); myPlaylistEditor->Content->Swap(to, to-1);
myPlaylistEditor->Content->Scroll(wDown); myPlaylistEditor->Content->Scroll(wDown);
myPlaylistEditor->Content->Refresh(); myPlaylistEditor->Content->Refresh();