[Lldb-commits] [lldb] r368116 - [Gardening] Remove more dead code from IOHandler
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 6 18:50:03 PDT 2019
Author: jdevlieghere
Date: Tue Aug 6 18:50:03 2019
New Revision: 368116
URL: http://llvm.org/viewvc/llvm-project?rev=368116&view=rev
Log:
[Gardening] Remove more dead code from IOHandler
Remove more dead code and reformat the file.
Modified:
lldb/trunk/source/Core/IOHandler.cpp
Modified: lldb/trunk/source/Core/IOHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/IOHandler.cpp?rev=368116&r1=368115&r2=368116&view=diff
==============================================================================
--- lldb/trunk/source/Core/IOHandler.cpp (original)
+++ lldb/trunk/source/Core/IOHandler.cpp Tue Aug 6 18:50:03 2019
@@ -382,7 +382,7 @@ bool IOHandlerEditline::GetLine(std::str
if (GetLastError() == ERROR_OPERATION_ABORTED)
continue;
#else
- if (fgets(buffer, sizeof(buffer), in) == nullptr) {
+ if (fgets(buffer, sizeof(buffer), in) == nullptr) {
#endif
const int saved_errno = errno;
if (feof(in))
@@ -949,11 +949,6 @@ public:
}
void PutChar(int ch) { ::waddch(m_window, ch); }
void PutCString(const char *s, int len = -1) { ::waddnstr(m_window, s, len); }
- void Refresh() { ::wrefresh(m_window); }
- void DeferredRefresh() {
- // We are using panels, so we don't need to call this...
- //::wnoutrefresh(m_window);
- }
void SetBackground(int color_pair_idx) {
::wbkgd(m_window, COLOR_PAIR(color_pair_idx));
}
@@ -1239,8 +1234,6 @@ public:
void SetCanBeActive(bool b) { m_can_activate = b; }
- const WindowDelegateSP &GetDelegate() const { return m_delegate_sp; }
-
void SetDelegate(const WindowDelegateSP &delegate_sp) {
m_delegate_sp = delegate_sp;
}
@@ -1394,8 +1387,6 @@ public:
std::string &GetName() { return m_name; }
- std::string &GetKeyName() { return m_key_name; }
-
int GetDrawWidth() const {
return m_max_submenu_name_length + m_max_submenu_key_name_length + 8;
}
@@ -1549,7 +1540,6 @@ bool Menu::WindowDelegateDraw(Window &wi
menu->DrawMenuTitle(window, false);
}
window.PutCString(" |");
- window.DeferredRefresh();
} break;
case Menu::Type::Item: {
@@ -1572,7 +1562,6 @@ bool Menu::WindowDelegateDraw(Window &wi
submenus[i]->DrawMenuTitle(window, is_selected);
}
window.MoveCursor(cursor_x, cursor_y);
- window.DeferredRefresh();
} break;
default:
@@ -1878,8 +1867,6 @@ public:
return m_window_sp;
}
- WindowDelegates &GetWindowDelegates() { return m_window_delegates; }
-
protected:
WindowSP m_window_sp;
WindowDelegates m_window_delegates;
@@ -1916,9 +1903,7 @@ struct Row {
return 0;
}
- void Expand() {
- expanded = true;
- }
+ void Expand() { expanded = true; }
std::vector<Row> &GetChildren() {
ProcessSP process_sp = value.GetProcessSP();
@@ -2273,8 +2258,6 @@ public:
m_selected_item = nullptr;
}
- window.DeferredRefresh();
-
return true; // Drawing handled
}
@@ -2624,14 +2607,12 @@ protected:
class ValueObjectListDelegate : public WindowDelegate {
public:
ValueObjectListDelegate()
- : m_rows(), m_selected_row(nullptr),
- m_selected_row_idx(0), m_first_visible_row(0), m_num_rows(0),
- m_max_x(0), m_max_y(0) {}
+ : m_rows(), m_selected_row(nullptr), m_selected_row_idx(0),
+ m_first_visible_row(0), m_num_rows(0), m_max_x(0), m_max_y(0) {}
ValueObjectListDelegate(ValueObjectList &valobj_list)
- : m_rows(), m_selected_row(nullptr),
- m_selected_row_idx(0), m_first_visible_row(0), m_num_rows(0),
- m_max_x(0), m_max_y(0) {
+ : m_rows(), m_selected_row(nullptr), m_selected_row_idx(0),
+ m_first_visible_row(0), m_num_rows(0), m_max_x(0), m_max_y(0) {
SetValues(valobj_list);
}
@@ -2674,8 +2655,6 @@ public:
DisplayRows(window, m_rows, g_options);
- window.DeferredRefresh();
-
// Get the selected row
m_selected_row = GetRowForRowIndex(m_selected_row_idx);
// Keep the cursor on the selected row so the highlight and the cursor are
@@ -3780,7 +3759,6 @@ public:
window.Printf(" with status = %i", exit_status);
}
}
- window.DeferredRefresh();
return true;
}
@@ -4238,7 +4216,6 @@ public:
}
}
}
- window.DeferredRefresh();
return true; // Drawing handled
}
More information about the lldb-commits
mailing list