Skip to content

Commit 0561c88

Browse files
committed
Add const qualifier to Window getter methods
1 parent c07bb10 commit 0561c88

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/platform/macos/window_macos.mm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
[pimpl_->ns_window_ setMinSize:NSMakeSize(size.width, size.height)];
158158
}
159159

160-
Size Window::GetMinimumSize() {
160+
Size Window::GetMinimumSize() const {
161161
NSSize size = [pimpl_->ns_window_ minSize];
162162
return Size{static_cast<double>(size.width), static_cast<double>(size.height)};
163163
}
@@ -166,7 +166,7 @@
166166
[pimpl_->ns_window_ setMaxSize:NSMakeSize(size.width, size.height)];
167167
}
168168

169-
Size Window::GetMaximumSize() {
169+
Size Window::GetMaximumSize() const {
170170
NSSize size = [pimpl_->ns_window_ maxSize];
171171
return Size{static_cast<double>(size.width), static_cast<double>(size.height)};
172172
}
@@ -247,7 +247,7 @@
247247
[pimpl_->ns_window_ setLevel:is_always_on_top ? NSFloatingWindowLevel : NSNormalWindowLevel];
248248
}
249249

250-
bool Window::IsAlwaysOnTop() {
250+
bool Window::IsAlwaysOnTop() const {
251251
return [pimpl_->ns_window_ level] == NSFloatingWindowLevel;
252252
}
253253

@@ -259,7 +259,7 @@
259259
[pimpl_->ns_window_ setFrameOrigin:bottomLeft];
260260
}
261261

262-
Point Window::GetPosition() {
262+
Point Window::GetPosition() const {
263263
NSRect frame = [pimpl_->ns_window_ frame];
264264
Point point = {static_cast<double>(frame.origin.x), static_cast<double>(frame.origin.y)};
265265
return point;
@@ -269,7 +269,7 @@
269269
[pimpl_->ns_window_ setTitle:[NSString stringWithUTF8String:title.c_str()]];
270270
}
271271

272-
std::string Window::GetTitle() {
272+
std::string Window::GetTitle() const {
273273
NSString* title = [pimpl_->ns_window_ title];
274274
return title ? std::string([title UTF8String]) : std::string();
275275
}

0 commit comments

Comments
 (0)