diff options
| -rw-r--r-- | win32/PlatWin.cxx | 40 | 
1 files changed, 20 insertions, 20 deletions
| diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 409617c97..629a49963 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -66,7 +66,7 @@  namespace Scintilla { -UINT CodePageFromCharSet(DWORD characterSet, UINT documentCodePage); +UINT CodePageFromCharSet(DWORD characterSet, UINT documentCodePage) noexcept;  RECT RectFromPRectangle(PRectangle prc) noexcept {  	RECT rc = { static_cast<LONG>(prc.left), static_cast<LONG>(prc.top), @@ -207,10 +207,10 @@ struct FormatAndMetrics {  		yDescent = 1;  		yInternalLeading = 0;  	} -	HFONT HFont(); +	HFONT HFont() noexcept;  }; -HFONT FormatAndMetrics::HFont() { +HFONT FormatAndMetrics::HFont() noexcept {  	LOGFONTW lf = {};  #if defined(USE_D2D)  	if (technology == SCWIN_TECH_GDI) { @@ -1055,7 +1055,7 @@ class SurfaceD2D : public Surface {  	int logPixelsY;  	void Clear() noexcept; -	void SetFont(const Font &font_); +	void SetFont(const Font &font_) noexcept;  public:  	SurfaceD2D() noexcept; @@ -1066,7 +1066,7 @@ public:  	SurfaceD2D &operator=(SurfaceD2D &&) = delete;  	~SurfaceD2D() override; -	void SetScale(WindowID wid); +	void SetScale(WindowID wid) noexcept;  	void Init(WindowID wid) override;  	void Init(SurfaceID sid, WindowID wid) override;  	void InitPixMap(int width, int height, Surface *surface_, WindowID wid) override; @@ -1161,7 +1161,7 @@ void SurfaceD2D::Release() {  	Clear();  } -void SurfaceD2D::SetScale(WindowID wid) { +void SurfaceD2D::SetScale(WindowID wid) noexcept {  	logPixelsY = DpiForWindow(wid);  } @@ -1232,7 +1232,7 @@ void SurfaceD2D::D2DPenColour(ColourDesired fore, int alpha) {  	}  } -void SurfaceD2D::SetFont(const Font &font_) { +void SurfaceD2D::SetFont(const Font &font_) noexcept {  	const FormatAndMetrics *pfm = FamFromFontID(font_.GetID());  	PLATFORM_ASSERT(pfm->technology == SCWIN_TECH_DIRECTWRITE);  	pTextFormat = pfm->pTextFormat; @@ -1979,7 +1979,7 @@ public:  		data.clear();  	} -	ListItemData Get(size_t index) const { +	ListItemData Get(size_t index) const noexcept {  		if (index < data.size()) {  			return data[index];  		} else { @@ -2033,23 +2033,23 @@ class ListBoxX : public ListBox {  	Point location;	// Caret location at which the list is opened  	int wheelDelta; // mouse wheel residue -	HWND GetHWND() const; +	HWND GetHWND() const noexcept;  	void AppendListItem(const char *text, const char *numword); -	static void AdjustWindowRect(PRectangle *rc, UINT dpi); +	static void AdjustWindowRect(PRectangle *rc, UINT dpi) noexcept;  	int ItemHeight() const; -	int MinClientWidth() const; +	int MinClientWidth() const noexcept;  	int TextOffset() const; -	POINT GetClientExtent() const; +	POINT GetClientExtent() const noexcept;  	POINT MinTrackSize() const;  	POINT MaxTrackSize() const; -	void SetRedraw(bool on); +	void SetRedraw(bool on) noexcept;  	void OnDoubleClick();  	void OnSelChange();  	void ResizeToCursor();  	void StartResize(WPARAM);  	LRESULT NcHitTest(WPARAM, LPARAM) const;  	void CentreItem(int n); -	void Paint(HDC); +	void Paint(HDC) noexcept;  	static LRESULT PASCAL ControlWndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam);  	static constexpr Point ItemInset {0, 0};	// Padding around whole item @@ -2146,7 +2146,7 @@ int ListBoxX::GetVisibleRows() const {  	return desiredVisibleRows;  } -HWND ListBoxX::GetHWND() const { +HWND ListBoxX::GetHWND() const noexcept {  	return HwndFromWindowID(GetID());  } @@ -2395,7 +2395,7 @@ void ListBoxX::SetList(const char *list, char separator, char typesep) {  	SetRedraw(true);  } -void ListBoxX::AdjustWindowRect(PRectangle *rc, UINT dpi) { +void ListBoxX::AdjustWindowRect(PRectangle *rc, UINT dpi) noexcept {  	RECT rcw = RectFromPRectangle(*rc);  	if (fnAdjustWindowRectExForDpi) {  		fnAdjustWindowRectExForDpi(&rcw, WS_THICKFRAME, false, WS_EX_WINDOWEDGE, dpi); @@ -2414,7 +2414,7 @@ int ListBoxX::ItemHeight() const {  	return itemHeight;  } -int ListBoxX::MinClientWidth() const { +int ListBoxX::MinClientWidth() const noexcept {  	return 12 * (aveCharWidth+aveCharWidth/3);  } @@ -2436,7 +2436,7 @@ POINT ListBoxX::MaxTrackSize() const {  	return ret;  } -void ListBoxX::SetRedraw(bool on) { +void ListBoxX::SetRedraw(bool on) noexcept {  	::SendMessage(lb, WM_SETREDRAW, on, 0);  	if (on)  		::InvalidateRect(lb, nullptr, TRUE); @@ -2588,7 +2588,7 @@ void ListBoxX::OnSelChange() {  	}  } -POINT ListBoxX::GetClientExtent() const { +POINT ListBoxX::GetClientExtent() const noexcept {  	RECT rc;  	::GetWindowRect(HwndFromWindowID(wid), &rc);  	POINT ret { rc.right - rc.left, rc.bottom - rc.top }; @@ -2610,7 +2610,7 @@ void ListBoxX::CentreItem(int n) {  }  // Performs a double-buffered paint operation to avoid flicker -void ListBoxX::Paint(HDC hDC) { +void ListBoxX::Paint(HDC hDC) noexcept {  	const POINT extent = GetClientExtent();  	HBITMAP hBitmap = ::CreateCompatibleBitmap(hDC, extent.x, extent.y);  	HDC bitmapDC = ::CreateCompatibleDC(hDC); | 
