From 8e94953b2d9f7d946445759fe31d169879b680c8 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 14 May 2018 13:42:24 +1000 Subject: Backport: Modernize Platform.h (1) - noexcept, const, standard methods. Changes made to FontParameters, Font, Window, ListBoxEvent, ListBox, Menu, DynamicLibrary, and Platform. Backport of changeset 6938:a42c7cc3254b. --- cocoa/PlatCocoa.mm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'cocoa') diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index 3de8139ea..73d528d00 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -75,7 +75,7 @@ inline CGRect PRectangleToCGRect(PRectangle& rc) //----------------- Font --------------------------------------------------------------------------- -Font::Font(): fid(0) +Font::Font() noexcept : fid(0) { } @@ -1082,7 +1082,7 @@ static CGFloat ScreenMax() //-------------------------------------------------------------------------------------------------- -PRectangle Window::GetPosition() +PRectangle Window::GetPosition() const { if (wid) { @@ -1146,9 +1146,9 @@ void Window::SetPosition(PRectangle rc) //-------------------------------------------------------------------------------------------------- -void Window::SetPositionRelative(PRectangle rc, Window window) +void Window::SetPositionRelative(PRectangle rc, const Window *window) { - PRectangle rcOther = window.GetPosition(); + PRectangle rcOther = window->GetPosition(); rc.left += rcOther.left; rc.right += rcOther.left; rc.top += rcOther.top; @@ -1158,7 +1158,7 @@ void Window::SetPositionRelative(PRectangle rc, Window window) //-------------------------------------------------------------------------------------------------- -PRectangle Window::GetClientPosition() +PRectangle Window::GetClientPosition() const { // This means, in MacOS X terms, get the "frame bounds". Call GetPosition, just like on Win32. return GetPosition(); @@ -1868,7 +1868,7 @@ void ListBoxImpl::SelectionChange() { // ListBox is implemented by the ListBoxImpl class. -ListBox::ListBox() +ListBox::ListBox() noexcept { } @@ -1926,7 +1926,7 @@ void Window::Destroy() //----------------- Menu --------------------------------------------------------------------------- -Menu::Menu() +Menu::Menu() noexcept : mid(0) { } -- cgit v1.2.3