From a7234e28b039679073f8c620459575c916c70ccc Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Wed, 11 Nov 2020 04:03:21 -0500 Subject: [PATCH] Random cleanup --- indra/llcommon/llerror.cpp | 5 ++--- indra/llcommon/llstring.cpp | 2 +- indra/llwindow/llappdelegate-objc.h | 5 +++-- indra/llwindow/llwindowmacosx.cpp | 7 +------ 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 0270d191ae6..0d20d186056 100644 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -1303,15 +1303,14 @@ namespace { bool checkLevelMap(const LevelMap& map, const std::string& key, LLError::ELevel& level) { - bool stop_checking; LevelMap::const_iterator i = map.find(key); if (i == map.end()) { - return stop_checking = false; + return false; } level = i->second; - return stop_checking = true; + return true; } bool checkLevelMap( const LevelMap& map, diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index a7beab3e2a3..903ceea49dc 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -201,7 +201,7 @@ S32 utf16chars_to_wchar(const U16* inchars, llwchar* outchar) { const U16* base = inchars; U16 cur_char = *inchars++; - llwchar char32 = cur_char; + llwchar char32; if ((cur_char >= 0xD800) && (cur_char <= 0xDFFF)) { // Surrogates diff --git a/indra/llwindow/llappdelegate-objc.h b/indra/llwindow/llappdelegate-objc.h index 0b38647b4a7..a3f5f1e20e5 100644 --- a/indra/llwindow/llappdelegate-objc.h +++ b/indra/llwindow/llappdelegate-objc.h @@ -27,6 +27,9 @@ #import <Cocoa/Cocoa.h> #import "llopenglview-objc.h" +@interface LLApplication : NSApplication +@end + @interface LLAppDelegate : NSObject <NSApplicationDelegate> { LLNSWindow *window; NSWindow *inputWindow; @@ -47,5 +50,3 @@ - (bool) romanScript; @end -@interface LLApplication : NSApplication -@end diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 1c55406bf70..f5e49633805 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -597,8 +597,6 @@ void LLWindowMacOSX::getMouseDeltas(float* delta) BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits, BOOL fullscreen, BOOL disable_vsync) { - BOOL glNeedsInit = FALSE; - mFullscreen = fullscreen; if (mWindow == NULL) @@ -612,10 +610,7 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits // Get the view instead. mGLView = createOpenGLView(mWindow, mFSAASamples, !disable_vsync); mContext = getCGLContextObj(mGLView); - - // Since we just created the context, it needs to be set up. - glNeedsInit = TRUE; - + gGLManager.mVRAM = getVramSize(mGLView); } -- GitLab