* Bindings::pressed didn't use a temporary to store the result of "itr

!= end()" test.

* Properly clean up trailing '/' in EntryList::set_root_dir(...) and
fixed EntryList::make_directory so it actually makes them.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@776 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-09-11 13:50:28 +00:00
parent 407824c9c8
commit 3084847508
2 changed files with 6 additions and 9 deletions
+4 -3
View File
@@ -49,10 +49,11 @@ Bindings::pressed(int key) {
const_iterator itr = find(key);
if (itr != end())
itr->second();
if (itr == end())
return false;
return itr != end();
itr->second();
return true;
}
}
+2 -6
View File
@@ -223,9 +223,6 @@ Download::activate_display(Display displayType, bool focusDisplay) {
// Cleanup previous state.
switch (m_state) {
case DISPLAY_MENU:
break;
case DISPLAY_PEER_LIST:
case DISPLAY_INFO:
case DISPLAY_FILE_LIST:
@@ -238,6 +235,7 @@ Download::activate_display(Display displayType, bool focusDisplay) {
frame->clear();
break;
case DISPLAY_MENU:
case DISPLAY_MAX_SIZE:
break;
}
@@ -247,9 +245,6 @@ Download::activate_display(Display displayType, bool focusDisplay) {
// Initialize new state.
switch (displayType) {
case DISPLAY_MENU:
break;
case DISPLAY_PEER_LIST:
case DISPLAY_INFO:
case DISPLAY_FILE_LIST:
@@ -262,6 +257,7 @@ Download::activate_display(Display displayType, bool focusDisplay) {
m_uiArray[displayType]->activate(frame->frame(1), focusDisplay);
break;
case DISPLAY_MENU:
case DISPLAY_MAX_SIZE:
break;
}