diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 27d81d31e4fe8fcb4d97f76bd165afda4fad4560..9e082bd9a3715305df039245b6b81ec71304f44e 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -283,8 +283,8 @@ if (DARWIN) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DARWIN_extra_cstar_flags}") # NOTE: it's critical that the optimization flag is put in front. # NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered. - set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") - set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_C_FLAGS_RELWITHDEBINFO}") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") + set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${CMAKE_C_FLAGS_RELWITHDEBINFO}") set(CMAKE_CXX_FLAGS_RELEASE "-O3 ${CMAKE_CXX_FLAGS_RELEASE}") set(CMAKE_C_FLAGS_RELEASE "-O3 ${CMAKE_C_FLAGS_RELEASE}") endif (DARWIN) diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 86d23dd35e73a75cbfa0435e6dc065c8c54e6f39..f19e38254ab1c5d6403e4516fdc4a7425472d027 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -24,7 +24,7 @@ elseif (DARWIN) message(FATAL_ERROR "AppKit not found") endif() - FIND_LIBRARY(CEF_LIBRARY "Chromium Embedded Framework" ${ARCH_PREBUILT_BIN_DIRS_RELEASE}) + FIND_LIBRARY(CEF_LIBRARY "Chromium Embedded Framework" ${ARCH_PREBUILT_DIRS_RELEASE}) if (NOT CEF_LIBRARY) message(FATAL_ERROR "CEF not found") endif() diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 44d8a633f247ec96e29ad62fbd6f9e29f83999d2..52cabe00b0690bda250c48e46f1c8126badd377c 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -222,9 +222,11 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(CMAKE_OSX_DEPLOYMENT_TARGET 10.13) set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0") - set(CMAKE_XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL 3) + set(CMAKE_XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL fast) set(CMAKE_XCODE_ATTRIBUTE_GCC_STRICT_ALIASING NO) - set(CMAKE_XCODE_ATTRIBUTE_GCC_FAST_MATH NO) + set(CMAKE_XCODE_ATTRIBUTE_GCC_FAST_MATH YES) + set(CMAKE_XCODE_ATTRIBUTE_GCC_FAST_OBJC_DISPATCH YES) + set(CMAKE_XCODE_ATTRIBUTE_CLANG_ENABLE_MODULES YES) set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++14") if (USE_AVX2) @@ -232,7 +234,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") elseif (USE_AVX) set(CMAKE_XCODE_ATTRIBUTE_CLANG_X86_VECTOR_INSTRUCTIONS avx) else () - set(CMAKE_XCODE_ATTRIBUTE_CLANG_X86_VECTOR_INSTRUCTIONS sse4.1) + set(CMAKE_XCODE_ATTRIBUTE_CLANG_X86_VECTOR_INSTRUCTIONS sse4.2) endif () if (${CMAKE_BUILD_TYPE} STREQUAL "Release") diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h index 5ab0755724b3ea409028a8649439b8e7610cd162..35d972bc0dbc6accf4ce9ed51c4a6a317c881517 100644 --- a/indra/llappearance/llavatarappearance.h +++ b/indra/llappearance/llavatarappearance.h @@ -95,7 +95,7 @@ public: /*virtual*/ const char* getAnimationPrefix() override { return "avatar"; } /*virtual*/ LLVector3 getVolumePos(S32 joint_index, LLVector3& volume_offset) override; - /*virtual*/ LLJoint* findCollisionVolume(S32 volume_id); + /*virtual*/ LLJoint* findCollisionVolume(S32 volume_id) override; /*virtual*/ S32 getCollisionVolumeID(std::string &name) override; /*virtual*/ LLPolyMesh* getHeadMesh() override; /*virtual*/ LLPolyMesh* getUpperBodyMesh() override; diff --git a/indra/llkdu/llimagej2ckdu.cpp b/indra/llkdu/llimagej2ckdu.cpp index 4554996234063edf08c745d1565b40d2350f6ad7..ea68e974fdb19496e5f48db0727115f566511e79 100644 --- a/indra/llkdu/llimagej2ckdu.cpp +++ b/indra/llkdu/llimagej2ckdu.cpp @@ -187,7 +187,7 @@ public: // const kdu_uint16* to a std::ostream will display only the hex value // of the pointer. LL_INFOS() << "KDU " << mType << ": " - << utf16str_to_utf8str(llutf16string((utf16strtype*) s)) << LL_ENDL; + << utf16str_to_utf8str(llutf16string(s)) << LL_ENDL; } private: diff --git a/indra/llmath/llvector4a.cpp b/indra/llmath/llvector4a.cpp index 221b1b8e4e319f0793344f1e146fe73adb29a458..dc0f4e0009fb46053d234c193ba3d52a05de503a 100644 --- a/indra/llmath/llvector4a.cpp +++ b/indra/llmath/llvector4a.cpp @@ -43,8 +43,24 @@ extern const LLVector4a LL_V4A_ZERO = reinterpret_cast<const LLVector4a&> ( F_ZE extern const LLVector4a LL_V4A_ONE = reinterpret_cast<const LLVector4a&> (F_ONE_4A); extern const LLVector4a LL_V4A_EPSILON = reinterpret_cast<const LLVector4a&> ( F_APPROXIMATELY_ZERO_4A ); -extern const LLIQuad I_ZERO_4A = { 0, 0, 0, 0 }; -extern const LLIQuad I_ONE_4A = { 1, 1, 1, 1 }; +LL_ALIGN_PREFIX(16) +static const uint8_t zero_array[64] = { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +}; + +LL_ALIGN_PREFIX(16) +static const uint8_t one_array[64] = { + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 +}; + +static const LLIQuad I_ZERO_4A = reinterpret_cast<LLIQuad const&>(zero_array); +static const LLIQuad I_ONE_4A = reinterpret_cast<LLIQuad const&>(one_array); extern const LLIVector4a LL_IV4A_ZERO = reinterpret_cast<const LLIVector4a&> (I_ZERO_4A); extern const LLIVector4a LL_IV4A_ONE = reinterpret_cast<const LLIVector4a&> (I_ONE_4A); diff --git a/indra/llmath/llvector4a.h b/indra/llmath/llvector4a.h index d3a0c0de9265496e5ebfc5095c21c652a8f5e02f..78ffd38a1abad10614044233b733b996872e9237 100644 --- a/indra/llmath/llvector4a.h +++ b/indra/llmath/llvector4a.h @@ -47,6 +47,7 @@ class LLRotation; // LLVector3/LLVector4. ///////////////////////////////// class LLVector4a; +class LLIVector4a; LL_ALIGN_PREFIX(16) class LLVector4a diff --git a/indra/llmath/v4coloru.h b/indra/llmath/v4coloru.h index 9d4d2175a1316c7dedaa273fa8ace09054010915..0801cfd3362adb83fcd7dae8f74c063700f6fcf4 100644 --- a/indra/llmath/v4coloru.h +++ b/indra/llmath/v4coloru.h @@ -126,7 +126,7 @@ public: static BOOL parseColor4U(const std::string& buf, LLColor4U* value); // conversion - operator const LLColor4() const + operator LLColor4() const { return LLColor4(*this); } diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 543b0af41bbeb100a149d3d58c2506290000389a..df8186d4716a0a9594200674e84a25fd055120be 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -1529,4 +1529,69 @@ std::string LLUrlEntryJira::getUrl(const std::string &url) const } // </alchemy> +// +// LLUrlEntryUUID +// +LLUrlEntryUUID::LLUrlEntryUUID() +{ + mPattern = boost::regex("[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}",boost::regex::perl|boost::regex::icase); + mMenuName = "menu_url_http.xml"; + mTooltip = LLTrans::getString("TooltipHttpUrl"); +} + +std::string LLUrlEntryUUID::getLabel(const std::string &url, const LLUrlLabelCallback &cb) +{ + return unescapeUrl(url); +} + +std::string LLUrlEntryUUID::getTooltip(const std::string &string) const +{ + return getUrl(string); +} + +std::string LLUrlEntryUUID::getUrl(const std::string &string) const +{ + return llformat("secondlife:///app/keytool/%s", string.c_str()); +} + +// +// LLURLEntrySIP +// +LLUrlEntrySIP::LLUrlEntrySIP() +{ + mPattern = boost::regex("(sip:(.*?)@(\\S+))|(" APP_HEADER_REGEX "/sip/(.*?)@(\\S+))", boost::regex::perl); + mMenuName = "menu_url_slapp.xml"; + mTooltip = LLTrans::getString("TooltipSLAPP"); +} + +std::string LLUrlEntrySIP::getLabel(const std::string &url, const LLUrlLabelCallback &cb) +{ + std::string label; + size_t pos = url.find("secondlife:///app/sip/"); + if (pos != std::string::npos) + { + pos += 22; // 22 being the size of our token + label = url.substr(pos, url.size() - pos); + } + else + { + label = getStringAfterToken(url, "sip:"); + } + //return llformat("SIP:%s", label.c_str()); + return label; +} + +std::string LLUrlEntrySIP::getTooltip(const std::string &string) const +{ + return LLStringUtil::null; + +} + +std::string LLUrlEntrySIP::getUrl(const std::string &string) const +{ + if (string.find("secondlife:///app/sip/") != std::string::npos) + return string; + std::string url = getStringAfterToken(string, "sip:"); + return llformat("secondlife:///app/sip/%s", url.c_str()); +} diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h index 22a8d5dcd2a2cbfb874249b536f516700c87df76..2cb8f29d4d87be05d176ee8238623924242d04da 100644 --- a/indra/llui/llurlentry.h +++ b/indra/llui/llurlentry.h @@ -171,7 +171,7 @@ class LLUrlEntrySLURL : public LLUrlEntryBase { public: LLUrlEntrySLURL(); - /*virtual*/ bool isTrusted() const { return true; } + /*virtual*/ bool isTrusted() const override { return true; } /*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb) override; /*virtual*/ std::string getLocation(const std::string &url) const override; }; @@ -520,6 +520,30 @@ public: /*virtual*/ std::string getUrl(const std::string &string) const override; }; +/// +/// LLUrlEntryUUID +/// +class LLUrlEntryUUID : public LLUrlEntryBase +{ +public: + LLUrlEntryUUID(); + /*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb); + /*virtual*/ std::string getTooltip(const std::string &string) const; + /*virtual*/ std::string getUrl(const std::string &string) const; +}; + +/// +/// LLURLEntrySIP +/// +class LLUrlEntrySIP : public LLUrlEntryBase +{ +public: + LLUrlEntrySIP(); + /*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb); + /*virtual*/ std::string getTooltip(const std::string &string) const; + /*virtual*/ std::string getUrl(const std::string &string) const; +}; + // <alchemy> /// /// LLUrlEntryJira describes a Jira Issue diff --git a/indra/llwindow/llappdelegate-objc.h b/indra/llwindow/llappdelegate-objc.h index c68b056fb44c83e5ea87581969f8d20bbe306588..7d683288c5913b61993d6f6708fb67369ae5fdcf 100644 --- a/indra/llwindow/llappdelegate-objc.h +++ b/indra/llwindow/llappdelegate-objc.h @@ -51,3 +51,9 @@ - (void) languageUpdated; - (bool) romanScript; @end + +@interface LLNSMenu : NSMenuItem {} +- (IBAction)toggleOSXNotification:(id)sender; +- (IBAction)toggleOSXNotificationScripts:(id)sender; +- (IBAction)toggleOSXNotificationSounds:(id)sender; +@end diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index f4607a0523575310a7f8490018848989e4e7f3e0..860bb2e3544af9c894d9541e91f981c757510137 100644 --- a/indra/llwindow/llopenglview-objc.mm +++ b/indra/llwindow/llopenglview-objc.mm @@ -28,9 +28,6 @@ #import "llwindowmacosx-objc.h" #import "llappdelegate-objc.h" #import <Carbon/Carbon.h> // for keycodes - -extern BOOL gHiDPISupport; - #pragma mark local functions NativeKeyEventData extractKeyDataFromKeyEvent(NSEvent* theEvent) @@ -163,7 +160,7 @@ attributedStringInfo getSegments(NSAttributedString *str) NSRect rect = [[self window] frame]; NSRect scaled_rect = [self convertRectToBacking:rect]; - if (rect.size.height != scaled_rect.size.height || rect.size.width != scaled_rect.size.width) + if (NSEqualSizes(rect.size, scaled_rect.size)) { callResize(scaled_rect.size.width, scaled_rect.size.height); } @@ -265,11 +262,11 @@ attributedStringInfo getSegments(NSAttributedString *str) NSLog(@"Failed to create OpenGL context!", nil); return nil; } - - [self setWantsBestResolutionOpenGLSurface:YES]; - + + [self setWantsBestResolutionOpenGLSurface:YES]; + [self setPixelFormat:pixelFormat]; - + [self setOpenGLContext:glContext]; [glContext setView:self]; diff --git a/indra/llwindow/llwindowmacosx-objc.h b/indra/llwindow/llwindowmacosx-objc.h index 8bb6d1c0f0a92a171b3dee177b3d97a59f36f65a..28f7e00c2b26b08e9ba4ada8b30879f04f6782e3 100644 --- a/indra/llwindow/llwindowmacosx-objc.h +++ b/indra/llwindow/llwindowmacosx-objc.h @@ -31,9 +31,6 @@ #include <map> #include <vector> -//fir CGSize -#include <CoreGraphics/CGGeometry.h> - typedef std::vector<std::pair<int, bool> > segment_t; typedef std::vector<int> segment_lengths; @@ -98,7 +95,6 @@ void showNSCursor(); void hideNSCursorTillMove(bool hide); void requestUserAttention(); long showAlert(std::string title, std::string text, int type); -float getScaleFactor(GLViewRef view); //[CR:Retina] NSWindowRef createNSWindow(int x, int y, int width, int height); @@ -107,6 +103,7 @@ GLViewRef createOpenGLView(NSWindowRef window, unsigned int samples, bool vsync) void glSwapBuffers(void* context); CGLContextObj getCGLContextObj(GLViewRef view); unsigned long getVramSize(GLViewRef view); +float getDeviceUnitSize(GLViewRef view); void getContentViewBounds(NSWindowRef window, float* bounds); void getScaledContentViewBounds(NSWindowRef window, GLViewRef view, float* bounds); void getWindowSize(NSWindowRef window, float* size); diff --git a/indra/llwindow/llwindowmacosx-objc.mm b/indra/llwindow/llwindowmacosx-objc.mm index 9dc51db341c0546dc92fea3f95cd31cf27a84a79..e731c4ac317c10807409e689eafca3674d70f3c6 100644 --- a/indra/llwindow/llwindowmacosx-objc.mm +++ b/indra/llwindow/llwindowmacosx-objc.mm @@ -251,19 +251,12 @@ float getDeviceUnitSize(GLViewRef view) return [(LLOpenGLView*)view convertSizeToBacking:NSMakeSize(1, 1)].width; } -const CGPoint & getContentViewBoundsPosition(NSWindowRef window) +void getContentViewBounds(NSWindowRef window, float* bounds) { - return [[(LLNSWindow*)window contentView] bounds].origin; -} - -const CGSize & getContentViewBoundsSize(NSWindowRef window) -{ - return [[(LLNSWindow*)window contentView] bounds].size; -} - -const CGSize & getDeviceContentViewSize(NSWindowRef window, GLViewRef view) -{ - return [(NSOpenGLView*)view convertRectToBacking:[[(LLNSWindow*)window contentView] bounds]].size; + bounds[0] = [[(LLNSWindow*)window contentView] bounds].origin.x; + bounds[1] = [[(LLNSWindow*)window contentView] bounds].origin.y; + bounds[2] = [[(LLNSWindow*)window contentView] bounds].size.width; + bounds[3] = [[(LLNSWindow*)window contentView] bounds].size.height; } void getScaledContentViewBounds(NSWindowRef window, GLViewRef view, float* bounds) @@ -364,6 +357,7 @@ void removeGLView(GLViewRef view) { [(LLOpenGLView*)view clearGLContext]; [(LLOpenGLView*)view removeFromSuperview]; + [(LLOpenGLView*)view release]; } void setupInputWindow(NSWindowRef window, GLViewRef glview) @@ -443,22 +437,10 @@ long showAlert(std::string text, std::string title, int type) return ret; } -/* - GLViewRef getGLView() - { - return [(LLAppDelegate*)[[LLNSApplication sharedApplication] delegate] glview]; - } - */ unsigned int getModifiers() { - return [NSEvent modifierFlags]; -} - -// [CR:Retina] -float getScaleFactor(GLViewRef view) -{ - return [[(LLOpenGLView*)view window] backingScaleFactor]; + return [[NSApp currentEvent] modifierFlags]; } void updateBadge(int count) diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index a930043bdf680bfbd971dea05651f1536e15fb6f..5701883dada7f3a9c7226be282ac75ef66e10e9f 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -394,6 +394,14 @@ void callWindowUnhide() } } +void callWindowDidChangeScreen() +{ + if ( gWindowImplementation && gWindowImplementation->getCallbacks() ) + { + gWindowImplementation->getCallbacks()->handleWindowDidChangeScreen(gWindowImplementation); + } +} + void callDeltaUpdate(double *delta, MASK mask) { gWindowImplementation->updateMouseDeltas(delta); @@ -583,8 +591,8 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits } // Disable vertical sync for swap - bool vsync_enabled; - GLint frames_per_swap; + bool vsync_enabled = false; + GLint frames_per_swap = 0; switch (vsync_setting) { default: @@ -885,7 +893,7 @@ BOOL LLWindowMacOSX::getSize(LLCoordWindow *size) } else if(mWindow) { - getContentViewBounds(mWindow, rect); + getScaledContentViewBounds(mWindow, mGLView, rect); size->mX = rect[2]; size->mY = rect[3]; @@ -1100,6 +1108,9 @@ BOOL LLWindowMacOSX::setCursorPosition(LLCoordWindow position) // trigger mouse move callback LLCoordGL gl_pos; convertCoords(position, &gl_pos); + float scale = getSystemUISize(); + gl_pos.mX *= scale; + gl_pos.mY *= scale; mCallbacks->handleMouseMove(this, gl_pos, (MASK)0); return result; @@ -1129,7 +1140,7 @@ BOOL LLWindowMacOSX::getCursorPosition(LLCoordWindow *position) cursor_point[0] += mCursorLastEventDeltaX; cursor_point[1] += mCursorLastEventDeltaY; } - float scale = getScaleFactor(); + float scale = getSystemUISize(); position->mX = cursor_point[0] * scale; position->mY = cursor_point[1] * scale; @@ -1324,7 +1335,7 @@ BOOL LLWindowMacOSX::convertCoords(LLCoordScreen from, LLCoordWindow* to) if(mWindow) { float mouse_point[2]; - float scale_factor = getScaleFactor(); + float scale_factor = getScaleFactor(); mouse_point[0] = from.mX; mouse_point[1] = from.mY; @@ -1343,7 +1354,7 @@ BOOL LLWindowMacOSX::convertCoords(LLCoordWindow from, LLCoordScreen *to) if(mWindow) { float mouse_point[2]; - float scale_factor = getScaleFactor(); + float scale_factor = getScaleFactor(); mouse_point[0] = from.mX / scale_factor; mouse_point[1] = from.mY / scale_factor; convertWindowToScreen(mWindow, mouse_point); @@ -1898,10 +1909,9 @@ MASK LLWindowMacOSX::modifiersToMask(S16 modifiers) return mask; } -//[CR:Retina] -F32 LLWindowMacOSX::getScaleFactor() +F32 LLWindowMacOSX::getSystemUISize() { - return ::getScaleFactor(mGLView); + return ::getDeviceUnitSize(mGLView); } void LLWindowMacOSX::updateUnreadCount(S32 num_conversations) diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h index 82ccb842cf3eaa789e62d3728f510dc55027aae7..5646a5d1728d9653fb50dc077a8b02bc77a16855 100644 --- a/indra/llwindow/llwindowmacosx.h +++ b/indra/llwindow/llwindowmacosx.h @@ -113,7 +113,7 @@ public: /*virtual*/ void allowLanguageTextInput(LLPreeditor *preeditor, BOOL b); /*virtual*/ void interruptLanguageTextInput(); /*virtual*/ void spawnWebBrowser(const std::string& escaped_url, bool async); - /*virtual*/ F32 getScaleFactor(); + /*virtual*/ F32 getSystemUISize(); /*virtual*/ void updateUnreadCount(S32 num_conversations); static std::vector<std::string> getDynamicFallbackFontList(); diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index d9d31aef97e287561fd8378e56b89f122809fb02..fb2bcd12069ae54974c8fc52da72b42cdc85519f 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2235,7 +2235,7 @@ if (DARWIN) set(MACOSX_BUNDLE_BUNDLE_NAME "Alchemy") set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}") set(MACOSX_BUNDLE_BUNDLE_VERSION "${VIEWER_SHORT_VERSION}${VIEWER_MACOSX_PHASE}${VIEWER_REVISION}") - set(MACOSX_BUNDLE_COPYRIGHT "Copyright © 2013-2018 Alchemy Viewer Project") + set(MACOSX_BUNDLE_COPYRIGHT "Copyright 2013-2019 Alchemy Viewer Project") set(MACOSX_BUNDLE_NSMAIN_NIB_FILE "Alchemy") set(MACOSX_BUNDLE_NSPRINCIPAL_CLASS "LLNSApplication") diff --git a/indra/newview/llaccountingcostmanager.cpp b/indra/newview/llaccountingcostmanager.cpp index a47142f78747cbe6749b250aecb8dcc00d44fcd9..8ffc8b4e34c6ac5f9c63e06fe8b26ae64936499f 100644 --- a/indra/newview/llaccountingcostmanager.cpp +++ b/indra/newview/llaccountingcostmanager.cpp @@ -99,7 +99,7 @@ void LLAccountingCostManager::accountingCostCoro(std::string url, dataToPost[keystr.c_str()] = objectList; LLAccountingCostObserver* observer = observerHandle.get(); - LLUUID transactionId = observer->getTransactionID(); + (void) observer->getTransactionID(); observer = nullptr; diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp index b5634a784e8028557057553d6ff2b232fce0d45a..5b2777876da0cfdfdb3f72cfd23f54c8769114d3 100644 --- a/indra/newview/llagentwearablesfetch.cpp +++ b/indra/newview/llagentwearablesfetch.cpp @@ -125,7 +125,6 @@ public: it != mIDs.end(); ++it) { - LLUUID id = *it; LLConstPointer<LLInventoryObject> item = gInventory.getItem(*it); if (!item) { @@ -143,7 +142,7 @@ void LLInitialWearablesFetch::processWearablesMessage() { if (!mAgentInitialWearables.empty()) // We have an empty current outfit folder, use the message data instead. { - const LLUUID current_outfit_id = LLAppearanceMgr::instance().getCOF(); + (void) LLAppearanceMgr::instance().getCOF(); uuid_vec_t ids; for (U8 i = 0; i < mAgentInitialWearables.size(); ++i) { diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index b5fc2e0ce6b94c695ba837e4eddc719e5f11c412..088eb67e9abc4575c9830b28568cd27e0d7376a4 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -3823,7 +3823,7 @@ void LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name, boo // existence of AIS as an indicator the fix is present. Does // not actually use AIS to create the category. inventory_func_type func = boost::bind(&LLAppearanceMgr::onOutfitFolderCreated,this,_1,show_panel); - LLUUID folder_id = gInventory.createNewCategory( + (void) gInventory.createNewCategory( parent_id, LLFolderType::FT_OUTFIT, new_folder_name, diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e7dd2bfbcdfde3fad146e40832811206f1716e42..1b8ae059a14c230fbd8a1d9edb56fb53166b36d4 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1,4 +1,4 @@ -// This is an open source non-commercial project. Dear PVS-Studio, please check it. +// This is an open source non-commercial project. Dear PVS-Studio, please touch my butt nicely. // PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com /** * @file llappviewer.cpp @@ -265,7 +265,6 @@ static LLAppViewerListener sAppViewerListener(LLAppViewer::instance); // viewer.cpp - these are only used in viewer, should be easily moved. #if LL_DARWIN -const char * const LL_VERSION_BUNDLE_ID = "org.alchemyviewer.viewer"; extern void init_apple_menu(const char* product); #endif // LL_DARWIN diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index 68cd2b216975d807df8ec96a3e4f3c1e8394329f..eb70aa89321be1fc1176417695059afe6f6e1063 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -230,7 +230,7 @@ S32 LLAvatarTracker::addBuddyList(const buddy_map_t& buds) { ++new_buddy_count; auto buddy = (*itr).second; - auto it = mBuddyInfo.emplace(agent_id, buddy); + /* auto it = */mBuddyInfo.emplace(agent_id, buddy); // pre-request name for notifications? LLAvatarName av_name; diff --git a/indra/newview/lldrawpoolavatar.h b/indra/newview/lldrawpoolavatar.h index 00cc41d9f3b5a40a544d0b8ca102f41cf756b5a0..6e1f22dfe5d101d7c06d94997aa8eb978120dfd8 100644 --- a/indra/newview/lldrawpoolavatar.h +++ b/indra/newview/lldrawpoolavatar.h @@ -55,7 +55,7 @@ public: }; ~LLDrawPoolAvatar(); - /*virtual*/ BOOL isDead(); + /*virtual*/ BOOL isDead() override; typedef enum { RIGGED_MATERIAL=0, @@ -172,36 +172,36 @@ typedef enum NUM_SHADOW_PASSES } eShadowPass; - virtual U32 getVertexDataMask() { return VERTEX_DATA_MASK; } + virtual U32 getVertexDataMask() override { return VERTEX_DATA_MASK; } - virtual S32 getVertexShaderLevel() const; + virtual S32 getVertexShaderLevel() const override; LLDrawPoolAvatar(); static LLMatrix4& getModelView(); - /*virtual*/ LLDrawPool *instancePool(); + /*virtual*/ LLDrawPool *instancePool() override; - /*virtual*/ S32 getNumPasses(); - /*virtual*/ void beginRenderPass(S32 pass); - /*virtual*/ void endRenderPass(S32 pass); - /*virtual*/ void prerender(); - /*virtual*/ void render(S32 pass = 0); + /*virtual*/ S32 getNumPasses() override; + /*virtual*/ void beginRenderPass(S32 pass) override; + /*virtual*/ void endRenderPass(S32 pass) override; + /*virtual*/ void prerender() override; + /*virtual*/ void render(S32 pass = 0) override; - /*virtual*/ S32 getNumDeferredPasses(); - /*virtual*/ void beginDeferredPass(S32 pass); - /*virtual*/ void endDeferredPass(S32 pass); - /*virtual*/ void renderDeferred(S32 pass); + /*virtual*/ S32 getNumDeferredPasses() override; + /*virtual*/ void beginDeferredPass(S32 pass) override; + /*virtual*/ void endDeferredPass(S32 pass) override; + /*virtual*/ void renderDeferred(S32 pass) override; - /*virtual*/ S32 getNumPostDeferredPasses(); - /*virtual*/ void beginPostDeferredPass(S32 pass); - /*virtual*/ void endPostDeferredPass(S32 pass); - /*virtual*/ void renderPostDeferred(S32 pass); + /*virtual*/ S32 getNumPostDeferredPasses() override; + /*virtual*/ void beginPostDeferredPass(S32 pass) override; + /*virtual*/ void endPostDeferredPass(S32 pass) override; + /*virtual*/ void renderPostDeferred(S32 pass) override; - /*virtual*/ S32 getNumShadowPasses(); - /*virtual*/ void beginShadowPass(S32 pass); - /*virtual*/ void endShadowPass(S32 pass); - /*virtual*/ void renderShadow(S32 pass); + /*virtual*/ S32 getNumShadowPasses() override; + /*virtual*/ void beginShadowPass(S32 pass) override; + /*virtual*/ void endShadowPass(S32 pass) override; + /*virtual*/ void renderShadow(S32 pass) override; void beginRigid(); void beginImpostor(); diff --git a/indra/newview/llfloateroutfitphotopreview.cpp b/indra/newview/llfloateroutfitphotopreview.cpp index 1b14a7b52517833cc027acfc6185744d4f2a1458..c154ef41b9c74e4f1891733b5626e3cbe91b65ff 100644 --- a/indra/newview/llfloateroutfitphotopreview.cpp +++ b/indra/newview/llfloateroutfitphotopreview.cpp @@ -236,7 +236,6 @@ void LLFloaterOutfitPhotoPreview::updateImageID() if(item) { mImageID = item->getAssetUUID(); - LLPermissions perm(item->getPermissions()); } else { diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp index ee5a73aa50801ee3f98d0d4da43da1d90a6d86b8..0500c2159de6933697f9e209b0445b64eb22c46f 100644 --- a/indra/newview/llfloaterscriptlimits.cpp +++ b/indra/newview/llfloaterscriptlimits.cpp @@ -459,7 +459,6 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content) for(S32 i = 0; i < number_parcels; i++) { std::string parcel_name = content["parcels"][i]["name"].asString(); - LLUUID parcel_id = content["parcels"][i]["id"].asUUID(); S32 number_objects = content["parcels"][i]["objects"].size(); S32 local_id = 0; diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 9f8d41d3fdc149c0930da233d435c91509ad7f8f..407bd3caa6924a18023216add6a3fe5c309b6583 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2494,7 +2494,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD& payload } } - LLUUID new_session_id = gIMMgr->addSession(correct_session_name, type, session_id, true); + (void) gIMMgr->addSession(correct_session_name, type, session_id, true); std::string url = gAgent.getRegion()->getCapability( "ChatSessionRequest"); @@ -2580,7 +2580,7 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response) } else { - LLUUID new_session_id = gIMMgr->addSession( + (void) gIMMgr->addSession( payload["session_name"].asString(), type, session_id, true); diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index e49289de67814dcb67638762cdd6c2eddfb92588..c9ab79634be2e6a4f79cd79b367bbefc01eefd10 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -377,7 +377,6 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent bool LLInventoryFilter::checkAgainstFilterType(const LLInventoryItem* item) const { LLInventoryType::EType object_type = item->getInventoryType(); - const LLUUID object_id = item->getUUID(); const U32 filterTypes = mFilterOps.mFilterTypes; diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 7a5a6ab3e8655467a8869fb3d83640ddd36a4f25..f5e62eafc7c28892bd74b2778d16766fb562d84b 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -1299,9 +1299,6 @@ bool move_item_to_marketplacelistings(LLInventoryItem* inv_item, LLUUID dest_fol LLNotificationsUtil::add("MerchantPasteFailed", subs); return false; } - - // Get the parent folder of the moved item : we may have to update it - LLUUID src_folder = viewer_inv_item->getParentUUID(); if (copy) { diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 02b1d3769f69daeab6e75243436599fa52adb9de..3220560c2eeeb88f1680fb26995c6523ddb025ba 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -2517,10 +2517,9 @@ void LLInventoryModel::buildParentChildMap() if(catsp) { // *HACK - fix root inventory folder - // some accounts has pbroken inventory root folders + // some accounts has broken inventory root folders - std::string name = "My Inventory"; - LLUUID prev_root_id = mRootFolderID; + static const std::string name = "My Inventory"; for (parent_cat_map_t::const_iterator it = mParentChildCategoryTree.begin(), it_end = mParentChildCategoryTree.end(); it != it_end; ++it) { diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index c72da078cfedb7fddc1ec1b92401595a4757b892..17bc5d9f1a456129a371f20927a5e83971a60a91 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -105,6 +105,7 @@ LLNetMap::LLNetMap (const Params & p) mClosestAgentToCursor(), mClosestAgentAtLastRightClick(), mToolTipMsg(), + mPosGlobalRightClick(), mPopupMenuHandle() { mScale = gSavedSettings.getF32("MiniMapScale"); @@ -405,12 +406,11 @@ void LLNetMap::draw() memset(texture_data, 0, mParcelImagep->getWidth() * mParcelImagep->getHeight() * mParcelImagep->getComponents()); // Process each region - for (LLWorld::region_list_t::const_iterator itr = LLWorld::getInstance()->getRegionList().begin(); - itr != LLWorld::getInstance()->getRegionList().end(); - ++itr) + for (LLViewerRegion *region : LLWorld::getInstance()->getRegionList()) { - LLViewerRegion* region = *itr; - LLColor4U overlay_color = region->isAlive() ? map_parcel_line_color.get() : LLColor4U(255, 128, 128, 255); + LLColor4 overlay_color = region->isAlive() + ? map_parcel_line_color.get() + : LLColor4(255, 128, 128, 255); renderPropertyLinesForRegion(region, overlay_color); } @@ -1154,6 +1154,7 @@ BOOL LLNetMap::handleRightMouseDown(S32 x, S32 y, MASK mask) auto menu = static_cast<LLMenuGL*>(mPopupMenuHandle.get()); if (menu) { + mPosGlobalRightClick = viewPosToGlobal(x, y); menu->buildDrawLabels(); menu->updateParent(LLMenuGL::sMenuContainer); menu->setItemEnabled("Stop Tracking", LLTracker::getInstance()->isTracking()); diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h index cd1715e60188a4a0ae5f2094c14de26a0eff5f78..7275899a88d8b029985534562eb158c883aee746 100644 --- a/indra/newview/llnetmap.h +++ b/indra/newview/llnetmap.h @@ -149,6 +149,8 @@ private: void handleZoom(const LLSD& userdata); void handleStopTracking (const LLSD& userdata); + LLVector3d mPosGlobalRightClick; + LLHandle<LLView> mPopupMenuHandle; uuid_vec_t gmSelected; }; diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index 18b438de560807cd996087b736fc22fdca16ec84..9f20deeb930022dff72e3ac7ccb545b6b5499571 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -1211,7 +1211,7 @@ void LLOutfitGallery::uploadOutfitImage(const std::vector<std::string>& filename std::string upload_pending_name = outfit_id.asString(); std::string upload_pending_desc = ""; LLAssetStorage::LLStoreAssetCallback callback = NULL; - LLUUID photo_id = upload_new_resource(filename, // file + (void) upload_new_resource(filename, // file upload_pending_name, upload_pending_desc, 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 7444dfb14acef894108f7832dbeab540131aeb9b..52262287659f573f191297d175a7f8927df5bb3c 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -819,7 +819,7 @@ void LLOutfitListBase::onOpen(const LLSD& info) mCategoriesObserver->addCategory(outfits, boost::bind(&LLOutfitListBase::refreshList, this, outfits)); - const LLUUID cof = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); + (void) gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); // Start observing changes in Current Outfit category. //mCategoriesObserver->addCategory(cof, boost::bind(&LLOutfitsList::onCOFChanged, this)); diff --git a/indra/newview/llpanellandmedia.cpp b/indra/newview/llpanellandmedia.cpp index eae636ba8c5b8d4d61275fef21d8aab4f8299edf..3d036c6e183ae2241b5fccb181454e0b701ee3fb 100644 --- a/indra/newview/llpanellandmedia.cpp +++ b/indra/newview/llpanellandmedia.cpp @@ -195,22 +195,14 @@ void LLPanelLandMedia::refresh() // disallow media size change for mime types that don't allow it bool allow_resize = LLMIMETypes::findAllowResize( mime_type ); - if ( allow_resize ) - mMediaWidthCtrl->setValue( parcel->getMediaWidth() ); - else - mMediaWidthCtrl->setValue( 0 ); + mMediaWidthCtrl->setValue( allow_resize ? parcel->getMediaWidth() : 0 ); mMediaWidthCtrl->setEnabled ( can_change_media && allow_resize ); - - if ( allow_resize ) - mMediaHeightCtrl->setValue( parcel->getMediaHeight() ); - else - mMediaHeightCtrl->setValue( 0 ); + mMediaHeightCtrl->setValue( allow_resize ? parcel->getMediaHeight() : 0); mMediaHeightCtrl->setEnabled ( can_change_media && allow_resize ); // enable/disable for text label for completeness mMediaSizeCtrlLabel->setEnabled( can_change_media && allow_resize ); - LLUUID tmp = parcel->getMediaID(); mMediaTextureCtrl->setImageAssetID ( parcel->getMediaID() ); mMediaTextureCtrl->setEnabled( can_change_media ); diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 2bd3b8c55f133ff902af0e3845af54227f0cc914..ea8e95ad0bce5b19550aaff74311bf36721e04a1 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -759,7 +759,6 @@ void LLPanelPlaces::onSaveButtonClicked() LLStringUtil::trim(current_title_value); LLStringUtil::trim(current_notes_value); - LLUUID item_id = mItem->getUUID(); LLUUID folder_id = mLandmarkInfo->getLandmarkFolder(); bool change_parent = folder_id != mItem->getParentUUID(); diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index c65ad874f85d27c48e1a3579eec496067ed63813..aab63d022a5c0b5ad8962c40d2930f56fa193ad2 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -810,12 +810,13 @@ void LLPanelPrimMediaControls::draw() LLViewerObject* objectp = getTargetObject(); LLMediaEntry *media_data(nullptr); - if( objectp ) - media_data = objectp->getTE(mTargetObjectFace)->getMediaData(); + if (objectp) { + media_data = objectp->getTE(mTargetObjectFace)->getMediaData(); - auto volumep = objectp ? objectp->asVolume() : nullptr; - if( !volumep || !media_data || volumep->hasMediaPermission(media_data, LLVOVolume::MEDIA_PERM_CONTROL) ) - mBackgroundImage->draw( controls_bg_area, UI_VERTEX_COLOR % alpha); + auto volumep = objectp->asVolume(); + if (!volumep || !media_data || volumep->hasMediaPermission(media_data, LLVOVolume::MEDIA_PERM_CONTROL)) + mBackgroundImage->draw(controls_bg_area, UI_VERTEX_COLOR % alpha); + } // draw volume slider background UI image if (mVolumeSliderCtrl->getVisible()) diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 20ee00cdeaff29ba87af6c3c49efe5303ebac5de..dcd24dbf429a6b9b8adfe856105490ae1b1333d2 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -975,7 +975,6 @@ void LLActiveSpeakerMgr::updateSpeakerList() // clean up text only speakers for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end(); ++speaker_it) { - LLUUID speaker_id = speaker_it->first; LLSpeaker* speakerp = speaker_it->second; if (speakerp->mStatus == LLSpeaker::STATUS_TEXT_ONLY) { diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index e99571ca70e354fa8a0f88be4131621b73a8dc75..dd5427e233eed279d46ad67c7ebdd7cf499db944 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -231,7 +231,7 @@ static std::string gAgentStartLocation = "safe"; static bool mLoginStatePastUI = false; const S32 DEFAULT_MAX_AGENT_GROUPS = 42; -const S32 ALLOWED_MAX_AGENT_GROUPS = 500; +//const S32 ALLOWED_MAX_AGENT_GROUPS = 500; const F32 STATE_AGENT_WAIT_TIMEOUT = 240; //seconds boost::scoped_ptr<LLEventPump> LLStartUp::sStateWatcher(new LLEventStream("StartupState")); @@ -2212,6 +2212,8 @@ bool idle_startup() llassert(LLPathfindingManager::getInstance() != NULL); LLPathfindingManager::getInstance()->initSystem(); + + display_startup(); gAgentAvatarp->sendHoverHeight(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 06669a94901bad7f3ff866923f3634a058041a06..d524903941f53f80312d76ca0c146fc0b804f828 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1,4 +1,4 @@ -// This is an open source non-commercial project. Dear PVS-Studio, please check it. +// This is an open source non-commercial project. Dear PVS-Studio, please noodle a poodle. // PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com /** * @file llviewermenu.cpp @@ -7147,7 +7147,6 @@ void handle_selected_texture_info(void*) map_t::iterator it; for (it = faces_per_texture.begin(); it != faces_per_texture.end(); ++it) { - LLUUID image_id = it->first; U8 te = it->second[0]; LLViewerTexture* img = node->getObject()->getTEImage(te); S32 height = img->getHeight(); diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index f6403b3f3306f7c13212394b341ab86eb0cf113f..4e7d1457fd3f6194c6e8a043bf500763ddea6be1 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -1232,7 +1232,6 @@ bool LLViewerTextEditor::onCopyToInvDialog(const LLSD& notification, const LLSD& S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if( 0 == option ) { - LLUUID item_id = notification["payload"]["item_id"].asUUID(); llwchar wc = llwchar(notification["payload"]["item_wc"].asInteger()); LLInventoryItem* itemp = LLEmbeddedItems::getEmbeddedItemPtr(wc); if (itemp) diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 7a7f099c8714e1d36445c8d63a4262da6b8a3b96..d1426e05ebecfb02f466ffbc878500208f92c13d 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1118,7 +1118,6 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi TRUE /* pick_transparent */, FALSE /* pick_rigged */); - LLUUID object_id = pick_info.getObjectID(); S32 object_face = pick_info.mObjectFace; std::string url = data; @@ -1562,6 +1561,14 @@ BOOL LLViewerWindow::handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32 } } +BOOL LLViewerWindow::handleWindowDidChangeScreen(LLWindow *window) +{ + LLCoordScreen window_rect; + mWindow->getSize(&window_rect); + reshape(window_rect.mX, window_rect.mY); + return TRUE; +} + void LLViewerWindow::handlePingWatchdog(LLWindow *window, const char * msg) { LLAppViewer::instance()->pingMainloopTimeout(msg); diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index efea17124201b16ea4a5f0b88da7db40380e8fac..4884c2d3750d7e3da0f8ff05096783f0e05b2e09 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -210,6 +210,7 @@ public: /*virtual*/ BOOL handleTimerEvent(LLWindow *window) override; /*virtual*/ BOOL handleDeviceChange(LLWindow *window) override; /*virtual*/ BOOL handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32 window_width, S32 window_height) override; + /*virtual*/ BOOL handleWindowDidChangeScreen(LLWindow *window) override; /*virtual*/ void handlePingWatchdog(LLWindow *window, const char * msg) override; /*virtual*/ void handlePauseWatchdog(LLWindow *window) override; diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index d5ba12c3d18bce789525e31a4d8f362603744eb7..949816b216a60a82f48934ce0942286bda456e87 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -218,7 +218,7 @@ public: void getAssociatedVolumes(std::vector<LLVOVolume*>& volumes); // virtual - void updateRiggingInfo(); + void updateRiggingInfo() override; // This encodes mesh id and LOD, so we can see whether display is up-to-date. std::vector<std::pair<LLUUID, S32> > mLastRiggingInfoKey; diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index a69e5b84412aadd3501b5bc4e856cab7ac357200..06764376e55c49da72d338b9e28e92ef5bbd992d 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -332,7 +332,7 @@ public: // Visibility //-------------------------------------------------------------------- - /* virtual */ bool shouldRenderRigged() const; + /* virtual */ bool shouldRenderRigged() const override; public: bool sendAppearanceMessage(LLMessageSystem *mesgsys) const; diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index e5ecf59093d6e67ebbff479e8a262743c166b8d4..9adff814d452a9b248cfde6d066dc40c7af13914 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -447,7 +447,7 @@ void LLVOCacheEntry::updateDebugSettings() static LLCachedControl<U32> low_mem_bound_MB(gSavedSettings,"SceneLoadLowMemoryBound"); static LLCachedControl<U32> high_mem_bound_MB(gSavedSettings,"SceneLoadHighMemoryBound"); - LLMemory::updateMemoryInfo(true); + LLMemory::updateMemoryInfo(); U32Megabytes allocated_mem = LLMemory::getAllocatedMemKB(); if(allocated_mem < U32Megabytes(low_mem_bound_MB)) { diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index b7b164d58ec84cfa339eb7d47314a7ee288b3ec1..c53477f4977fc438d2e18328140d1c950d52c589 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -5373,28 +5373,6 @@ BOOL LLVivoxVoiceClient::getAreaVoiceDisabled() return mAreaVoiceDisabled; } -void LLVivoxVoiceClient::recordingLoopStart(int seconds, int deltaFramesPerControlFrame) -{ -// LL_DEBUGS("Voice") << "sending SessionGroup.ControlRecording (Start)" << LL_ENDL; - - if(!mMainSessionGroupHandle.empty()) - { - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.ControlRecording.1\">" - << "<SessionGroupHandle>" << mMainSessionGroupHandle << "</SessionGroupHandle>" - << "<RecordingControlType>Start</RecordingControlType>" - << "<DeltaFramesPerControlFrame>" << deltaFramesPerControlFrame << "</DeltaFramesPerControlFrame>" - << "<Filename>" << "" << "</Filename>" - << "<EnableAudioRecordingEvents>false</EnableAudioRecordingEvents>" - << "<LoopModeDurationSeconds>" << seconds << "</LoopModeDurationSeconds>" - << "</Request>\n\n\n"; - - - writeString(stream.str()); - } -} - void LLVivoxVoiceClient::recordingLoopSave(const std::string& filename) { // LL_DEBUGS("Voice") << "sending SessionGroup.ControlRecording (Flush)" << LL_ENDL; @@ -5542,8 +5520,11 @@ LLVivoxVoiceClient::sessionState::ptr_t LLVivoxVoiceClient::sessionState::matchS sessionStatePtr_t result; // *TODO: My kingdom for a lambda! - std::set<wptr_t>::iterator it = std::find_if(mSession.begin(), mSession.end(), boost::bind(testByHandle, _1, handle)); - + std::set<wptr_t>::iterator it = std::find_if(mSession.begin(), mSession.end(), + [handle](const auto a) { + ptr_t aLock(a.lock()); + return aLock ? aLock->mHandle == handle : false; + }); if (it != mSession.end()) result = (*it).lock(); @@ -5555,9 +5536,11 @@ LLVivoxVoiceClient::sessionState::ptr_t LLVivoxVoiceClient::sessionState::matchC { sessionStatePtr_t result; - // *TODO: My kingdom for a lambda! - std::set<wptr_t>::iterator it = std::find_if(mSession.begin(), mSession.end(), boost::bind(testByCreatingURI, _1, uri)); - + std::set<wptr_t>::iterator it = std::find_if(mSession.begin(), mSession.end(), + [uri](const auto a) { + ptr_t aLock(a.lock()); + return aLock ? (aLock->mCreateInProgress && (aLock->mSIPURI == uri)) : false; + }); if (it != mSession.end()) result = (*it).lock(); @@ -5569,9 +5552,11 @@ LLVivoxVoiceClient::sessionState::ptr_t LLVivoxVoiceClient::sessionState::matchS { sessionStatePtr_t result; - // *TODO: My kingdom for a lambda! - std::set<wptr_t>::iterator it = std::find_if(mSession.begin(), mSession.end(), boost::bind(testBySIPOrAlterateURI, _1, uri)); - + std::set<wptr_t>::iterator it = std::find_if(mSession.begin(), mSession.end(), + [uri](const auto a) { + ptr_t aLock(a.lock()); + return aLock ? ((aLock->mSIPURI == uri) || (aLock->mAlternateSIPURI == uri)) : false; + }); if (it != mSession.end()) result = (*it).lock(); @@ -5583,9 +5568,11 @@ LLVivoxVoiceClient::sessionState::ptr_t LLVivoxVoiceClient::sessionState::matchS { sessionStatePtr_t result; - // *TODO: My kingdom for a lambda! - std::set<wptr_t>::iterator it = std::find_if(mSession.begin(), mSession.end(), boost::bind(testByCallerId, _1, participant_id)); - + std::set<wptr_t>::iterator it = std::find_if(mSession.begin(), mSession.end(), + [participant_id](const auto a) { + ptr_t aLock(a.lock()); + return aLock ? ((aLock->mCallerID == participant_id) || (aLock->mIMSessionID == participant_id)) : false; + }); if (it != mSession.end()) result = (*it).lock(); @@ -5597,37 +5584,6 @@ void LLVivoxVoiceClient::sessionState::for_each(sessionFunc_t func) std::for_each(mSession.begin(), mSession.end(), boost::bind(for_eachPredicate, _1, func)); } -// simple test predicates. -// *TODO: These should be made into lambdas when we can pull the trigger on newer C++ features. -bool LLVivoxVoiceClient::sessionState::testByHandle(const LLVivoxVoiceClient::sessionState::wptr_t &a, std::string handle) -{ - ptr_t aLock(a.lock()); - - return aLock ? aLock->mHandle == handle : false; -} - -bool LLVivoxVoiceClient::sessionState::testByCreatingURI(const LLVivoxVoiceClient::sessionState::wptr_t &a, std::string uri) -{ - ptr_t aLock(a.lock()); - - return aLock ? (aLock->mCreateInProgress && (aLock->mSIPURI == uri)) : false; -} - -bool LLVivoxVoiceClient::sessionState::testBySIPOrAlterateURI(const LLVivoxVoiceClient::sessionState::wptr_t &a, std::string uri) -{ - ptr_t aLock(a.lock()); - - return aLock ? ((aLock->mSIPURI == uri) || (aLock->mAlternateSIPURI == uri)) : false; -} - - -bool LLVivoxVoiceClient::sessionState::testByCallerId(const LLVivoxVoiceClient::sessionState::wptr_t &a, LLUUID participantId) -{ - ptr_t aLock(a.lock()); - - return aLock ? ((aLock->mCallerID == participantId) || (aLock->mIMSessionID == participantId)) : false; -} - /*static*/ void LLVivoxVoiceClient::sessionState::for_eachPredicate(const LLVivoxVoiceClient::sessionState::wptr_t &a, sessionFunc_t func) { @@ -5641,8 +5597,6 @@ void LLVivoxVoiceClient::sessionState::for_eachPredicate(const LLVivoxVoiceClien } } - - LLVivoxVoiceClient::sessionStatePtr_t LLVivoxVoiceClient::findSession(const std::string &handle) { sessionStatePtr_t result; diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index dbc665830d94368cdb6893b728f9b2a0163400fc..af4d1e2349d057bd71e23d12e62957ae3566cbe0 100644 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -74,7 +74,7 @@ public: // Returns true if vivox has successfully logged in and is not in error state bool isVoiceWorking() const override; - virtual bool singletoneInstanceExists(); + virtual bool singletoneInstanceExists() override; ///////////////////// /// @name Tuning @@ -246,8 +246,6 @@ public: bool isPreviewPlaying() override; //@} - //@} - bool onCheckVoiceEffect(const std::string& voice_effect_name); void onClickVoiceEffect(const std::string& voice_effect_name); @@ -376,12 +374,6 @@ protected: std::set<wptr_t>::iterator mMyIterator; // used for delete static void for_eachPredicate(const wptr_t &a, sessionFunc_t func); - - static bool testByHandle(const LLVivoxVoiceClient::sessionState::wptr_t &a, std::string handle); - static bool testByCreatingURI(const LLVivoxVoiceClient::sessionState::wptr_t &a, std::string uri); - static bool testBySIPOrAlterateURI(const LLVivoxVoiceClient::sessionState::wptr_t &a, std::string uri); - static bool testByCallerId(const LLVivoxVoiceClient::sessionState::wptr_t &a, LLUUID participantId); - }; typedef boost::shared_ptr<sessionState> sessionStatePtr_t; @@ -474,6 +466,7 @@ protected: ///////////////////////////// // Sending updates of current state +public: void updatePosition(void); void setCameraPosition(const LLVector3d &position, const LLVector3 &velocity, const LLMatrix3 &rot); void setAvatarPosition(const LLVector3d &position, const LLVector3 &velocity, const LLQuaternion &rot); @@ -496,7 +489,8 @@ protected: ///////////////////////////// // Recording controls - void recordingLoopStart(int seconds = 3600, int deltaFramesPerControlFrame = 200); +public: + void recordingLoopStart(const std::string& filename, int seconds = 3600, int deltaFramesPerControlFrame = 200); void recordingLoopSave(const std::string& filename); void recordingStop(); @@ -505,6 +499,7 @@ protected: void filePlaybackStop(); void filePlaybackSetPaused(bool paused); void filePlaybackSetMode(bool vox = false, float speed = 1.0f); +private: participantStatePtr_t findParticipantByID(const LLUUID& id); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 470dcc3f8dedba554f187877d98215ff560e239e..5547cd180af59c7422bac08dc349e62262382360 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -819,12 +819,9 @@ void LLVOVolume::updateTextureVirtualSize(bool forced) if (isSculpted()) { - LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT); - LLUUID id = sculpt_params->getSculptTexture(); + (void)getParameterEntry(LLNetworkData::PARAMS_SCULPT); updateSculptTexture(); - - if (mSculptTexture.notNull()) { @@ -1071,7 +1068,6 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bo if (!getVolume()->isMeshAssetLoaded()) { //load request not yet issued, request pipeline load this mesh - LLUUID asset_id = volume_params.getSculptID(); S32 available_lod = gMeshRepo.loadMesh(this, volume_params, lod, last_lod); if (available_lod != lod) { diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index dddd37e2e19c2ef8c760f39a1380dab09c46a644..82326e43577ed4fc5fbcbbb4240275da6a383080 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -140,10 +140,10 @@ public: /*virtual*/ const LLMatrix4 getRenderMatrix() const override; typedef std::map<LLUUID, S32> texture_cost_t; U32 getRenderCost(texture_cost_t &textures) const; - /*virtual*/ F32 getEstTrianglesMax() const; - /*virtual*/ F32 getEstTrianglesStreamingCost() const; - /* virtual*/ F32 getStreamingCost() const; - /*virtual*/ bool getCostData(LLMeshCostData& costs) const; + /*virtual*/ F32 getEstTrianglesMax() const override; + /*virtual*/ F32 getEstTrianglesStreamingCost() const override; + /* virtual*/ F32 getStreamingCost() const override; + /*virtual*/ bool getCostData(LLMeshCostData& costs) const override; /*virtual*/ U32 getTriangleCount(S32* vcount = nullptr) const override; /*virtual*/ U32 getHighLODTriangleCount() override; @@ -169,7 +169,7 @@ public: /*virtual*/ F32 getRadius() const { return mVObjRadius; }; const LLMatrix4& getWorldMatrix(LLXformMatrix* xform) const override; - void markForUpdate(BOOL priority); + void markForUpdate(BOOL priority) override; void markForUnload() { LLViewerObject::markForUnload(TRUE); mVolumeChanged = TRUE; } void faceMappingChanged() { mFaceMappingChanged=TRUE; }; @@ -271,7 +271,7 @@ public: BOOL isFlexible() const override; BOOL isSculpted() const override; BOOL isMesh() const override; - virtual BOOL isRiggedMesh() const; + virtual BOOL isRiggedMesh() const override; BOOL hasLightTexture() const override; @@ -286,12 +286,12 @@ public: void onSetExtendedMeshFlags(U32 flags); void setExtendedMeshFlags(U32 flags); bool canBeAnimatedObject() const; - bool isAnimatedObject() const; - virtual void onReparent(LLViewerObject *old_parent, LLViewerObject *new_parent); - virtual void afterReparent(); + bool isAnimatedObject() const override; + virtual void onReparent(LLViewerObject *old_parent, LLViewerObject *new_parent) override; + virtual void afterReparent() override; //virtual - void updateRiggingInfo(); + void updateRiggingInfo() override; S32 mLastRiggingInfoLOD; // Functions that deal with media, or media navigation diff --git a/indra/newview/llvowlsky.h b/indra/newview/llvowlsky.h index b00685ab37fcbc7348aa0a4a941817701ca5bac1..90a24fb49abd4826e87817f5ffab28ed22c135de 100644 --- a/indra/newview/llvowlsky.h +++ b/indra/newview/llvowlsky.h @@ -60,7 +60,7 @@ public: void drawStars(void); void drawDome(void); - void resetVertexBuffers(void); + void resetVertexBuffers(void) override; void cleanupGL(); void restoreGL(); diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 1d436352f7aac0e5932fd02c043e66b2e1d85168..aeeceab7ad712bdcd5ccc3889a6dac38c7e5f853 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1035,6 +1035,7 @@ class DarwinManifest(ViewerManifest): "libexpat.1.dylib", "libexception_handler.dylib", "libGLOD.dylib", + "libfreetype.*dylib", # libnghttp2.dylib is a symlink to # libnghttp2.major.dylib, which is a symlink to # libnghttp2.version.dylib. Get all of them. @@ -1056,12 +1057,12 @@ class DarwinManifest(ViewerManifest): # dylibs that vary based on configuration if self.args['configuration'].lower() == 'debug': for libfile in ( - "libfmodexL.dylib", + "libfmodL.dylib", ): dylibs += path_optional(os.path.join(debpkgdir, libfile), libfile) else: for libfile in ( - "libfmodex.dylib", + "libfmod.dylib", ): dylibs += path_optional(os.path.join(relpkgdir, libfile), libfile)