From 17113ca41a020a6c37d3bd859201bf716b3c6b7a Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 31 Aug 2021 08:21:38 +1000 Subject: Make Cancel methods noexcept as they may need to be used in destructors. --- src/AutoComplete.cxx | 2 +- src/AutoComplete.h | 2 +- src/CallTip.cxx | 2 +- src/CallTip.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/AutoComplete.cxx b/src/AutoComplete.cxx index 51eb0f0ee..47e942561 100644 --- a/src/AutoComplete.cxx +++ b/src/AutoComplete.cxx @@ -211,7 +211,7 @@ void AutoComplete::Show(bool show) { lb->Select(0); } -void AutoComplete::Cancel() { +void AutoComplete::Cancel() noexcept { if (lb->Created()) { lb->Clear(); lb->Destroy(); diff --git a/src/AutoComplete.h b/src/AutoComplete.h index ec7f5a115..6afdf7c3e 100644 --- a/src/AutoComplete.h +++ b/src/AutoComplete.h @@ -84,7 +84,7 @@ public: std::string GetValue(int item) const; void Show(bool show); - void Cancel(); + void Cancel() noexcept; /// Move the current list element by delta, scrolling appropriately void Move(int delta); diff --git a/src/CallTip.cxx b/src/CallTip.cxx index 43afead55..9fb1b535c 100644 --- a/src/CallTip.cxx +++ b/src/CallTip.cxx @@ -313,7 +313,7 @@ PRectangle CallTip::CallTipStart(Sci::Position pos, Point pt, int textHeight, co } } -void CallTip::CallTipCancel() { +void CallTip::CallTipCancel() noexcept { inCallTipMode = false; if (wCallTip.Created()) { wCallTip.Destroy(); diff --git a/src/CallTip.h b/src/CallTip.h index f2889d44a..dc1071baa 100644 --- a/src/CallTip.h +++ b/src/CallTip.h @@ -75,7 +75,7 @@ public: Scintilla::CharacterSet characterSet, Scintilla::Technology technology, const char *localeName, const Window &wParent); - void CallTipCancel(); + void CallTipCancel() noexcept; /// Set a range of characters to be displayed in a highlight style. /// Commonly used to highlight the current parameter. -- cgit v1.2.3