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. --- win32/PlatWin.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'win32') diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 657f53128..b73e7145e 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -2294,7 +2294,7 @@ Surface *Surface::Allocate(int technology) { Window::~Window() { } -void Window::Destroy() { +void Window::Destroy() noexcept { if (wid) ::DestroyWindow(HwndFromWindowID(wid)); wid = nullptr; @@ -2605,7 +2605,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; @@ -2730,7 +2730,7 @@ int ListBoxX::CaretFromEdge() { return TextOffset() + static_cast(TextInset.x + (0 - rc.left) - 1); } -void ListBoxX::Clear() { +void ListBoxX::Clear() noexcept { ListBox_ResetContent(lb); maxItemCharacters = 0; widestItem = nullptr; @@ -3398,7 +3398,7 @@ void Menu::CreatePopUp() { mid = ::CreatePopupMenu(); } -void Menu::Destroy() { +void Menu::Destroy() noexcept { if (mid) ::DestroyMenu(static_cast(mid)); mid = 0; -- cgit v1.2.3