From 07f380d61a8f939e672dd1b07cc871dc799bdbc2 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Wed, 3 Apr 2019 08:47:44 -0700 Subject: Fix random Xcode 10.2 failures from unused vars and references to local objects. Modified llwindowmacosx to pass some things by value instead. --- indra/llui/lllayoutstack.cpp | 1 - indra/llwindow/llwindowmacosx-objc.h | 6 +++--- indra/llwindow/llwindowmacosx-objc.mm | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 69246a2f57..ce8dbb1f66 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -510,7 +510,6 @@ LLLayoutPanel* LLLayoutStack::findEmbeddedPanel(LLPanel* panelp) const { if (!panelp) return NULL; - e_panel_list_t::const_iterator panel_it; BOOST_FOREACH(LLLayoutPanel* p, mPanels) { if (p == panelp) diff --git a/indra/llwindow/llwindowmacosx-objc.h b/indra/llwindow/llwindowmacosx-objc.h index 34da99de19..10bd3cbb91 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); +const CGPoint getContentViewBoundsPosition(NSWindowRef window); +const CGSize getContentViewBoundsSize(NSWindowRef window); +const 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..8fece7c5c7 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) +const CGPoint getContentViewBoundsPosition(NSWindowRef window) { return [[(LLNSWindow*)window contentView] bounds].origin; } -const CGSize & getContentViewBoundsSize(NSWindowRef window) +const CGSize getContentViewBoundsSize(NSWindowRef window) { return [[(LLNSWindow*)window contentView] bounds].size; } -const CGSize & getDeviceContentViewSize(NSWindowRef window, GLViewRef view) +const CGSize getDeviceContentViewSize(NSWindowRef window, GLViewRef view) { return [(NSOpenGLView*)view convertRectToBacking:[[(LLNSWindow*)window contentView] bounds]].size; } -- cgit v1.2.3