diff options
| author | Kazu Hirata <kazu@google.com> | 2021-12-24 23:17:53 -0800 |
|---|---|---|
| committer | Kazu Hirata <kazu@google.com> | 2021-12-24 23:17:54 -0800 |
| commit | 2d303e678152fddb88dea4199c8872223232b406 (patch) | |
| tree | 5bed869bc8eeb13da3e0c9ad45cad60b09bdb5e3 /lldb/source/Core/IOHandlerCursesGUI.cpp | |
| parent | 70912420bbc39e0cf486a933182d910bfd835063 (diff) | |
Remove redundant return and continue statements (NFC)
Identified with readability-redundant-control-flow.
Diffstat (limited to 'lldb/source/Core/IOHandlerCursesGUI.cpp')
| -rw-r--r-- | lldb/source/Core/IOHandlerCursesGUI.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/lldb/source/Core/IOHandlerCursesGUI.cpp b/lldb/source/Core/IOHandlerCursesGUI.cpp index 9122117ef5ff..60207f75b7df 100644 --- a/lldb/source/Core/IOHandlerCursesGUI.cpp +++ b/lldb/source/Core/IOHandlerCursesGUI.cpp @@ -1034,7 +1034,7 @@ public: // navigates to the next or the previous field. This is particularly useful to // do in-field validation and error setting. Fields with internal navigation // should call this method on their fields. - virtual void FieldDelegateExitCallback() { return; } + virtual void FieldDelegateExitCallback() {} // Fields may have internal navigation, for instance, a List Field have // multiple internal elements, which needs to be navigated. To allow for this @@ -1055,10 +1055,10 @@ public: virtual bool FieldDelegateOnLastOrOnlyElement() { return true; } // Select the first element in the field if multiple elements exists. - virtual void FieldDelegateSelectFirstElement() { return; } + virtual void FieldDelegateSelectFirstElement() {} // Select the last element in the field if multiple elements exists. - virtual void FieldDelegateSelectLastElement() { return; } + virtual void FieldDelegateSelectLastElement() {} // Returns true if the field has an error, false otherwise. virtual bool FieldDelegateHasError() { return false; } @@ -2000,7 +2000,6 @@ public: void FieldDelegateSelectLastElement() override { m_selection_type = SelectionType::NewButton; - return; } int GetNumberOfFields() { return m_fields.size(); } @@ -2292,7 +2291,7 @@ public: virtual std::string GetName() = 0; - virtual void UpdateFieldsVisibility() { return; } + virtual void UpdateFieldsVisibility() {} FieldDelegate *GetField(uint32_t field_index) { if (field_index < m_fields.size()) @@ -3765,13 +3764,11 @@ public: void SelectNext() { if (m_selected_match != m_delegate_sp->GetNumberOfMatches() - 1) m_selected_match++; - return; } void SelectPrevious() { if (m_selected_match != 0) m_selected_match--; - return; } void ExecuteCallback(Window &window) { @@ -4608,9 +4605,7 @@ public: virtual void TreeDelegateDrawTreeItem(TreeItem &item, Window &window) = 0; virtual void TreeDelegateGenerateChildren(TreeItem &item) = 0; virtual void TreeDelegateUpdateSelection(TreeItem &root, int &selection_index, - TreeItem *&selected_item) { - return; - } + TreeItem *&selected_item) {} // This is invoked when a tree item is selected. If true is returned, the // views are updated. virtual bool TreeDelegateItemSelected(TreeItem &item) = 0; |
