From 907c32f8149ec13c39c90424cfed018b2b1eac87 Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 17 Mar 2021 12:44:47 +1100 Subject: Mark Window::Destroy, ListBox::Clear, and Menu::Destroy as noexcept since destroying state should not throw. --- cocoa/PlatCocoa.mm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cocoa') diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index 82dd3b030..eb7a93ef1 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -1673,7 +1673,7 @@ public: int GetVisibleRows() const override; PRectangle GetDesiredRect() override; int CaretFromEdge() override; - void Clear() override; + void Clear() noexcept override; void Append(char *s, int type = -1) override; int Length() override; void Select(int n) override; @@ -1820,7 +1820,7 @@ void ListBoxImpl::ReleaseViews() { ds = nil; } -void ListBoxImpl::Clear() { +void ListBoxImpl::Clear() noexcept { maxItemWidth = 0; maxIconWidth = 0; ld.Clear(); @@ -1975,7 +1975,7 @@ ListBox *ListBox::Allocate() { //-------------------------------------------------------------------------------------------------- -void Window::Destroy() { +void Window::Destroy() noexcept { ListBoxImpl *listbox = dynamic_cast(this); if (listbox) { listbox->ReleaseViews(); @@ -2025,7 +2025,7 @@ void Menu::CreatePopUp() { //-------------------------------------------------------------------------------------------------- -void Menu::Destroy() { +void Menu::Destroy() noexcept { CFBridgingRelease(mid); mid = nullptr; } -- cgit v1.2.3