diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2019-04-25 15:11:55 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2019-04-25 15:11:55 -0400 |
commit | 468fbd6b515cf321834e0056adde9b29e07ccffc (patch) | |
tree | f090a12e5c6ed5f993682835f772007f33ceef04 /indra/llwindow | |
parent | 778bfc932f1b107c1bf79e11b66e2c467c58cc26 (diff) |
Return CGPoint and CGSize by value, not const ref to temporary.
Diffstat (limited to 'indra/llwindow')
-rw-r--r-- | indra/llwindow/llwindowmacosx-objc.h | 6 | ||||
-rw-r--r-- | indra/llwindow/llwindowmacosx-objc.mm | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/indra/llwindow/llwindowmacosx-objc.h b/indra/llwindow/llwindowmacosx-objc.h index 34da99de19..99af161102 100644 --- a/indra/llwindow/llwindowmacosx-objc.h +++ b/indra/llwindow/llwindowmacosx-objc.h @@ -110,9 +110,9 @@ void glSwapBuffers(void* context); CGLContextObj getCGLContextObj(GLViewRef view); unsigned long getVramSize(GLViewRef view); float getDeviceUnitSize(GLViewRef view); -const CGPoint & getContentViewBoundsPosition(NSWindowRef window); -const CGSize & getContentViewBoundsSize(NSWindowRef window); -const CGSize & getDeviceContentViewSize(NSWindowRef window, GLViewRef view); +CGPoint getContentViewBoundsPosition(NSWindowRef window); +CGSize getContentViewBoundsSize(NSWindowRef window); +CGSize getDeviceContentViewSize(NSWindowRef window, GLViewRef view); void getWindowSize(NSWindowRef window, float* size); void setWindowSize(NSWindowRef window, int width, int height); void getCursorPos(NSWindowRef window, float* pos); diff --git a/indra/llwindow/llwindowmacosx-objc.mm b/indra/llwindow/llwindowmacosx-objc.mm index c3eb9b8c8a..f895c17643 100644 --- a/indra/llwindow/llwindowmacosx-objc.mm +++ b/indra/llwindow/llwindowmacosx-objc.mm @@ -258,17 +258,17 @@ float getDeviceUnitSize(GLViewRef view) return [(LLOpenGLView*)view convertSizeToBacking:NSMakeSize(1, 1)].width; } -const CGPoint & getContentViewBoundsPosition(NSWindowRef window) +CGPoint getContentViewBoundsPosition(NSWindowRef window) { return [[(LLNSWindow*)window contentView] bounds].origin; } -const CGSize & getContentViewBoundsSize(NSWindowRef window) +CGSize getContentViewBoundsSize(NSWindowRef window) { return [[(LLNSWindow*)window contentView] bounds].size; } -const CGSize & getDeviceContentViewSize(NSWindowRef window, GLViewRef view) +CGSize getDeviceContentViewSize(NSWindowRef window, GLViewRef view) { return [(NSOpenGLView*)view convertRectToBacking:[[(LLNSWindow*)window contentView] bounds]].size; } |