aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-05-14 13:42:24 +1000
committerNeil <nyamatongwe@gmail.com>2018-05-14 13:42:24 +1000
commit8e94953b2d9f7d946445759fe31d169879b680c8 (patch)
treea5f38b198b2c82cec50b3bbe8def5907e6358ac2 /cocoa
parent13c4548805a2a5ef718fc5dfa6f77bb60c6bed2b (diff)
downloadscintilla-mirror-8e94953b2d9f7d946445759fe31d169879b680c8.tar.gz
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.
Diffstat (limited to 'cocoa')
-rw-r--r--cocoa/PlatCocoa.mm14
1 files changed, 7 insertions, 7 deletions
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)
{
}