diff options
| author | Neil <nyamatongwe@gmail.com> | 2021-03-17 12:44:47 +1100 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2021-03-17 12:44:47 +1100 |
| commit | 907c32f8149ec13c39c90424cfed018b2b1eac87 (patch) | |
| tree | 7f557df7306cdbf0c2fc623ef271826c473ee007 /win32/PlatWin.cxx | |
| parent | b36983d5f4550bb14afe0e557831b9004dad7409 (diff) | |
| download | scintilla-mirror-907c32f8149ec13c39c90424cfed018b2b1eac87.tar.gz | |
Mark Window::Destroy, ListBox::Clear, and Menu::Destroy as noexcept since
destroying state should not throw.
Diffstat (limited to 'win32/PlatWin.cxx')
| -rw-r--r-- | win32/PlatWin.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
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<int>(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<HMENU>(mid)); mid = 0; |
