summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2025-12-01 17:27:19 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2025-12-01 17:27:44 +0200
commit1565e460830f9e3d9e4cd4d82977df6c17eb3112 (patch)
tree74c3f90d2d0129f7d5e58805e15ed3480b241063 /indra/newview
parenta9e8676611bf0ffda077a6d7561e0d57f9e3fcf7 (diff)
parent906c58ac3821ce364096b7c7f2df80b67d9740b6 (diff)
Merge branch 'develop' into maxim/voice-moderation
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/CMakeLists.txt2
-rw-r--r--indra/newview/app_settings/settings.xml35
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl82
-rw-r--r--indra/newview/gltf/asset.cpp35
-rw-r--r--indra/newview/gltf/asset.h2
-rw-r--r--indra/newview/gltf/llgltfloader.cpp13
-rw-r--r--indra/newview/gltf/llgltfloader.h2
-rw-r--r--indra/newview/llaccountingcostmanager.cpp4
-rw-r--r--indra/newview/llagent.cpp22
-rw-r--r--indra/newview/llagent.h11
-rw-r--r--indra/newview/llagentpicksinfo.cpp2
-rw-r--r--indra/newview/llagentwearables.h4
-rw-r--r--indra/newview/llaisapi.cpp6
-rw-r--r--indra/newview/llaisapi.h4
-rw-r--r--indra/newview/llappcorehttp.cpp4
-rw-r--r--indra/newview/llappdelegate-objc.mm132
-rw-r--r--indra/newview/llappearancemgr.cpp6
-rw-r--r--indra/newview/llappearancemgr.h2
-rw-r--r--indra/newview/llappviewer.cpp36
-rw-r--r--indra/newview/llappviewer.h2
-rw-r--r--indra/newview/llappviewerlistener.h4
-rw-r--r--indra/newview/llavatarpropertiesprocessor.cpp6
-rw-r--r--indra/newview/llavatarrenderinfoaccountant.cpp12
-rw-r--r--indra/newview/llchiclet.h2
-rw-r--r--indra/newview/llcofwearables.h2
-rw-r--r--indra/newview/llcommandlineparser.cpp18
-rw-r--r--indra/newview/llcommandlineparser.h6
-rw-r--r--indra/newview/llcompilequeue.cpp4
-rw-r--r--indra/newview/llcompilequeue.h2
-rw-r--r--indra/newview/lldndbutton.h2
-rw-r--r--indra/newview/lldrawable.cpp15
-rw-r--r--indra/newview/lldrawable.h13
-rw-r--r--indra/newview/lldrawpoolavatar.cpp2
-rw-r--r--indra/newview/lldrawpoolavatar.h6
-rw-r--r--indra/newview/lldrawpoolbump.cpp4
-rw-r--r--indra/newview/lldrawpoolbump.h2
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp1
-rw-r--r--indra/newview/llenvironment.cpp72
-rw-r--r--indra/newview/llenvironment.h4
-rw-r--r--indra/newview/llestateinfomodel.cpp4
-rw-r--r--indra/newview/lleventpoll.cpp6
-rw-r--r--indra/newview/llexperiencelog.cpp2
-rw-r--r--indra/newview/llexternaleditor.cpp16
-rw-r--r--indra/newview/llface.h14
-rw-r--r--indra/newview/llfeaturemanager.cpp19
-rw-r--r--indra/newview/llfilepicker_mac.h3
-rw-r--r--indra/newview/llfilepicker_mac.mm75
-rw-r--r--indra/newview/llfloaterabout.cpp10
-rw-r--r--indra/newview/llfloateravatarpicker.cpp12
-rw-r--r--indra/newview/llfloateravatarpicker.h2
-rw-r--r--indra/newview/llfloaterbanduration.h2
-rw-r--r--indra/newview/llfloaterbulkupload.cpp3
-rw-r--r--indra/newview/llfloaterbulkupload.h1
-rw-r--r--indra/newview/llfloaterbvhpreview.cpp4
-rw-r--r--indra/newview/llfloateremojipicker.h4
-rw-r--r--indra/newview/llfloaterexperiencepicker.h4
-rw-r--r--indra/newview/llfloaterexperiences.cpp10
-rw-r--r--indra/newview/llfloaterexperiences.h4
-rw-r--r--indra/newview/llfloatergridstatus.cpp8
-rw-r--r--indra/newview/llfloatergroups.h3
-rw-r--r--indra/newview/llfloaterimagepreview.cpp7
-rw-r--r--indra/newview/llfloaterimnearbychat.cpp2
-rw-r--r--indra/newview/llfloaterimnearbychathandler.cpp2
-rw-r--r--indra/newview/llfloatermodeluploadbase.cpp4
-rw-r--r--indra/newview/llfloatermyscripts.cpp4
-rw-r--r--indra/newview/llfloaterpay.cpp12
-rw-r--r--indra/newview/llfloaterperms.cpp4
-rw-r--r--indra/newview/llfloaterpreference.cpp10
-rw-r--r--indra/newview/llfloaterregioninfo.cpp5
-rw-r--r--indra/newview/llfloaterregionrestartschedule.cpp12
-rw-r--r--indra/newview/llfloaterreporter.cpp6
-rw-r--r--indra/newview/llfloaterscriptlimits.cpp12
-rw-r--r--indra/newview/llfloatersimplesnapshot.cpp12
-rw-r--r--indra/newview/llfloatersimplesnapshot.h2
-rw-r--r--indra/newview/llfloatertos.cpp6
-rw-r--r--indra/newview/llfloatertos.h1
-rw-r--r--indra/newview/llfloaterurlentry.cpp8
-rw-r--r--indra/newview/llfriendcard.cpp2
-rw-r--r--indra/newview/llfriendcard.h2
-rw-r--r--indra/newview/llgesturemgr.cpp2
-rw-r--r--indra/newview/llgesturemgr.h2
-rw-r--r--indra/newview/llgltfmateriallist.cpp6
-rw-r--r--indra/newview/llgroupmgr.cpp18
-rw-r--r--indra/newview/llimprocessing.cpp4
-rw-r--r--indra/newview/llimview.cpp16
-rw-r--r--indra/newview/llinventorybridge.cpp4
-rw-r--r--indra/newview/llinventorybridge.h4
-rw-r--r--indra/newview/llinventoryfunctions.cpp2
-rw-r--r--indra/newview/llinventoryfunctions.h8
-rw-r--r--indra/newview/llinventorygallery.cpp10
-rw-r--r--indra/newview/llinventorygallery.h4
-rw-r--r--indra/newview/llinventorygallerymenu.cpp2
-rw-r--r--indra/newview/llinventoryitemslist.cpp54
-rw-r--r--indra/newview/llinventoryitemslist.h1
-rw-r--r--indra/newview/llinventorylistitem.cpp2
-rw-r--r--indra/newview/llinventorymodel.cpp14
-rw-r--r--indra/newview/llinventorymodel.h7
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.cpp21
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.h4
-rw-r--r--indra/newview/llinventoryobserver.cpp2
-rw-r--r--indra/newview/llinventoryobserver.h2
-rw-r--r--indra/newview/llinventorypanel.cpp10
-rw-r--r--indra/newview/llinventorypanel.h7
-rw-r--r--indra/newview/lllandmarkactions.h6
-rw-r--r--indra/newview/lllandmarklist.h6
-rw-r--r--indra/newview/lllistcontextmenu.h2
-rw-r--r--indra/newview/lllocationhistory.h5
-rw-r--r--indra/newview/lllogininstance.cpp2
-rw-r--r--indra/newview/lllogininstance.h1
-rw-r--r--indra/newview/llmaniptranslate.cpp34
-rw-r--r--indra/newview/llmarketplacefunctions.cpp58
-rw-r--r--indra/newview/llmarketplacefunctions.h8
-rw-r--r--indra/newview/llmarketplacenotifications.h4
-rw-r--r--indra/newview/llmaterialeditor.cpp9
-rw-r--r--indra/newview/llmaterialmgr.cpp22
-rw-r--r--indra/newview/llmediadataclient.cpp18
-rw-r--r--indra/newview/llmeshrepository.cpp59
-rw-r--r--indra/newview/llmutelist.cpp2
-rw-r--r--indra/newview/llnamelistctrl.h4
-rw-r--r--indra/newview/llnotificationlistitem.h22
-rw-r--r--indra/newview/llnotificationmanager.cpp2
-rw-r--r--indra/newview/llnotificationstorage.cpp2
-rw-r--r--indra/newview/lloutfitslist.cpp61
-rw-r--r--indra/newview/lloutfitslist.h17
-rw-r--r--indra/newview/llpanelappearancetab.cpp2
-rw-r--r--indra/newview/llpanelappearancetab.h2
-rw-r--r--indra/newview/llpanelavatar.cpp6
-rw-r--r--indra/newview/llpanelblockedlist.cpp2
-rw-r--r--indra/newview/llpanelblockedlist.h2
-rw-r--r--indra/newview/llpaneldirbrowser.cpp30
-rw-r--r--indra/newview/llpaneldirbrowser.h2
-rw-r--r--indra/newview/llpaneldirevents.cpp8
-rw-r--r--indra/newview/llpaneleditsky.cpp8
-rw-r--r--indra/newview/llpaneleditwearable.cpp2
-rw-r--r--indra/newview/llpanelexperiencelisteditor.h2
-rw-r--r--indra/newview/llpanelexperiencepicker.h4
-rw-r--r--indra/newview/llpanelface.cpp30
-rw-r--r--indra/newview/llpanelface.h2
-rw-r--r--indra/newview/llpanellogin.cpp2
-rw-r--r--indra/newview/llpanelpeople.cpp2
-rw-r--r--indra/newview/llpanelprofile.cpp14
-rw-r--r--indra/newview/llpanelwearing.cpp4
-rw-r--r--indra/newview/llparticipantlist.cpp2
-rw-r--r--indra/newview/llparticipantlist.h4
-rw-r--r--indra/newview/llpathfindingcharacterlist.cpp2
-rw-r--r--indra/newview/llpathfindinglinksetlist.cpp2
-rw-r--r--indra/newview/llpathfindingmanager.cpp25
-rw-r--r--indra/newview/llpathfindingmanager.h8
-rw-r--r--indra/newview/llpathfindingnavmesh.h4
-rw-r--r--indra/newview/llpathfindingnavmeshzone.h6
-rw-r--r--indra/newview/llpathfindingobject.h4
-rw-r--r--indra/newview/llpathfindingpathtool.cpp1
-rw-r--r--indra/newview/llpathfindingpathtool.h4
-rw-r--r--indra/newview/llpbrterrainfeatures.cpp12
-rw-r--r--indra/newview/llpersistentnotificationstorage.cpp2
-rw-r--r--indra/newview/llpopupview.cpp4
-rw-r--r--indra/newview/llpopupview.h2
-rw-r--r--indra/newview/llpostcard.h2
-rw-r--r--indra/newview/llpresetsmanager.cpp20
-rw-r--r--indra/newview/llpreviewscript.h2
-rw-r--r--indra/newview/llproductinforequest.cpp4
-rw-r--r--indra/newview/llremoteparcelrequest.cpp4
-rw-r--r--indra/newview/llsetkeybinddialog.cpp2
-rw-r--r--indra/newview/llsnapshotlivepreview.cpp4
-rw-r--r--indra/newview/llspatialpartition.h24
-rw-r--r--indra/newview/llspeakers.cpp6
-rw-r--r--indra/newview/llspeakers.h2
-rw-r--r--indra/newview/llsplitbutton.cpp2
-rw-r--r--indra/newview/llstartup.cpp32
-rw-r--r--indra/newview/llstatusbar.cpp10
-rw-r--r--indra/newview/llsyntaxid.cpp4
-rw-r--r--indra/newview/llsyswellitem.h2
-rw-r--r--indra/newview/llteleporthistory.h4
-rw-r--r--indra/newview/llteleporthistorystorage.h2
-rw-r--r--indra/newview/lltexturectrl.cpp26
-rw-r--r--indra/newview/lltexturectrl.h12
-rw-r--r--indra/newview/lltexturefetch.cpp20
-rw-r--r--indra/newview/lltoast.cpp4
-rw-r--r--indra/newview/lltoast.h2
-rw-r--r--indra/newview/lltoolpipette.h1
-rw-r--r--indra/newview/lltranslate.cpp22
-rw-r--r--indra/newview/lltranslate.h10
-rw-r--r--indra/newview/llviewerassetstats.h2
-rw-r--r--indra/newview/llviewerassetstorage.cpp8
-rw-r--r--indra/newview/llviewerassetupload.cpp26
-rw-r--r--indra/newview/llviewercontrol.cpp1
-rw-r--r--indra/newview/llviewerdisplayname.cpp6
-rw-r--r--indra/newview/llviewerinput.cpp12
-rw-r--r--indra/newview/llviewerinput.h2
-rw-r--r--indra/newview/llviewerinventory.cpp6
-rw-r--r--indra/newview/llviewerinventory.h8
-rw-r--r--indra/newview/llviewermedia.cpp26
-rw-r--r--indra/newview/llviewermenu.cpp12
-rw-r--r--indra/newview/llviewermenufile.cpp21
-rw-r--r--indra/newview/llviewermenufile.h2
-rw-r--r--indra/newview/llviewermessage.cpp17
-rw-r--r--indra/newview/llviewermessage.h7
-rw-r--r--indra/newview/llviewerobject.cpp6
-rw-r--r--indra/newview/llviewerobjectlist.cpp8
-rw-r--r--indra/newview/llviewerparcelaskplay.h2
-rw-r--r--indra/newview/llviewerparcelmgr.h7
-rw-r--r--indra/newview/llviewerpartsim.cpp10
-rw-r--r--indra/newview/llviewerprecompiledheaders.h1
-rwxr-xr-xindra/newview/llviewerregion.cpp12
-rw-r--r--indra/newview/llviewerregion.h8
-rw-r--r--indra/newview/llviewershadermgr.cpp6
-rw-r--r--indra/newview/llviewertexturelist.cpp3
-rw-r--r--indra/newview/llviewerwindow.cpp11
-rw-r--r--indra/newview/llviewerwindow.h5
-rw-r--r--indra/newview/llvoavatar.cpp8
-rw-r--r--indra/newview/llvoavatarself.cpp8
-rw-r--r--indra/newview/llvograss.cpp2
-rw-r--r--indra/newview/llvoicechannel.cpp4
-rw-r--r--indra/newview/llvoicechannel.h2
-rw-r--r--indra/newview/llvoicevivox.cpp12
-rw-r--r--indra/newview/llvoicewebrtc.cpp44
-rw-r--r--indra/newview/llvovolume.cpp3
-rw-r--r--indra/newview/llwatchdog.h2
-rw-r--r--indra/newview/llwebprofile.cpp8
-rw-r--r--indra/newview/llwebprofile.h2
-rw-r--r--indra/newview/llwindowlistener.cpp23
-rw-r--r--indra/newview/llwindowlistener.h4
-rw-r--r--indra/newview/llwlhandlers.cpp8
-rw-r--r--indra/newview/llworldmap.h1
-rw-r--r--indra/newview/llworldmapmessage.cpp6
-rw-r--r--indra/newview/llworldmapmessage.h4
-rw-r--r--indra/newview/llxmlrpclistener.cpp2
-rw-r--r--indra/newview/llxmlrpctransaction.cpp15
-rw-r--r--indra/newview/pipeline.cpp35
-rw-r--r--indra/newview/pipeline.h1
-rw-r--r--indra/newview/skins/default/xui/da/panel_status_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/de/panel_status_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml28
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_land_money.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_status_bar.xml6
-rw-r--r--indra/newview/skins/default/xui/es/panel_status_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/panel_status_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/it/panel_status_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/ja/panel_status_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/pl/panel_status_bar.xml3
-rw-r--r--indra/newview/skins/default/xui/pt/panel_status_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/ru/panel_status_bar.xml3
-rw-r--r--indra/newview/skins/default/xui/tr/panel_status_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/panel_status_bar.xml2
-rw-r--r--indra/newview/tests/lllogininstance_test.cpp4
-rwxr-xr-xindra/newview/viewer_manifest.py30
246 files changed, 1323 insertions, 1089 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index a5ce1f4b7d..d6f3085b5c 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1985,6 +1985,7 @@ elseif (DARWIN)
XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=x86_64] "$(inherited) -L${CMAKE_CURRENT_BINARY_DIR}/llphysicsextensions/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,${CMAKE_CFG_INTDIR}>/ -lllphysicsextensions -Xlinker -map -Xlinker ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME}.MAP"
XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=arm64] "$(inherited) -L${CMAKE_BINARY_DIR}/llphysicsextensionsos/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,${CMAKE_CFG_INTDIR}>/ -lllphysicsextensionsos"
)
+ add_dependencies(${VIEWER_BINARY_NAME} llphysicsextensionsos)
elseif(HAVOK_TPV)
set_target_properties(${VIEWER_BINARY_NAME}
PROPERTIES
@@ -1995,6 +1996,7 @@ elseif (DARWIN)
XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=x86_64] "$(inherited) -L${ARCH_PREBUILT_DIRS}/ -lllphysicsextensions_tpv"
XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=arm64] "$(inherited) -L${CMAKE_BINARY_DIR}/llphysicsextensionsos/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,${CMAKE_CFG_INTDIR}>/ -lllphysicsextensionsos"
)
+ add_dependencies(${VIEWER_BINARY_NAME} llphysicsextensionsos)
else()
target_link_libraries(${VIEWER_BINARY_NAME} llphysicsextensionsos)
endif()
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index eac6893504..b0558eac78 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -655,6 +655,28 @@
<key>Value</key>
<integer>60</integer>
</map>
+ <key>AvatarRotateThresholdSlow</key>
+ <map>
+ <key>Comment</key>
+ <string>Angle between avatar facing and camera facing at which avatar turns to face same direction as camera, when moving slowly (degrees)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <integer>60</integer>
+ </map>
+ <key>AvatarRotateThresholdFast</key>
+ <map>
+ <key>Comment</key>
+ <string>Angle between avatar facing and camera facing at which avatar turns to face same direction as camera, when moving fast (degrees)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <integer>2</integer>
+ </map>
<key>AvatarPhysics</key>
<map>
<key>Comment</key>
@@ -7296,7 +7318,7 @@
<key>RenderAvatarCloth</key>
<map>
<key>Comment</key>
- <string>DEPRECATED - only false supported - Controls if avatars use wavy cloth</string>
+ <string>Controls if system avatar clothes use wavy cloth</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -9053,6 +9075,17 @@
<key>Value</key>
<integer>16</integer>
</map>
+ <key>RenderReflectionProbeShowTransparent</key>
+ <map>
+ <key>Comment</key>
+ <string>Show reflection probes in the transparency debug view</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>RenderReflectionProbeVolumes</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl
index aabbbac12a..1b1233790e 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl
@@ -28,6 +28,9 @@ uniform mat4 projection_matrix;
in vec3 position;
in vec3 normal;
in vec2 texcoord0;
+#ifdef AVATAR_CLOTH
+in vec4 clothing;
+#endif
mat4 getSkinnedTransform();
@@ -37,6 +40,15 @@ out vec3 vary_normal;
out vec2 vary_texcoord0;
out vec3 vary_position;
+#ifdef AVATAR_CLOTH
+uniform vec4 gWindDir;
+uniform vec4 gSinWaveParams;
+uniform vec4 gGravity;
+
+const vec4 gMinMaxConstants = vec4(1.0, 0.166666, 0.0083143, .00018542); // #minimax-generated coefficients
+const vec4 gPiConstants = vec4(0.159154943, 6.28318530, 3.141592653, 1.5707963); // # {1/2PI, 2PI, PI, PI/2}
+#endif
+
void main()
{
vary_texcoord0 = texcoord0;
@@ -46,16 +58,78 @@ void main()
vec4 pos_in = vec4(position.xyz, 1.0);
mat4 trans = getSkinnedTransform();
- pos.x = dot(trans[0], pos_in);
- pos.y = dot(trans[1], pos_in);
- pos.z = dot(trans[2], pos_in);
- pos.w = 1.0;
norm.x = dot(trans[0].xyz, normal);
norm.y = dot(trans[1].xyz, normal);
norm.z = dot(trans[2].xyz, normal);
norm = normalize(norm);
+#ifdef AVATAR_CLOTH
+ //wind
+ vec4 windEffect;
+ windEffect = vec4(dot(norm, gWindDir.xyz));
+ pos.x = dot(trans[2], pos_in);
+ windEffect.xyz = pos.x * vec3(0.015, 0.015, 0.015)
+ + windEffect.xyz;
+ windEffect.w = windEffect.w * 2.0 + 1.0; // move wind offset value to [-1, 3]
+ windEffect.w = windEffect.w*gWindDir.w; // modulate wind strength
+
+ windEffect.xyz = windEffect.xyz*gSinWaveParams.xyz
+ +vec3(gSinWaveParams.w); // use sin wave params to scale and offset input
+
+ //reduce to period of 2 PI
+ vec4 temp1, temp0, temp2, offsetPos;
+ temp1.xyz = windEffect.xyz * gPiConstants.x; // change input as multiple of [0-2PI] to [0-1]
+ temp0.y = mod(temp1.x,1.0);
+ windEffect.x = temp0.y * gPiConstants.y; // scale from [0,1] to [0, 2PI]
+ temp1.z = temp1.z - gPiConstants.w; // shift normal oscillation by PI/2
+ temp0.y = mod(temp1.z,1.0);
+
+ windEffect.z = temp0.y * gPiConstants.y; // scale from [0,1] to [0, 2PI]
+ windEffect.xyz = windEffect.xyz + vec3(-3.141592); // offset to [-PI, PI]
+
+ //calculate sinusoid
+ vec4 sinWave;
+ temp1 = windEffect*windEffect;
+ sinWave = -temp1 * gMinMaxConstants.w
+ + vec4(gMinMaxConstants.z); // y = -(x^2)/7! + 1/5!
+ sinWave = sinWave * -temp1 + vec4(gMinMaxConstants.y); // y = -(x^2) * (-(x^2)/7! + 1/5!) + 1/3!
+ sinWave = sinWave * -temp1 + vec4(gMinMaxConstants.x); // y = -(x^2) * (-(x^2) * (-(x^2)/7! + 1/5!) + 1/3!) + 1
+ sinWave = sinWave * windEffect; // y = x * (-(x^2) * (-(x^2) * (-(x^2)/7! + 1/5!) + 1/3!) + 1)
+
+ // sinWave.x holds sin(norm . wind_direction) with primary frequency
+ // sinWave.y holds sin(norm . wind_direction) with secondary frequency
+ // sinWave.z hold cos(norm . wind_direction) with primary frequency
+ sinWave.xyz = sinWave.xyz * gWindDir.w
+ + vec3(windEffect.w); // multiply by wind strength in gWindDir.w [-wind, wind]
+
+ // add normal facing bias offset [-wind,wind] -> [-wind - .25, wind + 1]
+ temp1 = vec4(dot(norm, gGravity.xyz)); // how much is this normal facing in direction of gGravity?
+ temp1 = min(temp1, vec4(0.2,0.0,0.0,0.0)); // clamp [-1, 1] to [-1, 0.2]
+ temp1 = temp1*vec4(1.5,0.0,0.0,0.0); // scale from [-1,0.2] to [-1.5, 0.3]
+ sinWave.x = sinWave.x + temp1.x; // add gGravity effect to sinwave (only primary frequency)
+ sinWave.xyz = sinWave.xyz * clothing.w; // modulate by clothing coverage
+
+ sinWave.xyz = max(sinWave.xyz, vec3(-1.0, -1.0, -1.0)); // clamp to underlying body shape
+ offsetPos = clothing * sinWave.x; // multiply wind effect times clothing displacement
+ temp2 = gWindDir*sinWave.z + vec4(norm,0); // calculate normal offset due to wind oscillation
+ offsetPos = vec4(1.0,1.0,1.0,0.0)*offsetPos+pos_in; // add to offset vertex position, and zero out effect from w
+ norm += temp2.xyz*2.0; // add sin wave effect on normals (exaggerated)
+
+ //renormalize normal (again)
+ norm = normalize(norm);
+
+ pos.x = dot(trans[0], offsetPos);
+ pos.y = dot(trans[1], offsetPos);
+ pos.z = dot(trans[2], offsetPos);
+ pos.w = 1.0;
+#else
+ pos.x = dot(trans[0], pos_in);
+ pos.y = dot(trans[1], pos_in);
+ pos.z = dot(trans[2], pos_in);
+ pos.w = 1.0;
+#endif
+
vary_normal = norm;
vary_position = pos.xyz;
diff --git a/indra/newview/gltf/asset.cpp b/indra/newview/gltf/asset.cpp
index 28f30ae1c9..51fb019e93 100644
--- a/indra/newview/gltf/asset.cpp
+++ b/indra/newview/gltf/asset.cpp
@@ -33,10 +33,11 @@
#include "../llviewertexturelist.h"
#include "../pipeline.h"
#include "buffer_util.h"
-#include <boost/url.hpp>
#include "llimagejpeg.h"
#include "../llskinningutil.h"
+#include <future>
+
using namespace LL::GLTF;
using namespace boost::json;
@@ -961,9 +962,41 @@ LLViewerFetchedTexture* fetch_texture(const LLUUID& id);
bool Image::prep(Asset& asset, bool loadIntoVRAM)
{
mLoadIntoTexturePipe = loadIntoVRAM;
+
LLUUID id;
if (mUri.size() == UUID_STR_SIZE && LLUUID::parseUUID(mUri, &id) && id.notNull())
{ // loaded from an asset, fetch the texture from the asset system
+ LL_DEBUGS("GLTF") << "Loading image from an id" << id<< LL_ENDL;
+ }
+ else if (mUri.find("data:") == 0)
+ { // embedded in a data URI, load the texture from the URI
+ LL_WARNS("GLTF") << "Data URIs not yet supported" << LL_ENDL;
+ return false;
+ }
+
+ // Image::prepImpl containes code that must run on the main thread
+ std::promise<bool> prep_promise;
+ std::future<bool> prep_future = prep_promise.get_future();
+
+ LLAppViewer::instance()->postToMainCoro([this, &asset, id, &prep_promise]() mutable {
+ try {
+ bool result = prepImpl(asset, id);
+ prep_promise.set_value(result);
+ }
+ catch (...) {
+ // Propagate exception to the waiting thread
+ prep_promise.set_exception(std::current_exception());
+ }
+ });
+
+ // Block until prep is done on the main thread
+ return prep_future.get();
+}
+
+bool Image::prepImpl(Asset& asset, const LLUUID& id)
+{
+ if (id.notNull())
+ { // loaded from an asset, fetch the texture from the asset system
mTexture = fetch_texture(id);
}
else if (mUri.find("data:") == 0)
diff --git a/indra/newview/gltf/asset.h b/indra/newview/gltf/asset.h
index b9554d753c..2802664ed3 100644
--- a/indra/newview/gltf/asset.h
+++ b/indra/newview/gltf/asset.h
@@ -320,6 +320,8 @@ namespace LL
void clearData(Asset& asset);
bool prep(Asset& asset, bool loadIntoVRAM);
+ private:
+ bool prepImpl(Asset& asset, const LLUUID& id);
};
// Render Batch -- vertex buffer and list of primitives to render using
diff --git a/indra/newview/gltf/llgltfloader.cpp b/indra/newview/gltf/llgltfloader.cpp
index 4f8f80129d..3a1d8079a9 100644
--- a/indra/newview/gltf/llgltfloader.cpp
+++ b/indra/newview/gltf/llgltfloader.cpp
@@ -602,11 +602,12 @@ LLGLTFLoader::LLGLTFImportMaterial LLGLTFLoader::processMaterial(S32 material_in
if (material->mPbrMetallicRoughness.mBaseColorTexture.mIndex >= 0)
{
S32 texIndex = material->mPbrMetallicRoughness.mBaseColorTexture.mIndex;
- std::string filename = processTexture(texIndex, "base_color", material->mName);
+ std::string full_path;
+ std::string filename = processTexture(full_path, texIndex, "base_color", material->mName);
if (!filename.empty())
{
- impMat.mDiffuseMapFilename = filename;
+ impMat.mDiffuseMapFilename = full_path;
impMat.mDiffuseMapLabel = material->mName.empty() ? filename : material->mName;
// Check if the texture is already loaded
@@ -637,7 +638,7 @@ LLGLTFLoader::LLGLTFImportMaterial LLGLTFLoader::processMaterial(S32 material_in
return cachedMat;
}
-std::string LLGLTFLoader::processTexture(S32 texture_index, const std::string& texture_type, const std::string& material_name)
+std::string LLGLTFLoader::processTexture(std::string& full_path_out, S32 texture_index, const std::string& texture_type, const std::string& material_name)
{
S32 sourceIndex;
if (!validateTextureIndex(texture_index, sourceIndex))
@@ -661,6 +662,12 @@ std::string LLGLTFLoader::processTexture(S32 texture_index, const std::string& t
{
// Uri might be escaped
filename = LLURI::unescape(filename);
+ full_path = dir + gDirUtilp->getDirDelimiter() + filename;
+ }
+
+ if (gDirUtilp->fileExists(full_path))
+ {
+ full_path_out = full_path;
}
LL_INFOS("GLTF_IMPORT") << "Found texture: " << filename << " for material: " << material_name << LL_ENDL;
diff --git a/indra/newview/gltf/llgltfloader.h b/indra/newview/gltf/llgltfloader.h
index 7aa1a94c20..a847e567a6 100644
--- a/indra/newview/gltf/llgltfloader.h
+++ b/indra/newview/gltf/llgltfloader.h
@@ -149,7 +149,7 @@ private:
void processNodeHierarchy(S32 node_idx, std::map<std::string, S32>& mesh_name_counts, U32 submodel_limit, const LLVolumeParams& volume_params);
bool addJointToModelSkin(LLMeshSkinInfo& skin_info, S32 gltf_skin_idx, size_t gltf_joint_idx);
LLGLTFImportMaterial processMaterial(S32 material_index, S32 fallback_index);
- std::string processTexture(S32 texture_index, const std::string& texture_type, const std::string& material_name);
+ std::string processTexture(std::string& full_path_out, S32 texture_index, const std::string& texture_type, const std::string& material_name);
bool validateTextureIndex(S32 texture_index, S32& source_index);
std::string generateMaterialName(S32 material_index, S32 fallback_index = -1);
bool populateModelFromMesh(LLModel* pModel, const std::string& base_name, const LL::GLTF::Mesh &mesh, const LL::GLTF::Node &node, material_map& mats);
diff --git a/indra/newview/llaccountingcostmanager.cpp b/indra/newview/llaccountingcostmanager.cpp
index 54d8ceb85a..b30fe16c58 100644
--- a/indra/newview/llaccountingcostmanager.cpp
+++ b/indra/newview/llaccountingcostmanager.cpp
@@ -53,8 +53,8 @@ void LLAccountingCostManager::accountingCostCoro(std::string url,
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("AccountingCost", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("accountingCostCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
try
{
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index e95d192f72..0d7ad0a124 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -437,8 +437,8 @@ LLAgent::LLAgent() :
mAutoPilotTargetDist(0.f),
mAutoPilotNoProgressFrameCount(0),
mAutoPilotRotationThreshold(0.f),
- mAutoPilotFinishedCallback(NULL),
- mAutoPilotCallbackData(NULL),
+ mAutoPilotFinishedCallback(nullptr),
+ mAutoPilotCallbackData(nullptr),
mMovementKeysLocked(false),
@@ -455,8 +455,8 @@ LLAgent::LLAgent() :
mVoiceConnected(false),
- mMouselookModeInSignal(NULL),
- mMouselookModeOutSignal(NULL)
+ mMouselookModeInSignal(nullptr),
+ mMouselookModeOutSignal(nullptr)
{
for (U32 i = 0; i < TOTAL_CONTROLS; i++)
{
@@ -464,7 +464,7 @@ LLAgent::LLAgent() :
mControlsTakenPassedOnCount[i] = 0;
}
- mListener.reset(new LLAgentListener(*this));
+ mListener = std::make_shared<LLAgentListener>(*this);
addParcelChangedCallback(&setCanEditParcel);
@@ -4700,9 +4700,9 @@ void LLAgent::requestAgentUserInfoCoro(std::string capurl)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestAgentUserInfoCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("requestAgentUserInfoCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
LLCore::HttpHeaders::ptr_t httpHeaders;
httpOpts->setFollowRedirects(true);
@@ -4760,9 +4760,9 @@ void LLAgent::updateAgentUserInfoCoro(std::string capurl, std::string directory_
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestAgentUserInfoCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("requestAgentUserInfoCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
LLCore::HttpHeaders::ptr_t httpHeaders;
httpOpts->setFollowRedirects(true);
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index c1d3c6c14b..3352890d99 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -39,9 +39,10 @@
#include "httprequest.h"
#include "llcorehttputil.h"
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
+#include <functional>
+
extern const bool ANIMATE;
extern const U8 AGENT_STATE_TYPING; // Typing indication
extern const U8 AGENT_STATE_EDITING; // Set when agent has objects selected
@@ -254,7 +255,7 @@ public:
void changeParcels(); // called by LLViewerParcelMgr when we cross a parcel boundary
// Register a boost callback to be called when the agent changes parcels
- typedef boost::function<void()> parcel_changed_callback_t;
+ typedef std::function<void()> parcel_changed_callback_t;
boost::signals2::connection addParcelChangedCallback(parcel_changed_callback_t);
private:
@@ -756,7 +757,7 @@ public:
void requestEnterGodMode();
void requestLeaveGodMode();
- typedef boost::function<void (U8)> god_level_change_callback_t;
+ typedef std::function<void(U8)> god_level_change_callback_t;
typedef boost::signals2::signal<void (U8)> god_level_change_signal_t;
typedef boost::signals2::connection god_level_change_slot_t;
@@ -964,8 +965,8 @@ public:
/// Utilities for allowing the the agent sub managers to post and get via
/// HTTP using the agent's policy settings and headers.
- bool requestPostCapability(const std::string &capName, LLSD &postData, httpCallback_t cbSuccess = NULL, httpCallback_t cbFailure = NULL);
- bool requestGetCapability(const std::string &capName, httpCallback_t cbSuccess = NULL, httpCallback_t cbFailure = NULL);
+ bool requestPostCapability(const std::string &capName, LLSD &postData, httpCallback_t cbSuccess = nullptr, httpCallback_t cbFailure = nullptr);
+ bool requestGetCapability(const std::string& capName, httpCallback_t cbSuccess = nullptr, httpCallback_t cbFailure = nullptr);
LLCore::HttpRequest::policy_t getAgentPolicy() const { return mHttpPolicy; }
diff --git a/indra/newview/llagentpicksinfo.cpp b/indra/newview/llagentpicksinfo.cpp
index 265e4060ff..4a5c037f1f 100644
--- a/indra/newview/llagentpicksinfo.cpp
+++ b/indra/newview/llagentpicksinfo.cpp
@@ -53,7 +53,7 @@ public:
LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(gAgent.getID());
}
- typedef boost::function<void(LLAvatarData*)> server_respond_callback_t;
+ typedef std::function<void(LLAvatarData*)> server_respond_callback_t;
void setServerRespondCallback(const server_respond_callback_t& cb)
{
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index 1e118ffa98..70da86805c 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -189,11 +189,11 @@ public:
// Signals
//--------------------------------------------------------------------
public:
- typedef boost::function<void()> loading_started_callback_t;
+ typedef std::function<void()> loading_started_callback_t;
typedef boost::signals2::signal<void()> loading_started_signal_t;
boost::signals2::connection addLoadingStartedCallback(loading_started_callback_t cb);
- typedef boost::function<void()> loaded_callback_t;
+ typedef std::function<void()> loaded_callback_t;
typedef boost::signals2::signal<void()> loaded_signal_t;
boost::signals2::connection addLoadedCallback(loaded_callback_t cb);
diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp
index 5114ac8a08..1da1647fe8 100644
--- a/indra/newview/llaisapi.cpp
+++ b/indra/newview/llaisapi.cpp
@@ -861,8 +861,8 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht
return;
}
- LLCore::HttpOptions::ptr_t httpOptions(new LLCore::HttpOptions);
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest());
+ LLCore::HttpOptions::ptr_t httpOptions = std::make_shared<LLCore::HttpOptions>();
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLCore::HttpHeaders::ptr_t httpHeaders;
httpOptions->setTimeout(HTTP_TIMEOUT);
@@ -950,7 +950,7 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht
LL_DEBUGS("Inventory", "AIS3") << "Result: " << result << LL_ENDL;
onUpdateReceived(result, type, body);
- if (callback && !callback.empty())
+ if (callback != nullptr)
{
bool needs_callback = true;
LLUUID id(LLUUID::null);
diff --git a/indra/newview/llaisapi.h b/indra/newview/llaisapi.h
index dd490c8268..cfc286da2e 100644
--- a/indra/newview/llaisapi.h
+++ b/indra/newview/llaisapi.h
@@ -44,7 +44,7 @@ public:
LIBRARY
} ITEM_TYPE;
- typedef boost::function<void(const LLUUID &invItem)> completion_t;
+ typedef std::function<void(const LLUUID& invItem)> completion_t;
static bool isAvailable();
static void getCapNames(LLSD& capNames);
@@ -89,7 +89,7 @@ private:
static const std::string INVENTORY_CAP_NAME;
static const std::string LIBRARY_CAP_NAME;
- typedef boost::function < LLSD (LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t, LLCore::HttpRequest::ptr_t,
+ typedef std::function<LLSD(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t, LLCore::HttpRequest::ptr_t,
const std::string, LLSD, LLCore::HttpOptions::ptr_t, LLCore::HttpHeaders::ptr_t) > invokationFn_t;
static void EnqueueAISCommand(const std::string &procName, LLCoprocedureManager::CoProcedure_t proc);
diff --git a/indra/newview/llappcorehttp.cpp b/indra/newview/llappcorehttp.cpp
index f4f19906f1..f3265afebd 100644
--- a/indra/newview/llappcorehttp.cpp
+++ b/indra/newview/llappcorehttp.cpp
@@ -145,8 +145,8 @@ LLAppCoreHttp::~LLAppCoreHttp()
void LLAppCoreHttp::init()
{
LLCoreHttpUtil::setPropertyMethods(
- boost::bind(&LLControlGroup::getBOOL, boost::ref(gSavedSettings), _1),
- boost::bind(&LLControlGroup::declareBOOL, boost::ref(gSavedSettings), _1, _2, _3, LLControlVariable::PERSIST_NONDFT));
+ std::bind(&LLControlGroup::getBOOL, std::ref(gSavedSettings), std::placeholders::_1),
+ std::bind(&LLControlGroup::declareBOOL, std::ref(gSavedSettings), std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, LLControlVariable::PERSIST_NONDFT));
LLCore::LLHttp::initialize();
diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm
index af18dca185..0b3d0355a2 100644
--- a/indra/newview/llappdelegate-objc.mm
+++ b/indra/newview/llappdelegate-objc.mm
@@ -28,9 +28,11 @@
#if defined(LL_BUGSPLAT)
#include <boost/filesystem.hpp>
#include <vector>
-@import BugsplatMac;
+@import CrashReporter;
+@import HockeySDK;
+@import BugSplatMac;
// derived from BugsplatMac's BugsplatTester/AppDelegate.m
-@interface LLAppDelegate () <BugsplatStartupManagerDelegate>
+@interface LLAppDelegate () <BugSplatDelegate>
@end
#endif
#include "llwindowmacosx-objc.h"
@@ -68,13 +70,22 @@
#if defined(LL_BUGSPLAT)
infos("bugsplat setup");
- // Engage BugsplatStartupManager *before* calling initViewer() to handle
+ // Engage BugSplat *before* calling initViewer() to handle
// any crashes during initialization.
// https://www.bugsplat.com/docs/platforms/os-x#initialization
- [BugsplatStartupManager sharedManager].autoSubmitCrashReport = YES;
- [BugsplatStartupManager sharedManager].askUserDetails = NO;
- [BugsplatStartupManager sharedManager].delegate = self;
- [[BugsplatStartupManager sharedManager] start];
+
+ // Initialize BugSplat
+ [[BugSplat shared] setDelegate:self];
+ [[BugSplat shared] setAutoSubmitCrashReport:YES];
+ [[BugSplat shared] setPersistUserDetails:NO];
+ [[BugSplat shared] setAskUserDetails:NO];
+ [BugSplat shared].expirationTimeInterval = 0;
+ [[BugSplat shared] start];
+
+ // Optionally, add some attributes to your crash reports.
+ // Attributes are artibrary key/value pairs that are searchable in the BugSplat dashboard.
+ // [[BugSplat shared] setValue:@"Value of Plain Attribute" forAttribute:@"PlainAttribute"];
+
#endif
infos("post-bugsplat setup");
@@ -213,9 +224,54 @@
return true;
}
+- (void) setBugsplatValue:(nullable NSString *)value forAttribute:(NSString *)attribute
+{
+#if defined(LL_BUGSPLAT)
+ //[[BugSplat shared] setValue:@"Value of not so plain <value> Attribute" forAttribute:@"NotSoPlainAttribute"];
+ [[BugSplat shared] setValue:value forAttribute:attribute];
+#endif // LL_BUGSPLAT
+}
+
#if defined(LL_BUGSPLAT)
-- (NSString *)applicationLogForBugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager
+- (void)bugSplatWillSendCrashReport:(BugSplat *)bugSplat
+{
+ infos("bugSplatWillSendCrashReport");
+}
+
+- (void)bugSplatWillSendCrashReportsAlways:(BugSplat *)bugSplat
+{
+ infos("bugSplatWillSendCrashReportsAlways");
+}
+
+- (void)bugSplatDidFinishSendingCrashReport:(BugSplat *)bugSplat
+{
+ infos("bugSplatDidFinishSendingCrashReport");
+
+ if(!secondLogPath.empty())
+ {
+ boost::filesystem::remove(secondLogPath);
+ }
+ clearDumpLogsDir();
+}
+
+- (void)bugSplatWillCancelSendingCrashReport:(BugSplat *)bugSplat
+{
+ infos("bugSplatWillCancelSendingCrashReport");
+}
+
+- (void)bugSplatWillShowSubmitCrashReportAlert:(BugSplat *)bugSplat
+{
+ infos("bugSplatWillShowSubmitCrashReportAlert");
+}
+
+- (void)bugSplat:(BugSplat *)bugSplat didFailWithError:(NSError *)error
+{
+ std::string error_str([[error localizedDescription] UTF8String]);
+ infos("bugSplat:didFailWithError: " + error_str);
+}
+
+- (NSString *)applicationLogForBugSplat:(BugSplat *)bugSplat;
{
CrashMetadata& meta(CrashMetadata_instance());
// As of BugsplatMac 1.0.6, userName and userEmail properties are now
@@ -226,16 +282,21 @@
// report we are about to send.
infos("applicationLogForBugsplatStartupManager setting userName = '" +
meta.agentFullname + '"');
- bugsplatStartupManager.userName =
+ bugSplat.userName =
[NSString stringWithCString:meta.agentFullname.c_str()
encoding:NSUTF8StringEncoding];
// Use the email field for OS version, just as we do on Windows, until
// BugSplat provides more metadata fields.
infos("applicationLogForBugsplatStartupManager setting userEmail = '" +
meta.OSInfo + '"');
- bugsplatStartupManager.userEmail =
+ bugSplat.userEmail =
[NSString stringWithCString:meta.OSInfo.c_str()
encoding:NSUTF8StringEncoding];
+
+ //bugSplat.userID =
+ // [NSString stringWithCString:meta.regionName.c_str()
+ // encoding:NSUTF8StringEncoding];
+
// This strangely-named override method's return value contributes the
// User Description metadata field.
infos("applicationLogForBugsplatStartupManager -> '" + meta.fatalMessage + "'");
@@ -243,7 +304,8 @@
encoding:NSUTF8StringEncoding];
}
-- (NSString *)applicationKeyForBugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager signal:(NSString *)signal exceptionName:(NSString *)exceptionName exceptionReason:(NSString *)exceptionReason {
+- (NSString *)applicationKeyForBugSplat:(BugSplat *)bugSplat signal:(NSString *)signal exceptionName:(NSString *)exceptionName exceptionReason:(NSString *)exceptionReason
+{
// TODO: exceptionName, exceptionReason
// Windows sends location within region as well, but that's because
@@ -258,27 +320,6 @@
encoding:NSUTF8StringEncoding];
}
-- (NSString *)defaultUserNameForBugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager {
- std::string agentFullname(CrashMetadata_instance().agentFullname);
- infos("defaultUserNameForBugsplatStartupManager -> '" + agentFullname + "'");
- return [NSString stringWithCString:agentFullname.c_str()
- encoding:NSUTF8StringEncoding];
-}
-
-- (NSString *)defaultUserEmailForBugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager {
- // Use the email field for OS version, just as we do on Windows, until
- // BugSplat provides more metadata fields.
- std::string OSInfo(CrashMetadata_instance().OSInfo);
- infos("defaultUserEmailForBugsplatStartupManager -> '" + OSInfo + "'");
- return [NSString stringWithCString:OSInfo.c_str()
- encoding:NSUTF8StringEncoding];
-}
-
-- (void)bugsplatStartupManagerWillSendCrashReport:(BugsplatStartupManager *)bugsplatStartupManager
-{
- infos("bugsplatStartupManagerWillSendCrashReport");
-}
-
struct AttachmentInfo
{
AttachmentInfo(const std::string& path, const std::string& type):
@@ -290,7 +331,7 @@ struct AttachmentInfo
std::string pathname, basename, mimetype;
};
-- (NSArray<BugsplatAttachment *> *)attachmentsForBugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager
+- (NSArray<BugSplatAttachment *> *)attachmentsForBugSplat:(BugSplat *)bugSplat
{
const CrashMetadata& metadata(CrashMetadata_instance());
@@ -311,12 +352,12 @@ struct AttachmentInfo
info.push_back(AttachmentInfo(secondLogPath, "text/xml"));
}
- // We "happen to know" that info[0].basename is "SecondLife.old" -- due to
+ // We "happen to know" that info[0].basename is "SecondLife.crash" -- due to
// the fact that BugsplatMac only notices a crash during the viewer run
// following the crash.
// The Bugsplat service doesn't respect the MIME type above when returning
// the log data to a browser, so take this opportunity to rename the file
- // from <base>.old to <base>_log.txt
+ // from <base>.crash to <base>_log.txt
info[0].basename =
boost::filesystem::path(info[0].pathname).stem().string() + "_log.txt";
infos("attachmentsForBugsplatStartupManager attaching log " + info[0].basename);
@@ -334,8 +375,8 @@ struct AttachmentInfo
encoding:NSUTF8StringEncoding];
NSData *nsdata = [NSData dataWithContentsOfFile:nspathname];
- BugsplatAttachment *attachment =
- [[BugsplatAttachment alloc] initWithFilename:nsbasename
+ BugSplatAttachment *attachment =
+ [[BugSplatAttachment alloc] initWithFilename:nsbasename
attachmentData:nsdata
contentType:nsmimetype];
@@ -346,23 +387,6 @@ struct AttachmentInfo
return attachments;
}
-- (void)bugsplatStartupManagerDidFinishSendingCrashReport:(BugsplatStartupManager *)bugsplatStartupManager
-{
- infos("Sent crash report to BugSplat");
-
- if(!secondLogPath.empty())
- {
- boost::filesystem::remove(secondLogPath);
- }
- clearDumpLogsDir();
-}
-
-- (void)bugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager didFailWithError:(NSError *)error
-{
- // TODO: message string from NSError
- infos("Could not send crash report to BugSplat");
-}
-
#endif // LL_BUGSPLAT
@end
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 0d57b33a51..f65aaccddc 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -3908,7 +3908,7 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd
LL_DEBUGS("Avatar") << "Will send request for cof_version " << cofVersion << LL_ENDL;
bRetry = false;
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest());
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
if (gSavedSettings.getBOOL("DebugForceAppearanceRequestFailure"))
{
@@ -4379,8 +4379,8 @@ LLAppearanceMgr::LLAppearanceMgr():
outfit_observer.addCOFSavedCallback(boost::bind(
&LLAppearanceMgr::setOutfitLocked, this, false));
- mUnlockOutfitTimer.reset(new LLOutfitUnLockTimer((F32)gSavedSettings.getS32(
- "OutfitOperationsTimeout")));
+ mUnlockOutfitTimer = std::make_unique<LLOutfitUnLockTimer>((F32)gSavedSettings.getS32(
+ "OutfitOperationsTimeout"));
gIdleCallbacks.addFunction(&LLAttachmentsMgr::onIdle, NULL);
gIdleCallbacks.addFunction(&LLAppearanceMgr::onIdle, NULL); //sheduling appearance update requests
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 0a41a91750..131b6817ed 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -235,7 +235,7 @@ public:
void setAppearanceServiceURL(const std::string& url) { mAppearanceServiceURL = url; }
std::string getAppearanceServiceURL() const;
- typedef boost::function<void ()> attachments_changed_callback_t;
+ typedef std::function<void()> attachments_changed_callback_t;
typedef boost::signals2::signal<void ()> attachments_changed_signal_t;
boost::signals2::connection setAttachmentsChangedCallback(attachments_changed_callback_t cb);
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index bfd8b1dcc7..72bfdcf83c 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -216,7 +216,6 @@
#include "llfloatersimplesnapshot.h"
#include "llfloatersnapshot.h"
#include "llsidepanelinventory.h"
-#include "llatmosphere.h"
// includes for idle() idleShutdown()
#include "llviewercontrol.h"
@@ -1232,8 +1231,8 @@ bool LLAppViewer::init()
/// Tell the Coprocedure manager how to discover and store the pool sizes
// what I wanted
LLCoprocedureManager::getInstance()->setPropertyMethods(
- boost::bind(&LLControlGroup::getU32, boost::ref(gSavedSettings), _1),
- boost::bind(&LLControlGroup::declareU32, boost::ref(gSavedSettings), _1, _2, _3, LLControlVariable::PERSIST_ALWAYS));
+ std::bind(&LLControlGroup::getU32, std::ref(gSavedSettings), std::placeholders::_1),
+ std::bind(&LLControlGroup::declareU32, std::ref(gSavedSettings), std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, LLControlVariable::PERSIST_ALWAYS));
// TODO: consider moving proxy initialization here or LLCopocedureManager after proxy initialization, may be implement
// some other protection to make sure we don't use network before initializng proxy
@@ -1700,8 +1699,6 @@ void LLAppViewer::flushLFSIO()
bool LLAppViewer::cleanup()
{
- LLAtmosphere::cleanupClass();
-
//ditch LLVOAvatarSelf instance
gAgentAvatarp = NULL;
@@ -3622,10 +3619,15 @@ void LLAppViewer::writeSystemInfo()
if (! gDebugInfo.has("Dynamic") )
gDebugInfo["Dynamic"] = LLSD::emptyMap();
-#if LL_WINDOWS && !LL_BUGSPLAT
+#if LL_DARWIN
+ // crash processing in CrashMetadataSingleton reads SLLog
+ gDebugInfo["SLLog"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLife.crash");
+#elif LL_WINDOWS && !LL_BUGSPLAT
gDebugInfo["SLLog"] = gDirUtilp->getExpandedFilename(LL_PATH_DUMP,"SecondLife.log");
#else
- //Not ideal but sufficient for good reporting.
+ // Far from ideal, especially when multiple instances get involved.
+ // Note that attachmentsForBugSplat expects .old extendion.
+ // Todo: improve.
gDebugInfo["SLLog"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLife.old"); //LLError::logFileName();
#endif
@@ -4032,6 +4034,22 @@ void LLAppViewer::processMarkerFiles()
}
LLAPRFile::remove(error_marker_file);
}
+
+#if LL_DARWIN
+ if (!mSecondInstance && gLastExecEvent != LAST_EXEC_NORMAL)
+ {
+ // While windows reports crashes immediately, mac reports next run and
+ // may take a while to trigger crash report so it has a special file.
+ // Remove .crash file if exists
+ std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
+ "SecondLife.old");
+ std::string crash_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
+ "SecondLife.crash");
+ LLFile::remove(crash_log_file);
+ // Rename ".old" log file to ".crash"
+ LLFile::rename(old_log_file, crash_log_file);
+ }
+#endif
}
void LLAppViewer::removeMarkerFiles()
@@ -4386,6 +4404,8 @@ bool LLAppViewer::initCache()
LL_WARNS("AppCache") << "Unable to set cache location" << LL_ENDL;
gSavedSettings.setString("CacheLocation", "");
gSavedSettings.setString("CacheLocationTopFolder", "");
+ gSavedSettings.setString("NewCacheLocation", "");
+ gSavedSettings.setString("NewCacheLocationTopFolder", "");
}
const std::string cache_dir = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, cache_dir_name);
@@ -4438,7 +4458,7 @@ bool LLAppViewer::initCache()
return true;
}
-void LLAppViewer::addOnIdleCallback(const boost::function<void()>& cb)
+void LLAppViewer::addOnIdleCallback(const std::function<void()>& cb)
{
gMainloopWork.post(cb);
}
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 4f2583cb16..c12b2e83ef 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -222,7 +222,7 @@ public:
return mOnLoginCompleted.connect(cb);
}
- void addOnIdleCallback(const boost::function<void()>& cb); // add a callback to fire (once) when idle
+ void addOnIdleCallback(const std::function<void()>& cb); // add a callback to fire (once) when idle
void initGeneralThread();
void purgeUserDataOnExit() { mPurgeUserDataOnExit = true; }
diff --git a/indra/newview/llappviewerlistener.h b/indra/newview/llappviewerlistener.h
index 5ade3d3e04..8686d6522e 100644
--- a/indra/newview/llappviewerlistener.h
+++ b/indra/newview/llappviewerlistener.h
@@ -30,7 +30,7 @@
#define LL_LLAPPVIEWERLISTENER_H
#include "lleventapi.h"
-#include <boost/function.hpp>
+#include <functional>
class LLAppViewer;
class LLSD;
@@ -39,7 +39,7 @@ class LLSD;
class LLAppViewerListener: public LLEventAPI
{
public:
- typedef boost::function<LLAppViewer*(void)> LLAppViewerGetter;
+ typedef std::function<LLAppViewer*(void)> LLAppViewerGetter;
/// Bind the LLAppViewer instance to use (e.g. LLAppViewer::instance()).
LLAppViewerListener(const LLAppViewerGetter& getter);
diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp
index 7dce627044..9d9948731f 100644
--- a/indra/newview/llavatarpropertiesprocessor.cpp
+++ b/indra/newview/llavatarpropertiesprocessor.cpp
@@ -269,11 +269,11 @@ void LLAvatarPropertiesProcessor::requestAvatarPropertiesCoro(std::string cap_ur
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestAvatarPropertiesCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("requestAvatarPropertiesCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLCore::HttpHeaders::ptr_t httpHeaders;
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setFollowRedirects(true);
std::string finalUrl = cap_url + "/" + avatar_id.asString();
diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp
index 44f35981b0..309bed6f8b 100644
--- a/indra/newview/llavatarrenderinfoaccountant.cpp
+++ b/indra/newview/llavatarrenderinfoaccountant.cpp
@@ -77,9 +77,9 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoGetCoro(std::string url, U64
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("AvatarRenderInfoAccountant", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("AvatarRenderInfoAccountant", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
// Going to request each 15 seconds either way, so don't wait
// too long and don't repeat
@@ -194,9 +194,9 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro(std::string url, U
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("AvatarRenderInfoAccountant", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("AvatarRenderInfoAccountant", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
// Going to request each 60+ seconds, timeout is 30s.
// Don't repeat too often, will be sending newer data soon
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index 5114c97beb..c19f7dc1c1 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -187,7 +187,7 @@ public:
/*virtual*/ boost::signals2::connection setLeftButtonClickCallback(
const commit_callback_t& cb);
- typedef boost::function<void (LLChiclet* ctrl, const LLSD& param)>
+ typedef std::function<void(LLChiclet* ctrl, const LLSD& param)>
chiclet_size_changed_callback_t;
/**
diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h
index 6f0e97a98b..b349f35921 100644
--- a/indra/newview/llcofwearables.h
+++ b/indra/newview/llcofwearables.h
@@ -54,7 +54,7 @@ public:
LLCOFCallbacks() {};
virtual ~LLCOFCallbacks() {};
- typedef boost::function<void ()> cof_callback_t;
+ typedef std::function<void()> cof_callback_t;
cof_callback_t mAddWearable;
cof_callback_t mMoveWearableCloser;
diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp
index f21bae9805..0734b12531 100644
--- a/indra/newview/llcommandlineparser.cpp
+++ b/indra/newview/llcommandlineparser.cpp
@@ -32,7 +32,6 @@
#include <boost/lexical_cast.hpp>
#include <boost/bind.hpp>
#include <boost/tokenizer.hpp>
-#include <boost/assign/list_of.hpp>
#include "llsdserialize.h"
#include "llerror.h"
@@ -61,14 +60,7 @@ namespace
// List of command-line switches that can't map-to settings variables.
// Going forward, we want every new command-line switch to map-to some
// settings variable. This list is used to validate that.
- const std::set<std::string> unmapped_options = boost::assign::list_of
- ("help")
- ("set")
- ("setdefault")
- ("settings")
- ("sessionsettings")
- ("usersessionsettings")
- ;
+ const std::set<std::string> unmapped_options = { "help", "set", "setdefault", "settings", "sessionsettings", "usersessionsettings" };
po::options_description gOptionsDesc;
po::positional_options_description gPositionalOptions;
@@ -101,7 +93,7 @@ class LLCLPValue : public po::value_semantic_codecvt_helper<char>
unsigned mMinTokens;
unsigned mMaxTokens;
bool mIsComposing;
- typedef boost::function1<void, const LLCommandLineParser::token_vector_t&> notify_callback_t;
+ typedef std::function<void(const LLCommandLineParser::token_vector_t&)> notify_callback_t;
notify_callback_t mNotifyCallback;
bool mLastOption;
@@ -226,7 +218,7 @@ protected:
// LLCommandLineParser defintions
//----------------------------------------------------------------------------
void LLCommandLineParser::addOptionDesc(const std::string& option_name,
- boost::function1<void, const token_vector_t&> notify_callback,
+ std::function<void(const token_vector_t&)> notify_callback,
unsigned int token_count,
const std::string& description,
const std::string& short_name,
@@ -255,7 +247,7 @@ void LLCommandLineParser::addOptionDesc(const std::string& option_name,
value_desc,
description.c_str()));
- if(!notify_callback.empty())
+ if(notify_callback)
{
value_desc->setNotifyCallback(notify_callback);
}
@@ -693,7 +685,7 @@ void LLControlGroupCLP::configure(const std::string& config_filename, LLControlG
last_option = option_params["last_option"].asBoolean();
}
- boost::function1<void, const token_vector_t&> callback;
+ std::function<void(const token_vector_t&)> callback;
if (! option_params.has("map-to"))
{
// If this option isn't mapped to a settings variable, is it
diff --git a/indra/newview/llcommandlineparser.h b/indra/newview/llcommandlineparser.h
index 5279d02c0a..984bcfbad0 100644
--- a/indra/newview/llcommandlineparser.h
+++ b/indra/newview/llcommandlineparser.h
@@ -27,7 +27,7 @@
#ifndef LL_LLCOMMANDLINEPARSER_H
#define LL_LLCOMMANDLINEPARSER_H
-#include <boost/function/function1.hpp>
+#include <functional>
// *NOTE:Mani The following is a forward decl of
// boost::program_options::command_line_parser
@@ -58,7 +58,7 @@ public:
*/
void addOptionDesc(
const std::string& option_name,
- boost::function1<void, const token_vector_t&> notify_callback = 0,
+ std::function<void(const token_vector_t&)> notify_callback = nullptr,
unsigned int num_tokens = 0,
const std::string& description = LLStringUtil::null,
const std::string& short_name = LLStringUtil::null,
@@ -121,7 +121,7 @@ public:
* The parser_func takes an input string, and should return a
* name/value pair as the result.
*/
- typedef boost::function1<std::pair<std::string, std::string>, const std::string&> parser_func;
+ typedef std::function<std::pair<std::string, std::string>(const std::string&)> parser_func;
void setCustomParser(parser_func f) { mExtraParser = f; }
private:
diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp
index 552ea75559..e0236ca618 100644
--- a/indra/newview/llcompilequeue.cpp
+++ b/indra/newview/llcompilequeue.cpp
@@ -467,7 +467,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle<LLFloaterCompileQueue> hfloat
std::string url = object->getRegion()->getCapability("UpdateScriptTask");
{
- LLResourceUploadInfo::ptr_t uploadInfo(new LLQueuedScriptAssetUpload(object->getID(),
+ LLResourceUploadInfo::ptr_t uploadInfo = std::make_shared<LLQueuedScriptAssetUpload>(object->getID(),
inventory->getUUID(),
assetId,
monocompile ? LLScriptAssetUpload::MONO : LLScriptAssetUpload::LSL2,
@@ -475,7 +475,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle<LLFloaterCompileQueue> hfloat
inventory->getName(),
LLUUID(),
experienceId,
- boost::bind(&LLFloaterCompileQueue::handleHTTPResponse, pump.getName(), _4)));
+ boost::bind(&LLFloaterCompileQueue::handleHTTPResponse, pump.getName(), _4));
LLViewerAssetUpload::EnqueueInventoryUpload(url, uploadInfo);
}
diff --git a/indra/newview/llcompilequeue.h b/indra/newview/llcompilequeue.h
index 951d4800e8..bcbb166c58 100644
--- a/indra/newview/llcompilequeue.h
+++ b/indra/newview/llcompilequeue.h
@@ -98,7 +98,7 @@ protected:
std::string mStartString;
bool mMono;
- typedef boost::function<bool(const LLPointer<LLViewerObject> &, LLInventoryObject*, LLEventPump &)> fnQueueAction_t;
+ typedef std::function<bool(const LLPointer<LLViewerObject> &, LLInventoryObject*, LLEventPump &)> fnQueueAction_t;
static void objectScriptProcessingQueueCoro(std::string action, LLHandle<LLFloaterScriptQueue> hfloater, object_data_list_t objectList, fnQueueAction_t func);
};
diff --git a/indra/newview/lldndbutton.h b/indra/newview/lldndbutton.h
index 277c2aad69..d503b367e1 100644
--- a/indra/newview/lldndbutton.h
+++ b/indra/newview/lldndbutton.h
@@ -47,7 +47,7 @@ public:
LLDragAndDropButton(const Params& params);
- typedef boost::function<bool (
+ typedef std::function<bool (
S32 /*x*/, S32 /*y*/, MASK /*mask*/, bool /*drop*/,
EDragAndDropType /*cargo_type*/,
void* /*cargo_data*/,
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 9d212cfe8b..322ee90541 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -925,7 +925,10 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
LLVector3 cam_pos_from_agent = LLViewerCamera::getInstance()->getOrigin();
LLVector3 cam_to_box_offset = point_to_box_offset(cam_pos_from_agent, av_box);
mDistanceWRTCamera = llmax(0.01f, ll_round(cam_to_box_offset.magVec(), 0.01f));
- mVObjp->updateLOD();
+ if (mVObjp)
+ {
+ mVObjp->updateLOD();
+ }
return;
}
}
@@ -936,7 +939,10 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
pos -= camera.getOrigin();
mDistanceWRTCamera = ll_round(pos.magVec(), 0.01f);
- mVObjp->updateLOD();
+ if (mVObjp)
+ {
+ mVObjp->updateLOD();
+ }
}
}
@@ -948,6 +954,11 @@ void LLDrawable::updateTexture()
return;
}
+ if (!mVObjp)
+ {
+ return;
+ }
+
if (getNumFaces() != mVObjp->getNumTEs())
{ //drawable is transitioning its face count
return;
diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h
index a7ac9da618..6f6faf9909 100644
--- a/indra/newview/lldrawable.h
+++ b/indra/newview/lldrawable.h
@@ -67,17 +67,8 @@ class LLDrawable
public:
typedef std::vector<LLFace*> face_list_t;
- LLDrawable(const LLDrawable& rhs)
- : LLViewerOctreeEntryData(rhs)
- {
- *this = rhs;
- }
-
- const LLDrawable& operator=(const LLDrawable& rhs)
- {
- LL_ERRS() << "Illegal operation!" << LL_ENDL;
- return *this;
- }
+ LLDrawable(const LLDrawable& rhs) = delete;
+ const LLDrawable& operator=(const LLDrawable& rhs) = delete;
static void initClass();
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 90ee95d424..f0f589e7f4 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -794,7 +794,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
return;
}
- if ((sShaderLevel >= SHADER_LEVEL_CLOTH))
+ if (LLPipeline::RenderAvatarCloth)
{
LLMatrix4 rot_mat;
LLViewerCamera::getInstance()->getMatrixToLocal(rot_mat);
diff --git a/indra/newview/lldrawpoolavatar.h b/indra/newview/lldrawpoolavatar.h
index 1a53861a03..87a87e225e 100644
--- a/indra/newview/lldrawpoolavatar.h
+++ b/indra/newview/lldrawpoolavatar.h
@@ -46,12 +46,6 @@ class LLDrawPoolAvatar : public LLFacePool
public:
enum
{
- SHADER_LEVEL_BUMP = 2,
- SHADER_LEVEL_CLOTH = 3
- };
-
- enum
- {
VERTEX_DATA_MASK = LLVertexBuffer::MAP_VERTEX |
LLVertexBuffer::MAP_NORMAL |
LLVertexBuffer::MAP_TEXCOORD0 |
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index bf593bff07..0578072bb2 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -55,8 +55,6 @@
// static
LLStandardBumpmap gStandardBumpmapList[TEM_BUMPMAP_COUNT];
-LL::WorkQueue::weak_t LLBumpImageList::sMainQueue;
-LL::WorkQueue::weak_t LLBumpImageList::sTexUpdateQueue;
LLRenderTarget LLBumpImageList::sRenderTarget;
// static
@@ -629,8 +627,6 @@ void LLBumpImageList::init()
llassert( mDarknessEntries.size() == 0 );
LLStandardBumpmap::restoreGL();
- sMainQueue = LL::WorkQueue::getInstance("mainloop");
- sTexUpdateQueue = LL::WorkQueue::getInstance("LLImageGL"); // Share work queue with tex loader.
}
void LLBumpImageList::clear()
diff --git a/indra/newview/lldrawpoolbump.h b/indra/newview/lldrawpoolbump.h
index 15976884ca..e1a468cd18 100644
--- a/indra/newview/lldrawpoolbump.h
+++ b/indra/newview/lldrawpoolbump.h
@@ -152,8 +152,6 @@ private:
typedef std::unordered_map<LLUUID, LLPointer<LLViewerTexture> > bump_image_map_t;
bump_image_map_t mBrightnessEntries;
bump_image_map_t mDarknessEntries;
- static LL::WorkQueue::weak_t sMainQueue;
- static LL::WorkQueue::weak_t sTexUpdateQueue;
static LLRenderTarget sRenderTarget;
};
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index 305215f541..e6d0b036e0 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -32,7 +32,6 @@
#include "llface.h"
#include "llimage.h"
#include "llrender.h"
-#include "llatmosphere.h"
#include "llenvironment.h"
#include "llglslshader.h"
#include "llgl.h"
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 875dac103c..d942715fff 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -54,7 +54,6 @@
#include "llregioninfomodel.h"
-#include "llatmosphere.h"
#include "llagent.h"
#include "roles_constants.h"
#include "llestateinfomodel.h"
@@ -965,54 +964,6 @@ LLSettingsWater::ptr_t LLEnvironment::getCurrentWater() const
return pwater;
}
-void LayerConfigToDensityLayer(const LLSD& layerConfig, DensityLayer& layerOut)
-{
- layerOut.constant_term = (F32)layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_CONSTANT_TERM].asReal();
- layerOut.exp_scale = (F32)layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR].asReal();
- layerOut.exp_term = (F32)layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM].asReal();
- layerOut.linear_term = (F32)layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM].asReal();
- layerOut.width = (F32)layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_WIDTH].asReal();
-}
-
-void LLEnvironment::getAtmosphericModelSettings(AtmosphericModelSettings& settingsOut, const LLSettingsSky::ptr_t &psky)
-{
- settingsOut.m_skyBottomRadius = psky->getSkyBottomRadius();
- settingsOut.m_skyTopRadius = psky->getSkyTopRadius();
- settingsOut.m_sunArcRadians = psky->getSunArcRadians();
- settingsOut.m_mieAnisotropy = psky->getMieAnisotropy();
-
- LLSD rayleigh = psky->getRayleighConfigs();
- settingsOut.m_rayleighProfile.clear();
- for (LLSD::array_iterator itf = rayleigh.beginArray(); itf != rayleigh.endArray(); ++itf)
- {
- DensityLayer layer;
- LLSD& layerConfig = (*itf);
- LayerConfigToDensityLayer(layerConfig, layer);
- settingsOut.m_rayleighProfile.push_back(layer);
- }
-
- LLSD mie = psky->getMieConfigs();
- settingsOut.m_mieProfile.clear();
- for (LLSD::array_iterator itf = mie.beginArray(); itf != mie.endArray(); ++itf)
- {
- DensityLayer layer;
- LLSD& layerConfig = (*itf);
- LayerConfigToDensityLayer(layerConfig, layer);
- settingsOut.m_mieProfile.push_back(layer);
- }
- settingsOut.m_mieAnisotropy = psky->getMieAnisotropy();
-
- LLSD absorption = psky->getAbsorptionConfigs();
- settingsOut.m_absorptionProfile.clear();
- for (LLSD::array_iterator itf = absorption.beginArray(); itf != absorption.endArray(); ++itf)
- {
- DensityLayer layer;
- LLSD& layerConfig = (*itf);
- LayerConfigToDensityLayer(layerConfig, layer);
- settingsOut.m_absorptionProfile.push_back(layer);
- }
-}
-
bool LLEnvironment::canAgentUpdateParcelEnvironment() const
{
LLParcel *parcel(LLViewerParcelMgr::instance().getAgentOrSelectedParcel());
@@ -2022,8 +1973,8 @@ void LLEnvironment::coroRequestEnvironment(S32 parcel_id, LLEnvironment::environ
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("ResetEnvironment", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("ResetEnvironment", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
std::string url = gAgent.getRegionCapability("ExtEnvironment");
if (url.empty())
@@ -2070,8 +2021,8 @@ void LLEnvironment::coroUpdateEnvironment(S32 parcel_id, S32 track_no, UpdateInf
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("ResetEnvironment", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("ResetEnvironment", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
std::string url = gAgent.getRegionCapability("ExtEnvironment");
if (url.empty())
@@ -2186,8 +2137,8 @@ void LLEnvironment::coroResetEnvironment(S32 parcel_id, S32 track_no, environmen
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("ResetEnvironment", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("ResetEnvironment", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
std::string url = gAgent.getRegionCapability("ExtEnvironment");
if (url.empty())
@@ -2743,13 +2694,6 @@ bool LLEnvironment::DayInstance::setSky(const LLSettingsSky::ptr_t &psky)
mSky->update();
mBlenderSky.reset();
- if (gAtmosphere)
- {
- AtmosphericModelSettings settings;
- LLEnvironment::getAtmosphericModelSettings(settings, psky);
- gAtmosphere->configureAtmosphericModel(settings);
- }
-
return changed;
}
@@ -3418,8 +3362,8 @@ namespace
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("testExperiencesOnParcelCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("testExperiencesOnParcelCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
std::string url = gAgent.getRegionCapability("ExperienceQuery");
if (url.empty())
diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h
index f1205a72b7..217c069705 100644
--- a/indra/newview/llenvironment.h
+++ b/indra/newview/llenvironment.h
@@ -36,8 +36,6 @@
#include "llsettingswater.h"
#include "llsettingsdaycycle.h"
-#include "llatmosphere.h"
-
#include "llglslshader.h"
#include <boost/signals2.hpp>
@@ -131,8 +129,6 @@ public:
LLSettingsSky::ptr_t getCurrentSky() const;
LLSettingsWater::ptr_t getCurrentWater() const;
- static void getAtmosphericModelSettings(AtmosphericModelSettings& settingsOut, const LLSettingsSky::ptr_t &psky);
-
void update(const LLViewerCamera * cam);
static void updateGLVariablesForSettings(LLShaderUniforms* uniforms, const LLSettingsBase::ptr_t &psetting);
diff --git a/indra/newview/llestateinfomodel.cpp b/indra/newview/llestateinfomodel.cpp
index a7d18d85ce..54be045c3d 100644
--- a/indra/newview/llestateinfomodel.cpp
+++ b/indra/newview/llestateinfomodel.cpp
@@ -138,8 +138,8 @@ void LLEstateInfoModel::commitEstateInfoCapsCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("EstateChangeInfo", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("EstateChangeInfo", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD body;
body["estate_name"] = getName();
diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp
index 86c58a3497..de3752d879 100644
--- a/indra/newview/lleventpoll.cpp
+++ b/indra/newview/lleventpoll.cpp
@@ -90,7 +90,7 @@ namespace Details
{
LLAppCoreHttp & app_core_http(LLAppViewer::instance()->getAppCoreHttp());
- mHttpRequest = LLCore::HttpRequest::ptr_t(new LLCore::HttpRequest);
+ mHttpRequest = std::make_shared<LLCore::HttpRequest>();
mHttpPolicy = app_core_http.getPolicy(LLAppCoreHttp::AP_LONG_POLL);
mSenderIp = sender.getIPandPort();
}
@@ -144,7 +144,7 @@ namespace Details
void LLEventPollImpl::eventPollCoro(std::string url)
{
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("EventPoller", mHttpPolicy));
+ LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("EventPoller", mHttpPolicy);
LLSD acknowledge;
int errorCount = 0;
int counter = mCounter; // saved on the stack for logging.
@@ -156,7 +156,7 @@ namespace Details
// This is a loop with its own waitToRetry implementation,
// so disable retries.
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setRetries(0);
LL::WorkQueue::ptr_t main_queue = nullptr;
diff --git a/indra/newview/llexperiencelog.cpp b/indra/newview/llexperiencelog.cpp
index ce10fba2ca..b86474c5ca 100644
--- a/indra/newview/llexperiencelog.cpp
+++ b/indra/newview/llexperiencelog.cpp
@@ -279,6 +279,6 @@ void LLExperienceLog::setNotifyNewEvent( bool val )
}
else if( val && !mNotifyConnection.connected())
{
- mNotifyConnection = addUpdateSignal(boost::function<void(LLSD&)>(LLExperienceLog::notify));
+ mNotifyConnection = addUpdateSignal(std::function<void(LLSD&)>(LLExperienceLog::notify));
}
}
diff --git a/indra/newview/llexternaleditor.cpp b/indra/newview/llexternaleditor.cpp
index 3decd15bbd..193a42f9f6 100644
--- a/indra/newview/llexternaleditor.cpp
+++ b/indra/newview/llexternaleditor.cpp
@@ -44,8 +44,20 @@ LLExternalEditor::EErrorCode LLExternalEditor::setCommand(const std::string& env
std::string cmd = findCommand(env_var, override);
if (cmd.empty())
{
- LL_WARNS() << "Editor command is empty or not set" << LL_ENDL;
- return EC_NOT_SPECIFIED;
+ LL_INFOS() << "Editor command is empty or not set, falling back to OS open handler" << LL_ENDL;
+#if LL_WINDOWS
+ static const std::string os_cmd = "%SystemRoot%\\explorer.exe \"%s\"";
+#elif LL_DARWIN
+ static const std::string os_cmd = "/usr/bin/open \"%s\"";
+#elif LL_LINUX
+ static const std::string os_cmd = "/usr/bin/xdg-open \"%s\"";
+#endif
+ cmd = findCommand("", os_cmd);
+ if (cmd.empty())
+ {
+ LL_WARNS() << "Failed to find OS open handler \"" << cmd << "\"" << LL_ENDL;
+ return EC_NOT_SPECIFIED;
+ }
}
string_vec_t tokens;
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index 65637fbf85..df31e9ea90 100644
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -58,16 +58,8 @@ class alignas(16) LLFace
{
LL_ALIGN_NEW
public:
- LLFace(const LLFace& rhs)
- {
- *this = rhs;
- }
-
- const LLFace& operator=(const LLFace& rhs)
- {
- LL_ERRS() << "Illegal operation!" << LL_ENDL;
- return *this;
- }
+ LLFace(const LLFace& rhs) = delete;
+ const LLFace& operator=(const LLFace& rhs) = delete;
enum EMasks
{
@@ -127,7 +119,7 @@ public:
void setIndexInTex(U32 ch, S32 index) { llassert(ch < LLRender::NUM_TEXTURE_CHANNELS); mIndexInTex[ch] = index; }
void setWorldMatrix(const LLMatrix4& mat);
- const LLTextureEntry* getTextureEntry() const { return mVObjp->getTE(mTEOffset); }
+ const LLTextureEntry* getTextureEntry() const { return mVObjp ? mVObjp->getTE(mTEOffset) : nullptr; }
LLFacePool* getPool() const { return mDrawPoolp; }
U32 getPoolType() const { return mPoolType; }
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index ba54d93c75..1bffe34b8f 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -30,7 +30,6 @@
#include <fstream>
#include <boost/regex.hpp>
-#include <boost/assign/list_of.hpp>
#include "llfeaturemanager.h"
#include "lldir.h"
@@ -184,15 +183,15 @@ void LLFeatureList::dump()
}
}
-static const std::vector<std::string> sGraphicsLevelNames = boost::assign::list_of
- ("Low")
- ("LowMid")
- ("Mid")
- ("MidHigh")
- ("High")
- ("HighUltra")
- ("Ultra")
-;
+static const std::vector<std::string> sGraphicsLevelNames = {
+ "Low",
+ "LowMid",
+ "Mid",
+ "MidHigh",
+ "High",
+ "HighUltra",
+ "Ultra"
+};
U32 LLFeatureManager::getMaxGraphicsLevel() const
{
diff --git a/indra/newview/llfilepicker_mac.h b/indra/newview/llfilepicker_mac.h
index 77cc8540bc..f0e9ce81dc 100644
--- a/indra/newview/llfilepicker_mac.h
+++ b/indra/newview/llfilepicker_mac.h
@@ -42,6 +42,9 @@
std::unique_ptr<std::vector<std::string>> doLoadDialog(const std::vector<std::string>* allowed_types,
unsigned int flags);
+// doLoadDialogModeless if window does not exists creates a modeless
+// window, if it does exist, creates a 'sheet' that does not block
+// thead but blocks window interractions
void doLoadDialogModeless(const std::vector<std::string>* allowed_types,
unsigned int flags,
void (*callback)(bool, std::vector<std::string>&, void*),
diff --git a/indra/newview/llfilepicker_mac.mm b/indra/newview/llfilepicker_mac.mm
index 6cb7c4ad51..6921cd6101 100644
--- a/indra/newview/llfilepicker_mac.mm
+++ b/indra/newview/llfilepicker_mac.mm
@@ -114,38 +114,73 @@ void doLoadDialogModeless(const std::vector<std::string>* allowed_types,
@autoreleasepool
{
- // Note: might need to return and save this panel
- // so that it does not close immediately
NSOpenPanel *panel = init_panel(allowed_types,flags);
+ NSWindow *mainWindow = [NSApp mainWindow];
- [panel beginWithCompletionHandler:^(NSModalResponse result)
+ if (mainWindow)
{
- std::vector<std::string> outfiles;
- if (result == NSModalResponseOK)
+ [panel beginSheetModalForWindow:mainWindow
+ completionHandler:^(NSModalResponse result)
{
- NSArray *filesToOpen = [panel URLs];
- int i, count = [filesToOpen count];
-
- if (count > 0)
+ std::vector<std::string> outfiles;
+ if (result == NSModalResponseOK)
{
+ NSArray *filesToOpen = [panel URLs];
+ int i, count = [filesToOpen count];
- for (i=0; i<count; i++) {
- NSString *aFile = [[filesToOpen objectAtIndex:i] path];
- std::string *afilestr = new std::string([aFile UTF8String]);
- outfiles.push_back(*afilestr);
+ if (count > 0)
+ {
+
+ for (i=0; i<count; i++) {
+ NSString *aFile = [[filesToOpen objectAtIndex:i] path];
+ std::string *afilestr = new std::string([aFile UTF8String]);
+ outfiles.push_back(*afilestr);
+ }
+ callback(true, outfiles, userdata);
+ }
+ else // no valid result
+ {
+ callback(false, outfiles, userdata);
}
- callback(true, outfiles, userdata);
}
- else // no valid result
+ else // cancel
{
callback(false, outfiles, userdata);
}
- }
- else // cancel
+ }];
+ }
+ else
+ {
+ //present as modeless window
+ [panel beginWithCompletionHandler:^(NSModalResponse result)
{
- callback(false, outfiles, userdata);
- }
- }];
+ std::vector<std::string> outfiles;
+ if (result == NSModalResponseOK)
+ {
+ NSArray *filesToOpen = [panel URLs];
+ int i, count = [filesToOpen count];
+
+ if (count > 0)
+ {
+
+ for (i=0; i<count; i++) {
+ NSString *aFile = [[filesToOpen objectAtIndex:i] path];
+ std::string *afilestr = new std::string([aFile UTF8String]);
+ outfiles.push_back(*afilestr);
+ }
+ callback(true, outfiles, userdata);
+ }
+ else // no valid result
+ {
+ callback(false, outfiles, userdata);
+ }
+ }
+ else // cancel
+ {
+ callback(false, outfiles, userdata);
+ }
+ }];
+ }
}
}
diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index a6419f5ad4..05f6c4a867 100644
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -105,7 +105,7 @@ private:
static const std::string sCheckUpdateListenerName;
static void startFetchServerReleaseNotes();
- static void fetchServerReleaseNotesCoro(const std::string& cap_url);
+ static void fetchServerReleaseNotesCoro(const std::string cap_url);
static void handleServerReleaseNotes(LLSD results);
};
@@ -227,12 +227,12 @@ void LLFloaterAbout::startFetchServerReleaseNotes()
}
/*static*/
-void LLFloaterAbout::fetchServerReleaseNotesCoro(const std::string& cap_url)
+void LLFloaterAbout::fetchServerReleaseNotesCoro(const std::string cap_url)
{
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("fetchServerReleaseNotesCoro", LLCore::HttpRequest::DEFAULT_POLICY_ID));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("fetchServerReleaseNotesCoro", LLCore::HttpRequest::DEFAULT_POLICY_ID);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setWantHeaders(true);
httpOpts->setFollowRedirects(false);
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index fd9bbf00ae..c7851013c7 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -410,9 +410,9 @@ void LLFloaterAvatarPicker::findByIdCoro(std::string url, LLUUID query_id, LLUUI
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("findByIdCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("findByIdCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setTimeout(AVATAR_PICKER_SEARCH_TIMEOUT);
@@ -445,9 +445,9 @@ void LLFloaterAvatarPicker::findByNameCoro(std::string url, LLUUID queryID, std:
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("findByNameCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("findByNameCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
LL_INFOS("HttpCoroutineAdapter", "genericPostCoro", "Agent") << "Generic POST for " << url << LL_ENDL;
diff --git a/indra/newview/llfloateravatarpicker.h b/indra/newview/llfloateravatarpicker.h
index 817427aae6..1761497f83 100644
--- a/indra/newview/llfloateravatarpicker.h
+++ b/indra/newview/llfloateravatarpicker.h
@@ -43,7 +43,7 @@ public:
typedef validate_signal_t::slot_type validate_callback_t;
// The callback function will be called with an avatar name and UUID.
- typedef boost::function<void (const uuid_vec_t&, const std::vector<LLAvatarName>&)> select_callback_t;
+ typedef std::function<void(const uuid_vec_t&, const std::vector<LLAvatarName>&)> select_callback_t;
// Call this to select an avatar.
static LLFloaterAvatarPicker* show(select_callback_t callback,
bool allow_multiple = false,
diff --git a/indra/newview/llfloaterbanduration.h b/indra/newview/llfloaterbanduration.h
index 4793b524f7..0f8944a56a 100644
--- a/indra/newview/llfloaterbanduration.h
+++ b/indra/newview/llfloaterbanduration.h
@@ -31,7 +31,7 @@
class LLFloaterBanDuration : public LLFloater
{
- typedef boost::function<void(const uuid_vec_t&, const S32 duration)> select_callback_t;
+ typedef std::function<void(const uuid_vec_t&, const S32 duration)> select_callback_t;
public:
LLFloaterBanDuration(const LLSD& target);
diff --git a/indra/newview/llfloaterbulkupload.cpp b/indra/newview/llfloaterbulkupload.cpp
index b898cb28b6..d11e9949f6 100644
--- a/indra/newview/llfloaterbulkupload.cpp
+++ b/indra/newview/llfloaterbulkupload.cpp
@@ -41,6 +41,7 @@ LLFloaterBulkUpload::LLFloaterBulkUpload(const LLSD& key)
mUploadCost = key["upload_cost"].asInteger();
mUploadCount = key["upload_count"].asInteger();
mHas2kTextures = key["has_2k_textures"].asBoolean();
+ mDestinationFolderId = key["dest"];
if (key["files"].isArray())
{
const LLSD& files = key["files"];
@@ -125,7 +126,7 @@ void LLFloaterBulkUpload::onUpload2KCheckBox()
void LLFloaterBulkUpload::onClickUpload()
{
- do_bulk_upload(mFiles, mAllow2kTextures);
+ do_bulk_upload(mFiles, mAllow2kTextures, mDestinationFolderId);
closeFloater();
}
diff --git a/indra/newview/llfloaterbulkupload.h b/indra/newview/llfloaterbulkupload.h
index d07dc8eabe..3d3004d84d 100644
--- a/indra/newview/llfloaterbulkupload.h
+++ b/indra/newview/llfloaterbulkupload.h
@@ -59,6 +59,7 @@ private:
std::vector<std::string> mFiles;
bool mAllow2kTextures = true;
bool mHas2kTextures = false;
+ LLUUID mDestinationFolderId;
S32 mUploadCost = 0;
S32 mUploadCount = 0;
};
diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp
index 392079efe4..3acf28044c 100644
--- a/indra/newview/llfloaterbvhpreview.cpp
+++ b/indra/newview/llfloaterbvhpreview.cpp
@@ -1021,7 +1021,7 @@ void LLFloaterBvhPreview::onBtnOK(void* userdata)
std::string desc = floaterp->getChild<LLUICtrl>("description_form")->getValue().asString();
S32 expected_upload_cost = LLAgentBenefitsMgr::current().getAnimationUploadCost();
- LLResourceUploadInfo::ptr_t assetUploadInfo(new LLResourceUploadInfo(
+ LLResourceUploadInfo::ptr_t assetUploadInfo = std::make_shared<LLResourceUploadInfo>(
floaterp->mTransactionID, LLAssetType::AT_ANIMATION,
name, desc, 0,
LLFolderType::FT_NONE, LLInventoryType::IT_ANIMATION,
@@ -1029,7 +1029,7 @@ void LLFloaterBvhPreview::onBtnOK(void* userdata)
LLFloaterPerms::getGroupPerms("Uploads"),
LLFloaterPerms::getEveryonePerms("Uploads"),
expected_upload_cost,
- floaterp->mDestinationFolderId));
+ floaterp->mDestinationFolderId);
upload_new_resource(assetUploadInfo);
}
diff --git a/indra/newview/llfloateremojipicker.h b/indra/newview/llfloateremojipicker.h
index b807adb67d..88d288b141 100644
--- a/indra/newview/llfloateremojipicker.h
+++ b/indra/newview/llfloateremojipicker.h
@@ -40,8 +40,8 @@ class LLFloaterEmojiPicker : public LLFloater
public:
// The callback function will be called with an emoji char.
- typedef boost::function<void (llwchar)> pick_callback_t;
- typedef boost::function<void ()> close_callback_t;
+ typedef std::function<void(llwchar)> pick_callback_t;
+ typedef std::function<void ()> close_callback_t;
LLFloaterEmojiPicker(const LLSD& key);
diff --git a/indra/newview/llfloaterexperiencepicker.h b/indra/newview/llfloaterexperiencepicker.h
index 0a001478f1..d0fb611bd4 100644
--- a/indra/newview/llfloaterexperiencepicker.h
+++ b/indra/newview/llfloaterexperiencepicker.h
@@ -38,9 +38,9 @@ class LLFloaterExperiencePicker : public LLFloater
{
public:
- typedef boost::function<void (const uuid_vec_t&)> select_callback_t;
+ typedef std::function<void(const uuid_vec_t&)> select_callback_t;
// filter function for experiences, return true if the experience should be hidden.
- typedef boost::function<bool (const LLSD&)> filter_function;
+ typedef std::function<bool(const LLSD&)> filter_function;
typedef std::vector<filter_function> filter_list;
static LLFloaterExperiencePicker* show( select_callback_t callback, const LLUUID& key, bool allow_multiple, bool close_on_select, filter_list filters, LLView * frustumOrigin);
diff --git a/indra/newview/llfloaterexperiences.cpp b/indra/newview/llfloaterexperiences.cpp
index 9e00fb0fbb..999a473a49 100644
--- a/indra/newview/llfloaterexperiences.cpp
+++ b/indra/newview/llfloaterexperiences.cpp
@@ -366,10 +366,10 @@ void LLFloaterExperiences::retrieveExperienceListCoro(std::string url,
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("retrieveExperienceListCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOptions(new LLCore::HttpOptions);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("retrieveExperienceListCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOptions = std::make_shared<LLCore::HttpOptions>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
if (url.empty())
@@ -407,7 +407,7 @@ void LLFloaterExperiences::retrieveExperienceListCoro(std::string url,
{
const LLSD& ids = result[it->first];
tab->setExperienceList(ids);
- if (!cback.empty())
+ if (cback != nullptr)
{
cback(tab, result);
}
diff --git a/indra/newview/llfloaterexperiences.h b/indra/newview/llfloaterexperiences.h
index 5852d33e0c..ec5f52d2f7 100644
--- a/indra/newview/llfloaterexperiences.h
+++ b/indra/newview/llfloaterexperiences.h
@@ -43,7 +43,7 @@ public:
static LLFloaterExperiences* findInstance();
protected:
typedef std::map<std::string, std::string> NameMap_t;
- typedef boost::function<void(LLPanelExperiences*, const LLSD&)> Callback_t;
+ typedef std::function<void(LLPanelExperiences*, const LLSD&)> Callback_t;
void clearFromRecent(const LLSD& ids);
void resizeToTabs();
@@ -65,7 +65,7 @@ protected:
const std::string &errorNotify, Callback_t cback);
private:
- typedef boost::function < LLSD(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t, LLCore::HttpRequest::ptr_t,
+ typedef std::function<LLSD(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t, LLCore::HttpRequest::ptr_t,
const std::string, LLCore::HttpOptions::ptr_t, LLCore::HttpHeaders::ptr_t) > invokationFn_t;
static void retrieveExperienceListCoro(std::string url, LLHandle<LLFloaterExperiences> hparent,
diff --git a/indra/newview/llfloatergridstatus.cpp b/indra/newview/llfloatergridstatus.cpp
index b6b844b307..e8e36b5c93 100644
--- a/indra/newview/llfloatergridstatus.cpp
+++ b/indra/newview/llfloatergridstatus.cpp
@@ -90,10 +90,10 @@ void LLFloaterGridStatus::getGridStatusRSSCoro()
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getGridStatusRSSCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getGridStatusRSSCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
httpOpts->setSSLVerifyPeer(false); // We want this data even if SSL fails
httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_TEXT_XML);
diff --git a/indra/newview/llfloatergroups.h b/indra/newview/llfloatergroups.h
index be6ced40bf..93a6deb0a3 100644
--- a/indra/newview/llfloatergroups.h
+++ b/indra/newview/llfloatergroups.h
@@ -40,8 +40,9 @@
#include "lluuid.h"
#include "llfloater.h"
+#include "llevent.h"
+
#include <map>
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
class LLUICtrl;
diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp
index c924807273..bbff3e4c86 100644
--- a/indra/newview/llfloaterimagepreview.cpp
+++ b/indra/newview/llfloaterimagepreview.cpp
@@ -280,7 +280,7 @@ void LLFloaterImagePreview::onBtnOK()
LLFileSystem fmt_file(new_asset_id, LLAssetType::AT_TEXTURE, LLFileSystem::WRITE);
fmt_file.write(formatted->getData(), formatted->getDataSize());
- LLResourceUploadInfo::ptr_t assetUploadInfo(new LLResourceUploadInfo(
+ LLResourceUploadInfo::ptr_t assetUploadInfo = std::make_shared<LLResourceUploadInfo>(
tid, LLAssetType::AT_TEXTURE,
getChild<LLUICtrl>("name_form")->getValue().asString(),
getChild<LLUICtrl>("description_form")->getValue().asString(),
@@ -289,8 +289,9 @@ void LLFloaterImagePreview::onBtnOK()
LLFloaterPerms::getNextOwnerPerms("Uploads"),
LLFloaterPerms::getGroupPerms("Uploads"),
LLFloaterPerms::getEveryonePerms("Uploads"),
- expected_upload_cost
- ));
+ expected_upload_cost,
+ mDestinationFolderId
+ );
upload_new_resource(assetUploadInfo);
}
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index b649514bff..f0d696361a 100644
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -907,7 +907,7 @@ class LLChatCommandHandler : public LLCommandHandler
{
public:
// not allowed from outside the app
- LLChatCommandHandler() : LLCommandHandler("chat", UNTRUSTED_BLOCK) { }
+ LLChatCommandHandler() : LLCommandHandler("chat", UNTRUSTED_CLICK_ONLY) { }
// Your code here
bool handle(const LLSD& tokens,
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index c920a3c898..ec9458ea9b 100644
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -87,7 +87,7 @@ public:
void addChat (LLSD& chat);
void arrangeToasts ();
- typedef boost::function<LLFloaterIMNearbyChatToastPanel* (void )> create_toast_panel_callback_t;
+ typedef std::function<LLFloaterIMNearbyChatToastPanel*(void)> create_toast_panel_callback_t;
void setCreatePanelCallback(create_toast_panel_callback_t value) { m_create_toast_panel_callback_t = value;}
void onToastDestroyed (LLToast* toast, bool app_quitting);
diff --git a/indra/newview/llfloatermodeluploadbase.cpp b/indra/newview/llfloatermodeluploadbase.cpp
index ec4f7593ca..dd53d0ffcf 100644
--- a/indra/newview/llfloatermodeluploadbase.cpp
+++ b/indra/newview/llfloatermodeluploadbase.cpp
@@ -66,8 +66,8 @@ void LLFloaterModelUploadBase::requestAgentUploadPermissionsCoro(std::string url
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("MeshUploadFlag", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("MeshUploadFlag", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
diff --git a/indra/newview/llfloatermyscripts.cpp b/indra/newview/llfloatermyscripts.cpp
index 0283855f15..8685243867 100644
--- a/indra/newview/llfloatermyscripts.cpp
+++ b/indra/newview/llfloatermyscripts.cpp
@@ -93,8 +93,8 @@ void LLFloaterMyScripts::getAttachmentLimitsCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getAttachmentLimitsCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getAttachmentLimitsCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp
index e4e7c4ee39..d5e45c09e3 100644
--- a/indra/newview/llfloaterpay.cpp
+++ b/indra/newview/llfloaterpay.cpp
@@ -127,8 +127,8 @@ const S32 PAY_AMOUNT_NOTIFICATION = 200;
LLFloaterPay::LLFloaterPay(const LLSD& key)
: LLFloater(key),
mCallbackData(),
- mCallback(NULL),
- mObjectNameText(NULL),
+ mCallback(nullptr),
+ mObjectNameText(nullptr),
mTargetUUID(key.asUUID()),
mTargetIsGroup(false),
mHaveName(false)
@@ -154,7 +154,7 @@ bool LLFloaterPay::postBuild()
{
S32 i = 0;
- give_money_ptr info = give_money_ptr(new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_0));
+ give_money_ptr info = std::make_shared<LLGiveMoneyInfo>(this, PAY_BUTTON_DEFAULT_0);
mCallbackData.push_back(info);
childSetAction("fastpay 1", boost::bind(LLFloaterPay::onGive, info));
@@ -164,7 +164,7 @@ bool LLFloaterPay::postBuild()
mQuickPayInfo[i] = info;
++i;
- info = give_money_ptr(new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_1));
+ info = std::make_shared<LLGiveMoneyInfo>(this, PAY_BUTTON_DEFAULT_1);
mCallbackData.push_back(info);
childSetAction("fastpay 5", boost::bind(LLFloaterPay::onGive, info));
@@ -174,7 +174,7 @@ bool LLFloaterPay::postBuild()
mQuickPayInfo[i] = info;
++i;
- info = give_money_ptr(new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_2));
+ info = std::make_shared<LLGiveMoneyInfo>(this, PAY_BUTTON_DEFAULT_2);
mCallbackData.push_back(info);
childSetAction("fastpay 10", boost::bind(LLFloaterPay::onGive, info));
@@ -184,7 +184,7 @@ bool LLFloaterPay::postBuild()
mQuickPayInfo[i] = info;
++i;
- info = give_money_ptr(new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_3));
+ info = std::make_shared<LLGiveMoneyInfo>(this, PAY_BUTTON_DEFAULT_3);
mCallbackData.push_back(info);
childSetAction("fastpay 20", boost::bind(LLFloaterPay::onGive, info));
diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp
index 7311f0deb6..4c3578119e 100644
--- a/indra/newview/llfloaterperms.cpp
+++ b/indra/newview/llfloaterperms.cpp
@@ -209,8 +209,8 @@ void LLFloaterPermsDefault::updateCapCoro(std::string url)
std::string previousReason;
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("updateCapCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD postData = LLSD::emptyMap();
postData["default_object_perm_masks"]["Group"] =
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 99161d8d93..c5c1e01538 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -410,11 +410,11 @@ void LLFloaterPreference::saveAvatarPropertiesCoro(const std::string cap_url, bo
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("put_avatar_properties_coro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("put_avatar_properties_coro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLCore::HttpHeaders::ptr_t httpHeaders;
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setFollowRedirects(true);
std::string finalUrl = cap_url + "/" + gAgentID.asString();
@@ -2068,7 +2068,7 @@ class LLPanelPreference::Updater : public LLEventTimer
public:
- typedef boost::function<bool(const LLSD&)> callback_t;
+ typedef std::function<bool(const LLSD&)> callback_t;
Updater(callback_t cb, F32 period)
:LLEventTimer(period),
@@ -3511,7 +3511,7 @@ void LLFloaterPreference::collectSearchableItems()
LLTabContainer *pRoot = getChild< LLTabContainer >( "pref core" );
if( mFilterEdit && pRoot )
{
- mSearchData.reset(new ll::prefs::SearchData() );
+ mSearchData = std::make_unique<ll::prefs::SearchData>();
ll::prefs::TabContainerDataPtr pRootTabcontainer = ll::prefs::TabContainerDataPtr( new ll::prefs::TabContainerData );
pRootTabcontainer->mTabContainer = pRoot;
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 334f32d051..bfce13affc 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -94,7 +94,6 @@
#include "llmeshrepository.h"
#include "llfloaterregionrestarting.h"
#include "llpanelexperiencelisteditor.h"
-#include <boost/function.hpp>
#include "llpanelexperiencepicker.h"
#include "llexperiencecache.h"
#include "llpanelexperiences.h"
@@ -4033,8 +4032,8 @@ void LLPanelEstateAccess::updateLists()
void LLPanelEstateAccess::requestEstateGetAccessCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestEstateGetAccessoCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("requestEstateGetAccessoCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
diff --git a/indra/newview/llfloaterregionrestartschedule.cpp b/indra/newview/llfloaterregionrestartschedule.cpp
index 59bcb22dce..cd699efd5b 100644
--- a/indra/newview/llfloaterregionrestartschedule.cpp
+++ b/indra/newview/llfloaterregionrestartschedule.cpp
@@ -272,9 +272,9 @@ void LLFloaterRegionRestartSchedule::requestRegionShcheduleCoro(std::string url,
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("RegionShcheduleRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("RegionShcheduleRequest", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setWantHeaders(true);
@@ -367,9 +367,9 @@ void LLFloaterRegionRestartSchedule::setRegionShcheduleCoro(std::string url, LLS
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("RegionShcheduleSetter", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("RegionShcheduleSetter", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setWantHeaders(true);
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index e2c6305f4f..7e7eb91636 100644
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -417,8 +417,8 @@ void LLFloaterReporter::requestAbuseCategoriesCoro(std::string url, LLHandle<LLF
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestAbuseCategoriesCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("requestAbuseCategoriesCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
@@ -860,7 +860,7 @@ void LLFloaterReporter::sendReportViaCaps(std::string url, std::string sshot_url
if(!sshot_url.empty())
{
// try to upload screenshot
- LLResourceUploadInfo::ptr_t uploadInfo(new LLARScreenShotUploader(report, mResourceDatap->mAssetInfo.mUuid, mResourceDatap->mAssetInfo.mType));
+ LLResourceUploadInfo::ptr_t uploadInfo = std::make_shared<LLARScreenShotUploader>(report, mResourceDatap->mAssetInfo.mUuid, mResourceDatap->mAssetInfo.mType);
LLViewerAssetUpload::EnqueueInventoryUpload(sshot_url, uploadInfo);
}
else
diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp
index f789036e5e..58d624a7d0 100644
--- a/indra/newview/llfloaterscriptlimits.cpp
+++ b/indra/newview/llfloaterscriptlimits.cpp
@@ -178,8 +178,8 @@ void LLPanelScriptLimitsRegionMemory::getLandScriptResourcesCoro(std::string url
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getLandScriptResourcesCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getLandScriptResourcesCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD postData;
@@ -222,8 +222,8 @@ void LLPanelScriptLimitsRegionMemory::getLandScriptSummaryCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getLandScriptSummaryCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getLandScriptSummaryCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
@@ -274,8 +274,8 @@ void LLPanelScriptLimitsRegionMemory::getLandScriptDetailsCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getLandScriptDetailsCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getLandScriptDetailsCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
diff --git a/indra/newview/llfloatersimplesnapshot.cpp b/indra/newview/llfloatersimplesnapshot.cpp
index c0de8ab811..55b39d9193 100644
--- a/indra/newview/llfloatersimplesnapshot.cpp
+++ b/indra/newview/llfloatersimplesnapshot.cpp
@@ -54,11 +54,11 @@ void post_thumbnail_image_coro(std::string cap_url, std::string path_to_image, L
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("post_profile_image_coro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("post_profile_image_coro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLCore::HttpHeaders::ptr_t httpHeaders;
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setFollowRedirects(true);
LLSD result = httpAdapter->postAndSuspend(httpRequest, cap_url, first_data, httpOpts, httpHeaders);
@@ -87,9 +87,9 @@ void post_thumbnail_image_coro(std::string cap_url, std::string path_to_image, L
// Upload the image
- LLCore::HttpRequest::ptr_t uploaderhttpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t uploaderhttpHeaders(new LLCore::HttpHeaders);
- LLCore::HttpOptions::ptr_t uploaderhttpOpts(new LLCore::HttpOptions);
+ LLCore::HttpRequest::ptr_t uploaderhttpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpHeaders::ptr_t uploaderhttpHeaders = std::make_shared<LLCore::HttpHeaders>();
+ LLCore::HttpOptions::ptr_t uploaderhttpOpts = std::make_shared<LLCore::HttpOptions>();
S64 length;
{
diff --git a/indra/newview/llfloatersimplesnapshot.h b/indra/newview/llfloatersimplesnapshot.h
index 487e77469c..5620a15d87 100644
--- a/indra/newview/llfloatersimplesnapshot.h
+++ b/indra/newview/llfloatersimplesnapshot.h
@@ -63,7 +63,7 @@ public:
void postSave();
- typedef boost::function<void(const LLUUID& asset_id)> completion_t;
+ typedef std::function<void(const LLUUID& asset_id)> completion_t;
void setComplectionCallback(completion_t callback) { mUploadCompletionCallback = callback; }
static void uploadThumbnail(const std::string &file_path,
const LLUUID &inventory_id,
diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp
index 8eec5b753a..da4b509738 100644
--- a/indra/newview/llfloatertos.cpp
+++ b/indra/newview/llfloatertos.cpp
@@ -248,9 +248,9 @@ void LLFloaterTOS::testSiteIsAliveCoro(LLHandle<LLFloater> handle, std::string u
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("testSiteIsAliveCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setWantHeaders(true);
httpOpts->setHeadersOnly(true);
diff --git a/indra/newview/llfloatertos.h b/indra/newview/llfloatertos.h
index 3bec4da58d..82a8c8ac5a 100644
--- a/indra/newview/llfloatertos.h
+++ b/indra/newview/llfloatertos.h
@@ -30,7 +30,6 @@
#include "llmodaldialog.h"
#include "llassetstorage.h"
#include "llmediactrl.h"
-#include <boost/function.hpp>
#include "lleventcoro.h"
#include "llcoros.h"
diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp
index 2f1857ec61..9696c3d3f8 100644
--- a/indra/newview/llfloaterurlentry.cpp
+++ b/indra/newview/llfloaterurlentry.cpp
@@ -201,10 +201,10 @@ void LLFloaterURLEntry::getMediaTypeCoro(std::string url, LLHandle<LLFloater> pa
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMediaTypeCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
- LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getMediaTypeCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setFollowRedirects(true);
httpOpts->setHeadersOnly(true);
diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp
index 5300627cec..b9f19b5247 100644
--- a/indra/newview/llfriendcard.cpp
+++ b/indra/newview/llfriendcard.cpp
@@ -136,7 +136,7 @@ bool LLFindAgentCallingCard::operator()(LLInventoryCategory* cat, LLInventoryIte
class LLInitialFriendCardsFetch : public LLInventoryFetchDescendentsObserver
{
public:
- typedef boost::function<void()> callback_t;
+ typedef std::function<void()> callback_t;
LLInitialFriendCardsFetch(const LLUUID& folder_id,
callback_t cb) :
diff --git a/indra/newview/llfriendcard.h b/indra/newview/llfriendcard.h
index e3bd25aae7..f6c0a991bc 100644
--- a/indra/newview/llfriendcard.h
+++ b/indra/newview/llfriendcard.h
@@ -96,7 +96,7 @@ public:
void syncFriendCardsFolders();
private:
- typedef boost::function<void()> callback_t;
+ typedef std::function<void()> callback_t;
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index 1bbeba43ec..550af7af53 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -71,7 +71,7 @@ LLGestureMgr::LLGestureMgr()
mLoadingCount(0)
{
gInventory.addObserver(this);
- mListener.reset(new LLGestureListener());
+ mListener = std::make_shared<LLGestureListener>();
}
diff --git a/indra/newview/llgesturemgr.h b/indra/newview/llgesturemgr.h
index 8db36c6d89..e10bc8bbb4 100644
--- a/indra/newview/llgesturemgr.h
+++ b/indra/newview/llgesturemgr.h
@@ -54,7 +54,7 @@ class LLGestureMgr : public LLSingleton<LLGestureMgr>, public LLInventoryFetchIt
~LLGestureMgr();
public:
- typedef boost::function<void (LLMultiGesture* loaded_gesture)> gesture_loaded_callback_t;
+ typedef std::function<void (LLMultiGesture* loaded_gesture)> gesture_loaded_callback_t;
// Maps inventory item_id to gesture
typedef std::map<LLUUID, LLMultiGesture*> item_map_t;
typedef std::map<LLUUID, gesture_loaded_callback_t> callback_map_t;
diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp
index 3e4aadc381..ac8477a615 100644
--- a/indra/newview/llgltfmateriallist.cpp
+++ b/indra/newview/llgltfmateriallist.cpp
@@ -723,9 +723,9 @@ void LLGLTFMaterialList::modifyMaterialCoro(std::string cap_url, LLSD overrides,
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("modifyMaterialCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("modifyMaterialCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
LLCore::HttpHeaders::ptr_t httpHeaders;
httpOpts->setFollowRedirects(true);
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index d53b36e59f..e0da762279 100644
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -1975,8 +1975,8 @@ void LLGroupMgr::getGroupBanRequestCoro(std::string url, LLUUID group_id)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("groupMembersRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("groupMembersRequest", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
std::string finalUrl = url + "?group_id=" + group_id.asString();
@@ -2004,10 +2004,10 @@ void LLGroupMgr::postGroupBanRequestCoro(std::string url, LLUUID group_id,
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("groupMembersRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
- LLCore::HttpOptions::ptr_t httpOptions(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("groupMembersRequest", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
+ LLCore::HttpOptions::ptr_t httpOptions = std::make_shared<LLCore::HttpOptions>();
httpOptions->setFollowRedirects(false);
@@ -2141,9 +2141,9 @@ void LLGroupMgr::groupMembersRequestCoro(std::string url, LLUUID group_id, U32 p
<< ", sort_column: " << sort_column << ", sort_descending: " << sort_descending << LL_ENDL;
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("groupMembersRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("groupMembersRequest", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
LLSD postData = LLSD::emptyMap();
postData["group_id"] = group_id;
diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp
index 7cd0171a37..fe567ac7ec 100644
--- a/indra/newview/llimprocessing.cpp
+++ b/indra/newview/llimprocessing.cpp
@@ -1551,8 +1551,8 @@ void LLIMProcessing::requestOfflineMessagesCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestOfflineMessagesCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("requestOfflineMessagesCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index bda4afcc04..ad01e11d48 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -429,8 +429,8 @@ void startConferenceCoro(std::string url,
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("ConferenceChatStart", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("ConferenceChatStart", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD postData;
postData["method"] = "start conference";
@@ -478,8 +478,8 @@ void startConferenceCoro(std::string url,
void startP2PVoiceCoro(std::string url, LLUUID sessionID, LLUUID creatorId, LLUUID otherParticipantId)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("StartP2PVoiceCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("StartP2PVoiceCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD postData;
postData["method"] = "start p2p voice";
@@ -518,8 +518,8 @@ void chatterBoxInvitationCoro(std::string url, LLUUID sessionId, LLIMMgr::EInvit
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("ConferenceInviteStart", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("ConferenceInviteStart", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD postData;
postData["method"] = "accept invitation";
@@ -636,8 +636,8 @@ void chatterBoxHistoryCoro(std::string url, LLUUID sessionId, std::string from,
{ // if parameters from, message and timestamp have values, they are a message that opened chat
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("ChatHistory", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("ChatHistory", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD postData;
postData["method"] = "fetch history";
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index e322d3ae28..848f28f933 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -3316,7 +3316,7 @@ bool move_inv_category_world_to_agent(const LLUUID& object_id,
if (drop && accept)
{
- std::shared_ptr<LLMoveInv> move_inv(new LLMoveInv);
+ std::shared_ptr<LLMoveInv> move_inv = std::make_shared<LLMoveInv>();
move_inv->mObjectID = object_id;
move_inv->mCategoryID = category_id;
move_inv->mCallback = callback;
@@ -5989,7 +5989,7 @@ bool LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
if (accept && drop)
{
LLUUID item_id = inv_item->getUUID();
- std::shared_ptr<LLMoveInv> move_inv (new LLMoveInv());
+ std::shared_ptr<LLMoveInv> move_inv = std::make_shared<LLMoveInv>();
move_inv->mObjectID = inv_item->getParentUUID();
two_uuids_t item_pair(mUUID, item_id);
move_inv->mMoveList.push_back(item_pair);
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index d96adbd1d2..decb2c0528 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -239,7 +239,7 @@ public:
const LLUUID& uuid) :
LLInvFVBridge(inventory, root, uuid) {}
- typedef boost::function<void(std::string& slurl)> slurl_callback_t;
+ typedef std::function<void(std::string& slurl)> slurl_callback_t;
virtual void performAction(LLInventoryModel* model, std::string action);
virtual void selectItem();
@@ -833,7 +833,7 @@ void rez_attachment(LLViewerInventoryItem* item,
bool move_inv_category_world_to_agent(const LLUUID& object_id,
const LLUUID& category_id,
bool drop,
- std::function<void(S32, void*, const LLMoveInv *)> callback = NULL,
+ std::function<void(S32, void*, const LLMoveInv *)> callback = nullptr,
void* user_data = NULL,
LLInventoryFilter* filter = NULL);
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index e6b33453d5..3cc57e851f 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -1758,7 +1758,7 @@ bool sort_alpha(const LLViewerInventoryCategory* cat1, const LLViewerInventoryCa
// The only inventory changes that are done is to move and sort folders containing no-copy items to stock folders.
// @pending_callbacks - how many callbacks we are waiting for, must be inited before use
// @result - true if things validate, false if issues are raised, must be inited before use
-typedef boost::function<void(S32 pending_callbacks, bool result)> validation_result_callback_t;
+typedef std::function<void(S32 pending_callbacks, bool result)> validation_result_callback_t;
void validate_marketplacelistings(
LLInventoryCategory* cat,
validation_result_callback_t cb_result,
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index 77a2a18877..eba67be313 100644
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -151,13 +151,13 @@ class LLMarketplaceValidator: public LLSingleton<LLMarketplaceValidator>
LOG_CLASS(LLMarketplaceValidator);
public:
- typedef boost::function<void(std::string& validation_message, S32 depth, LLError::ELevel log_level)> validation_msg_callback_t;
- typedef boost::function<void(bool result)> validation_done_callback_t;
+ typedef std::function<void(std::string& validation_message, S32 depth, LLError::ELevel log_level)> validation_msg_callback_t;
+ typedef std::function<void(bool result)> validation_done_callback_t;
void validateMarketplaceListings(
const LLUUID &category_id,
- validation_done_callback_t cb_done = NULL,
- validation_msg_callback_t cb_msg = NULL,
+ validation_done_callback_t cb_done = nullptr,
+ validation_msg_callback_t cb_msg = nullptr,
bool fix_hierarchy = true,
S32 depth = -1);
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index c54af7d9f1..f77088e0b1 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -1816,8 +1816,8 @@ void LLInventoryGallery::paste(const LLUUID& dest,
const LLUUID& marketplacelistings_id)
{
LLHandle<LLPanel> handle = getHandle();
- std::function <void(const LLUUID)> on_copy_callback = NULL;
- LLPointer<LLInventoryCallback> cb = NULL;
+ std::function<void(const LLUUID)> on_copy_callback = nullptr;
+ LLPointer<LLInventoryCallback> cb = nullptr;
if (dest == mFolderID)
{
on_copy_callback = [handle](const LLUUID& inv_item)
@@ -3582,12 +3582,12 @@ bool dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, bool drop,
if (accept && drop)
{
- std::shared_ptr<LLMoveInv> move_inv (new LLMoveInv());
+ std::shared_ptr<LLMoveInv> move_inv = std::make_shared<LLMoveInv>();
move_inv->mObjectID = inv_item->getParentUUID();
std::pair<LLUUID, LLUUID> item_pair(folder_id, inv_item->getUUID());
move_inv->mMoveList.push_back(item_pair);
- move_inv->mCallback = NULL;
- move_inv->mUserData = NULL;
+ move_inv->mCallback = nullptr;
+ move_inv->mUserData = nullptr;
if (is_move)
{
warn_move_inventory(object, move_inv);
diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h
index 7f53f9998d..a53637a477 100644
--- a/indra/newview/llinventorygallery.h
+++ b/indra/newview/llinventorygallery.h
@@ -44,14 +44,14 @@ class LLGalleryGestureObserver;
class LLInventoryGalleryContextMenu;
-typedef boost::function<void()> callback_t;
+typedef std::function<void()> callback_t;
class LLInventoryGallery : public LLPanel, public LLEditMenuHandler
{
public:
typedef boost::signals2::signal<void(const LLUUID&)> selection_change_signal_t;
- typedef boost::function<void(const LLUUID&)> selection_change_callback_t;
+ typedef std::function<void(const LLUUID&)> selection_change_callback_t;
typedef std::deque<LLUUID> selection_deque;
struct Params
diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp
index eda93e3e79..fe007a78cd 100644
--- a/indra/newview/llinventorygallerymenu.cpp
+++ b/indra/newview/llinventorygallerymenu.cpp
@@ -362,7 +362,7 @@ void LLInventoryGalleryContextMenu::doToSelected(const LLSD& userdata)
}
else if ("show_on_map" == action)
{
- boost::function<void(LLLandmark*)> show_on_map_cb = [](LLLandmark* landmark)
+ std::function<void(LLLandmark*)> show_on_map_cb = [](LLLandmark* landmark)
{
LLVector3d landmark_global_pos;
if (landmark->getGlobalPos(landmark_global_pos))
diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp
index 73cc953692..15735ebde3 100644
--- a/indra/newview/llinventoryitemslist.cpp
+++ b/indra/newview/llinventoryitemslist.cpp
@@ -51,6 +51,7 @@ LLInventoryItemsList::LLInventoryItemsList(const LLInventoryItemsList::Params& p
: LLFlatListViewEx(p)
, mRefreshState(REFRESH_COMPLETE)
, mForceRefresh(false)
+, mNeedsArrange(true)
{
// TODO: mCommitOnSelectionChange is set to "false" in LLFlatListView
// but reset to true in all derived classes. This settings might need to
@@ -144,6 +145,7 @@ void LLInventoryItemsList::updateSelection()
bool LLInventoryItemsList::doIdle()
{
if (mRefreshState == REFRESH_COMPLETE) return true; // done
+ LL_PROFILE_ZONE_SCOPED;
if (isInVisibleChain() || mForceRefresh || !getFilterSubString().empty())
{
@@ -165,7 +167,7 @@ void LLInventoryItemsList::idle(void* user_data)
using namespace std::chrono;
auto start = steady_clock::now();
- const milliseconds time_limit = milliseconds(3);
+ const milliseconds time_limit = milliseconds(2);
const auto end_time = start + time_limit;
S32 max_update_count = 50;
@@ -218,8 +220,6 @@ void LLInventoryItemsList::refresh()
mRefreshState = REFRESH_LIST_SORT;
}
- rearrangeItems();
- notifyParentItemsRectChanged();
break;
}
case REFRESH_LIST_ERASE:
@@ -229,10 +229,21 @@ void LLInventoryItemsList::refresh()
for (; mRemovedItems.end() != it; ++it)
{
// don't filter items right away
- removeItemByUUID(*it, false);
+ removeItemByUUID(*it, false /*don't rearrange*/);
}
mRemovedItems.clear();
- mRefreshState = REFRESH_LIST_SORT; // fix visibility and arrange
+ mRefreshState = REFRESH_LIST_SORT; // fix visibility
+
+ // Assume that visible items were removed.
+ if (getVisible())
+ {
+ rearrangeItems();
+ notifyParentItemsRectChanged();
+ }
+ else
+ {
+ mNeedsArrange = true;
+ }
break;
}
case REFRESH_LIST_APPEND:
@@ -275,18 +286,25 @@ void LLInventoryItemsList::refresh()
LLSD action;
action.with("match_filter", cur_filter);
+ bool new_visible_items = false;
pairs_const_iterator_t pair_it = panel_list.begin();
for (; pair_it != panel_list.end(); ++pair_it)
{
item_pair_t* item_pair = *pair_it;
if (item_pair->first->getParent() != NULL)
{
- updateItemVisibility(item_pair->first, action);
+ new_visible_items |= updateItemVisibility(item_pair->first, action);
}
}
- rearrangeItems();
- notifyParentItemsRectChanged();
+ mNeedsArrange |= new_visible_items;
+ if (mNeedsArrange && getVisible())
+ {
+ // show changes now
+ rearrangeItems();
+ notifyParentItemsRectChanged();
+ mNeedsArrange = false;
+ }
if (mAddedItems.size() > 0)
{
@@ -304,16 +322,33 @@ void LLInventoryItemsList::refresh()
{
LL_PROFILE_ZONE_NAMED("items_refresh_sort");
// Filter, sort, rearrange and notify parent about shape changes
- filterItems(true, true);
+ if (filterItems(true, true))
+ {
+ mNeedsArrange = false; // just rearranged
+ }
if (mAddedItems.size() == 0)
{
+ if (mNeedsArrange)
+ {
+ // Done, last chance to rearrange
+ rearrangeItems();
+ notifyParentItemsRectChanged();
+ mNeedsArrange = false;
+ }
// After list building completed, select items that had been requested to select before list was build
updateSelection();
mRefreshState = REFRESH_COMPLETE;
}
else
{
+ if (mNeedsArrange && getVisible())
+ {
+ // show changes now
+ rearrangeItems();
+ notifyParentItemsRectChanged();
+ mNeedsArrange = false;
+ }
mRefreshState = REFRESH_LIST_APPEND;
}
break;
@@ -347,6 +382,7 @@ void LLInventoryItemsList::computeDifference(
LLPanel* LLInventoryItemsList::createNewItem(LLViewerInventoryItem* item)
{
+ LL_PROFILE_ZONE_SCOPED;
if (!item)
{
LL_WARNS() << "No inventory item. Couldn't create flat list item." << LL_ENDL;
diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h
index b20c27eec8..f80d6b31b8 100644
--- a/indra/newview/llinventoryitemslist.h
+++ b/indra/newview/llinventoryitemslist.h
@@ -117,6 +117,7 @@ protected:
};
ERefreshStates mRefreshState;
+ bool mNeedsArrange = true;
private:
uuid_vec_t mIDs; // IDs of items that were added in refreshList().
diff --git a/indra/newview/llinventorylistitem.cpp b/indra/newview/llinventorylistitem.cpp
index 5fb5b0f23f..a435a4f7c7 100644
--- a/indra/newview/llinventorylistitem.cpp
+++ b/indra/newview/llinventorylistitem.cpp
@@ -69,6 +69,7 @@ LLPanelInventoryListItemBase::Params::Params()
LLPanelInventoryListItemBase* LLPanelInventoryListItemBase::create(LLViewerInventoryItem* item)
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
LLPanelInventoryListItemBase* list_item = NULL;
if (item)
{
@@ -189,6 +190,7 @@ void LLPanelInventoryListItemBase::setShowWidget(LLUICtrl* ctrl, bool show)
bool LLPanelInventoryListItemBase::postBuild()
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
LLViewerInventoryItem* inv_item = getItem();
if (inv_item)
{
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 2dfc3b014f..043fd7003d 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -1037,7 +1037,7 @@ void LLInventoryModel::createNewCategory(const LLUUID& parent_id,
{
if (new_category.isNull())
{
- if (callback && !callback.empty())
+ if (callback)
{
callback(new_category);
}
@@ -1064,7 +1064,7 @@ void LLInventoryModel::createNewCategory(const LLUUID& parent_id,
updateCategory(cat);
}
- if (callback && !callback.empty())
+ if (callback)
{
callback(new_category);
}
@@ -1107,9 +1107,9 @@ void LLInventoryModel::createNewCategoryCoro(std::string url, LLSD postData, inv
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("createNewCategoryCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("createNewCategoryCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setWantHeaders(true);
@@ -3257,11 +3257,11 @@ void LLInventoryModel::initHttpRequest()
mHttpRequestFG = new LLCore::HttpRequest;
mHttpRequestBG = new LLCore::HttpRequest;
- mHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+ mHttpOptions = std::make_shared<LLCore::HttpOptions>();
mHttpOptions->setTransferTimeout(300);
mHttpOptions->setUseRetryAfter(true);
// mHttpOptions->setTrace(2); // Do tracing of requests
- mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders);
+ mHttpHeaders = std::make_shared<LLCore::HttpHeaders>();
mHttpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_LLSD_XML);
mHttpHeaders->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_LLSD_XML);
mHttpPolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_INVENTORY);
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index d28743357e..2859923df9 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -122,9 +122,8 @@ public:
FetchItemHttpHandler(const LLSD & request_sd);
virtual ~FetchItemHttpHandler();
- protected:
- FetchItemHttpHandler(const FetchItemHttpHandler &); // Not defined
- void operator=(const FetchItemHttpHandler &); // Not defined
+ FetchItemHttpHandler(const FetchItemHttpHandler&) = delete;
+ FetchItemHttpHandler& operator=(const FetchItemHttpHandler&) = delete;
public:
virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response);
@@ -489,7 +488,7 @@ public:
void createNewCategory(const LLUUID& parent_id,
LLFolderType::EType preferred_type,
const std::string& name,
- inventory_func_type callback = NULL,
+ inventory_func_type callback = nullptr,
const LLUUID& thumbnail_id = LLUUID::null);
protected:
// Internal methods that add inventory and make sure that all of
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index d538d42972..1e5f771ba7 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -125,9 +125,8 @@ public:
LLInventoryModelBackgroundFetch::instance().incrFetchCount(-1);
}
-protected:
- BGItemHttpHandler(const BGItemHttpHandler&); // Not defined
- void operator=(const BGItemHttpHandler&); // Not defined
+ BGItemHttpHandler(const BGItemHttpHandler&) = delete;
+ BGItemHttpHandler& operator=(const BGItemHttpHandler&) = delete;
};
@@ -159,8 +158,8 @@ public:
}
protected:
- BGFolderHttpHandler(const BGFolderHttpHandler&); // Not defined
- void operator=(const BGFolderHttpHandler&); // Not defined
+ BGFolderHttpHandler(const BGFolderHttpHandler&) = delete;
+ BGFolderHttpHandler& operator=(const BGFolderHttpHandler&) = delete;
public:
virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse* response);
@@ -1217,7 +1216,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
if (! url.empty())
{
- LLCore::HttpHandler::ptr_t handler(new BGFolderHttpHandler(folder_request_body, recursive_cats));
+ LLCore::HttpHandler::ptr_t handler = std::make_shared<BGFolderHttpHandler>(folder_request_body, recursive_cats);
gInventory.requestPost(false, url, folder_request_body, handler, "Inventory Folder");
}
}
@@ -1228,7 +1227,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
if (! url.empty())
{
- LLCore::HttpHandler::ptr_t handler(new BGFolderHttpHandler(folder_request_body_lib, recursive_cats));
+ LLCore::HttpHandler::ptr_t handler = std::make_shared<BGFolderHttpHandler>(folder_request_body_lib, recursive_cats);
gInventory.requestPost(false, url, folder_request_body_lib, handler, "Library Folder");
}
}
@@ -1244,7 +1243,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
{
LLSD body;
body["items"] = item_request_body;
- LLCore::HttpHandler::ptr_t handler(new BGItemHttpHandler(body));
+ LLCore::HttpHandler::ptr_t handler = std::make_shared<BGItemHttpHandler>(body);
gInventory.requestPost(false, url, body, handler, "Inventory Item");
}
}
@@ -1257,7 +1256,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
{
LLSD body;
body["items"] = item_request_body_lib;
- LLCore::HttpHandler::ptr_t handler(new BGItemHttpHandler(body));
+ LLCore::HttpHandler::ptr_t handler = std::make_shared<BGItemHttpHandler>(body);
gInventory.requestPost(false, url, body, handler, "Library Item");
}
}
@@ -1543,7 +1542,7 @@ void BGFolderHttpHandler::processFailure(LLCore::HttpStatus status, LLCore::Http
{
LLSD request_body;
request_body["folders"] = folders;
- LLCore::HttpHandler::ptr_t handler(new BGFolderHttpHandler(request_body, recursive_cats));
+ LLCore::HttpHandler::ptr_t handler = std::make_shared<BGFolderHttpHandler>(request_body, recursive_cats);
gInventory.requestPost(false, url, request_body, handler, "Inventory Folder");
recursive_cats.clear();
folders.clear();
@@ -1553,7 +1552,7 @@ void BGFolderHttpHandler::processFailure(LLCore::HttpStatus status, LLCore::Http
LLSD request_body;
request_body["folders"] = folders;
- LLCore::HttpHandler::ptr_t handler(new BGFolderHttpHandler(request_body, recursive_cats));
+ LLCore::HttpHandler::ptr_t handler = std::make_shared<BGFolderHttpHandler>(request_body, recursive_cats);
gInventory.requestPost(false, url, request_body, handler, "Inventory Folder");
return;
}
diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h
index 2e9f69ee29..ef6fa06e9f 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.h
+++ b/indra/newview/llinventorymodelbackgroundfetch.h
@@ -53,7 +53,7 @@ public:
void scheduleFolderFetch(const LLUUID& cat_id, bool forced = false);
void scheduleItemFetch(const LLUUID& item_id, bool forced = false);
- typedef boost::function<void()> nullary_func_t;
+ typedef std::function<void()> nullary_func_t;
// AIS3 only, Fetches folder and everything links inside the folder point to
// Intended for outfits
void fetchFolderAndLinks(const LLUUID& cat_id, nullary_func_t callback);
@@ -78,7 +78,7 @@ public:
bool isBulkFetchProcessingComplete() const;
void setAllFoldersFetched();
- typedef boost::function<void()> folders_fetched_callback_t;
+ typedef std::function<void()> folders_fetched_callback_t;
boost::signals2::connection setFetchCompletionCallback(folders_fetched_callback_t cb);
void addRequestAtFront(const LLUUID& id, bool recursive, bool is_category);
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index ac22be9d5a..a50d6b579e 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -249,7 +249,7 @@ void fetch_items_from_llsd(const LLSD& items_llsd)
if (!url.empty())
{
body[i]["agent_id"] = gAgent.getID();
- LLCore::HttpHandler::ptr_t handler(new LLInventoryModel::FetchItemHttpHandler(body[i]));
+ LLCore::HttpHandler::ptr_t handler = std::make_shared<LLInventoryModel::FetchItemHttpHandler>(body[i]);
gInventory.requestPost(true, url, body[i], handler, (i ? "Library Item" : "Inventory Item"));
continue;
}
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h
index 12d6c44521..99cb9ec811 100644
--- a/indra/newview/llinventoryobserver.h
+++ b/indra/newview/llinventoryobserver.h
@@ -258,7 +258,7 @@ protected:
class LLInventoryCategoriesObserver : public LLInventoryObserver
{
public:
- typedef boost::function<void()> callback_t;
+ typedef std::function<void()> callback_t;
LLInventoryCategoriesObserver() {};
virtual void changed(U32 mask);
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index a935ede186..cde87ede9b 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -113,7 +113,7 @@ protected:
class LLInvPanelComplObserver : public LLInventoryCompletionObserver
{
public:
- typedef boost::function<void()> callback_t;
+ typedef std::function<void()> callback_t;
LLInvPanelComplObserver(callback_t cb)
: mCallback(cb)
@@ -627,7 +627,7 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve
// This could be anything. For now, just refresh the item.
if (mask & LLInventoryObserver::INTERNAL)
{
- if (view_item)
+ if (view_item && view_item->getViewModelItem())
{
view_item->refresh();
}
@@ -646,7 +646,7 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve
if (mask & LLInventoryObserver::UPDATE_FAVORITE)
{
- if (view_item)
+ if (view_item && view_item->getViewModelItem())
{
view_item->refresh();
LLFolderViewFolder* parent = view_item->getParentFolder();
@@ -1595,7 +1595,7 @@ void LLInventoryPanel::setSelection(const LLUUID& obj_id, bool take_keyboard_foc
setSelectionByID(obj_id, take_keyboard_focus);
}
-void LLInventoryPanel::setSelectCallback(const boost::function<void (const std::deque<LLFolderViewItem*>& items, bool user_action)>& cb)
+void LLInventoryPanel::setSelectCallback(const std::function<void (const std::deque<LLFolderViewItem*>& items, bool user_action)>& cb)
{
if (mFolderRoot.get())
{
@@ -2762,7 +2762,7 @@ void LLInventorySingleFolderPanel::updateSingleFolderRoot()
mFolderRoot.get()->setFollowsAll();
mFolderRoot.get()->addChild(mFolderRoot.get()->mStatusTextBox);
- if (!mSelectionCallback.empty())
+ if (mSelectionCallback != nullptr)
{
mFolderRoot.get()->setSelectCallback(mSelectionCallback);
}
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index 50333709fc..dc2e304ab3 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -37,6 +37,7 @@
#include "llinventorymodel.h"
#include "llscrollcontainer.h"
#include "lluictrlfactory.h"
+#include <functional>
#include <set>
class LLInvFVBridge;
@@ -182,7 +183,7 @@ public:
// Call this method to set the selection.
void openAllFolders();
void setSelection(const LLUUID& obj_id, bool take_keyboard_focus);
- void setSelectCallback(const boost::function<void (const std::deque<LLFolderViewItem*>& items, bool user_action)>& cb);
+ void setSelectCallback(const std::function<void (const std::deque<LLFolderViewItem*>& items, bool user_action)>& cb);
void clearSelection();
selected_items_t getSelectedItems() const;
@@ -374,7 +375,7 @@ protected:
virtual LLFolderViewFolder* createFolderViewFolder(LLInvFVBridge * bridge, bool allow_drop);
virtual LLFolderViewItem* createFolderViewItem(LLInvFVBridge * bridge);
- boost::function<void(const std::deque<LLFolderViewItem*>& items, bool user_action)> mSelectionCallback;
+ std::function<void(const std::deque<LLFolderViewItem*>& items, bool user_action)> mSelectionCallback;
// buildViewsTree does not include some checks and is meant
// for recursive use, use buildNewViews() for first call
@@ -436,7 +437,7 @@ public:
std::list<LLUUID> getNavBackwardList() { return mBackwardFolders; }
std::list<LLUUID> getNavForwardList() { return mForwardFolders; }
- typedef boost::function<void()> root_changed_callback_t;
+ typedef std::function<void()> root_changed_callback_t;
boost::signals2::connection setRootChangedCallback(root_changed_callback_t cb);
protected:
diff --git a/indra/newview/lllandmarkactions.h b/indra/newview/lllandmarkactions.h
index 1abf10e110..0996dfed29 100644
--- a/indra/newview/lllandmarkactions.h
+++ b/indra/newview/lllandmarkactions.h
@@ -39,8 +39,8 @@ class LLLandmark;
class LLLandmarkActions
{
public:
- typedef boost::function<void(std::string& slurl)> slurl_callback_t;
- typedef boost::function<void(std::string& slurl, S32 x, S32 y, S32 z)> region_name_and_coords_callback_t;
+ typedef std::function<void(std::string& slurl)> slurl_callback_t;
+ typedef std::function<void(std::string& slurl, S32 x, S32 y, S32 z)> region_name_and_coords_callback_t;
/**
* @brief Fetches landmark LLViewerInventoryItems for the given landmark name.
@@ -107,7 +107,7 @@ public:
*
* @return pointer to loaded landmark from gLandmarkList or NULL if landmark does not exist or wasn't loaded.
*/
- static LLLandmark* getLandmark(const LLUUID& landmarkInventoryItemID, LLLandmarkList::loaded_callback_t cb = NULL);
+ static LLLandmark* getLandmark(const LLUUID& landmarkInventoryItemID, LLLandmarkList::loaded_callback_t cb = nullptr);
/**
* @brief Performs standard action of copying of SLURL from landmark to user's clipboard.
diff --git a/indra/newview/lllandmarklist.h b/indra/newview/lllandmarklist.h
index 508148abde..fb8b5a1960 100644
--- a/indra/newview/lllandmarklist.h
+++ b/indra/newview/lllandmarklist.h
@@ -27,7 +27,7 @@
#ifndef LL_LLLANDMARKLIST_H
#define LL_LLLANDMARKLIST_H
-#include <boost/function.hpp>
+#include <functional>
#include <map>
#include "lllandmark.h"
#include "lluuid.h"
@@ -40,7 +40,7 @@ class LLInventoryItem;
class LLLandmarkList
{
public:
- typedef boost::function<void(LLLandmark*)> loaded_callback_t;
+ typedef std::function<void(LLLandmark*)> loaded_callback_t;
LLLandmarkList() {}
~LLLandmarkList();
@@ -50,7 +50,7 @@ public:
//const LLLandmark* getNext() { return mList.getNextData(); }
bool assetExists(const LLUUID& asset_uuid);
- LLLandmark* getAsset(const LLUUID& asset_uuid, loaded_callback_t cb = NULL);
+ LLLandmark* getAsset(const LLUUID& asset_uuid, loaded_callback_t cb = nullptr);
static void processGetAssetReply(
const LLUUID& uuid,
LLAssetType::EType type,
diff --git a/indra/newview/lllistcontextmenu.h b/indra/newview/lllistcontextmenu.h
index 4b515a3b26..cb2ca5260f 100644
--- a/indra/newview/lllistcontextmenu.h
+++ b/indra/newview/lllistcontextmenu.h
@@ -63,7 +63,7 @@ public:
virtual void hide();
protected:
- typedef boost::function<void (const LLUUID& id)> functor_t;
+ typedef std::function<void (const LLUUID& id)> functor_t;
virtual LLContextMenu* createMenu() = 0;
diff --git a/indra/newview/lllocationhistory.h b/indra/newview/lllocationhistory.h
index ca9b81457c..34cb83367f 100644
--- a/indra/newview/lllocationhistory.h
+++ b/indra/newview/lllocationhistory.h
@@ -29,10 +29,9 @@
#include "llsingleton.h" // for LLSingleton
+#include <functional>
#include <vector>
#include <string>
-#include <map>
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
class LLSD;
@@ -115,7 +114,7 @@ public:
};
typedef std::vector<LLLocationHistoryItem> location_list_t;
- typedef boost::function<void(EChangeType event)> history_changed_callback_t;
+ typedef std::function<void(EChangeType event)> history_changed_callback_t;
typedef boost::signals2::signal<void(EChangeType event)> history_changed_signal_t;
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index 41cec4f074..e9d68723d3 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -80,7 +80,7 @@ std::string construct_start_string();
LLLoginInstance::LLLoginInstance() :
- mLoginModule(new LLLogin()),
+ mLoginModule(std::make_unique<LLLogin>()),
mNotifications(NULL),
mLoginState("offline"),
mSaveMFA(true),
diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h
index 941b378b14..54ce51720f 100644
--- a/indra/newview/lllogininstance.h
+++ b/indra/newview/lllogininstance.h
@@ -29,7 +29,6 @@
#include "lleventdispatcher.h"
#include "lleventapi.h"
-#include <boost/function.hpp>
#include <memory> // std::shared_ptr
#include "llsecapi.h"
class LLLogin;
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index 0888f630e8..9bcfd9e2c0 100644
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -695,24 +695,28 @@ bool LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
// handle attachments in local space
if (object->isAttachment() && object->mDrawable.notNull())
{
- // calculate local version of relative move
- LLQuaternion objWorldRotation = object->mDrawable->mXform.getParent()->getWorldRotation();
- objWorldRotation.transQuat();
+ LLXform* object_xform_parent = object->mDrawable->mXform.getParent();
+ if (object_xform_parent)
+ {
+ // calculate local version of relative move
+ LLQuaternion objWorldRotation = object_xform_parent->getWorldRotation();
+ objWorldRotation.transQuat();
- LLVector3 old_position_local = object->getPosition();
- LLVector3 new_position_local = selectNode->mSavedPositionLocal + (clamped_relative_move_f * objWorldRotation);
+ LLVector3 old_position_local = object->getPosition();
+ LLVector3 new_position_local = selectNode->mSavedPositionLocal + (clamped_relative_move_f * objWorldRotation);
- //RN: I forget, but we need to do this because of snapping which doesn't often result
- // in position changes even when the mouse moves
- object->setPosition(new_position_local);
- rebuild(object);
- gAgentAvatarp->clampAttachmentPositions();
- new_position_local = object->getPosition();
+ //RN: I forget, but we need to do this because of snapping which doesn't often result
+ // in position changes even when the mouse moves
+ object->setPosition(new_position_local);
+ rebuild(object);
+ gAgentAvatarp->clampAttachmentPositions();
+ new_position_local = object->getPosition();
- if (selectNode->mIndividualSelection)
- {
- // counter-translate child objects if we are moving the root as an individual
- object->resetChildrenPosition(old_position_local - new_position_local, true);
+ if (selectNode->mIndividualSelection)
+ {
+ // counter-translate child objects if we are moving the root as an individual
+ object->resetChildrenPosition(old_position_local - new_position_local, true);
+ }
}
}
else
diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp
index 7b8211ded8..ac2f52a262 100644
--- a/indra/newview/llmarketplacefunctions.cpp
+++ b/indra/newview/llmarketplacefunctions.cpp
@@ -206,10 +206,10 @@ namespace LLMarketplaceImport
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("marketplacePostCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("marketplacePostCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setWantHeaders(true);
httpOpts->setFollowRedirects(true);
@@ -267,17 +267,17 @@ namespace LLMarketplaceImport
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("marketplaceGetCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("marketplaceGetCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLCore::HttpHeaders::ptr_t httpHeaders;
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setWantHeaders(true);
httpOpts->setFollowRedirects(!sMarketplaceCookie.empty());
if (buildHeaders)
{
- httpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders);
+ httpHeaders = std::make_shared<LLCore::HttpHeaders>();
httpHeaders->append(HTTP_OUT_HEADER_ACCEPT, "*/*");
httpHeaders->append(HTTP_OUT_HEADER_COOKIE, sMarketplaceCookie);
@@ -783,9 +783,9 @@ void LLMarketplaceData::getMerchantStatusCoro()
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getMerchantStatusCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setFollowRedirects(true);
@@ -861,9 +861,9 @@ void LLMarketplaceData::getSLMListingsCoro(LLUUID folderId)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getSLMListingsCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
httpHeaders->append("Accept", "application/json");
httpHeaders->append("Content-Type", "application/json");
@@ -926,9 +926,9 @@ void LLMarketplaceData::getSingleListingCoro(S32 listingId, LLUUID folderId)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getSingleListingCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
httpHeaders->append("Accept", "application/json");
httpHeaders->append("Content-Type", "application/json");
@@ -997,9 +997,9 @@ void LLMarketplaceData::createSLMListingCoro(LLUUID folderId, LLUUID versionId,
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("createSLMListingCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
httpHeaders->append("Accept", "application/json");
httpHeaders->append("Content-Type", "application/json");
@@ -1071,9 +1071,9 @@ void LLMarketplaceData::updateSLMListingCoro(LLUUID folderId, S32 listingId, LLU
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("updateSLMListingCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
httpHeaders->append("Accept", "application/json");
httpHeaders->append("Content-Type", "application/json");
@@ -1166,9 +1166,9 @@ void LLMarketplaceData::associateSLMListingCoro(LLUUID folderId, S32 listingId,
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("associateSLMListingCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
httpHeaders->append("Accept", "application/json");
httpHeaders->append("Content-Type", "application/json");
@@ -1247,9 +1247,9 @@ void LLMarketplaceData::deleteSLMListingCoro(S32 listingId)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("deleteSLMListingCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
httpHeaders->append("Accept", "application/json");
httpHeaders->append("Content-Type", "application/json");
diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h
index 281743c1d6..07ed667b0a 100644
--- a/indra/newview/llmarketplacefunctions.h
+++ b/indra/newview/llmarketplacefunctions.h
@@ -28,15 +28,11 @@
#ifndef LL_LLMARKETPLACEFUNCTIONS_H
#define LL_LLMARKETPLACEFUNCTIONS_H
-
-#include <llsd.h>
-#include <boost/function.hpp>
-#include <boost/signals2.hpp>
-
+#include "llsd.h"
#include "llsingleton.h"
#include "llstring.h"
-
+#include <boost/signals2.hpp>
namespace MarketplaceErrorCodes
{
diff --git a/indra/newview/llmarketplacenotifications.h b/indra/newview/llmarketplacenotifications.h
index a602b930de..0b03bde16c 100644
--- a/indra/newview/llmarketplacenotifications.h
+++ b/indra/newview/llmarketplacenotifications.h
@@ -30,7 +30,7 @@
#include <llsd.h>
-#include <boost/function.hpp>
+#include <functional>
//
@@ -48,7 +48,7 @@ namespace LLMarketplaceInventoryNotifications
{
void update();
- typedef boost::function<void (const LLSD&)> NoCopyCallbackFunction;
+ typedef std::function<void (const LLSD&)> NoCopyCallbackFunction;
void addNoCopyNotification(const LLSD& payload, const NoCopyCallbackFunction& cb);
};
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index cac72bb085..4e14f416e9 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -494,7 +494,7 @@ bool LLMaterialEditor::postBuild()
refreshUploadCost();
}
- boost::function<void(LLUICtrl*, void*)> changes_callback = [this](LLUICtrl * ctrl, void* userData)
+ std::function<void(LLUICtrl*, void*)> changes_callback = [this](LLUICtrl * ctrl, void* userData)
{
const U32 *flag = (const U32*)userData;
markChangesUnsaved(*flag);
@@ -1987,12 +1987,14 @@ void LLMaterialEditor::loadMaterialFromFile(const std::string& filename, S32 ind
{
// Prespecified material
LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor");
+ me->mUploadFolder = dest_folder;
me->loadMaterial(model_in, filename, index);
}
else if (model_in.materials.size() == 1)
{
// Only one material, just load it
LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor");
+ me->mUploadFolder = dest_folder;
me->loadMaterial(model_in, filename, 0);
}
else
@@ -2018,11 +2020,12 @@ void LLMaterialEditor::loadMaterialFromFile(const std::string& filename, S32 ind
material_list.push_back(LLTrans::getString("material_batch_import_text"));
LLFloaterComboOptions::showUI(
- [model_in, filename](const std::string& option, S32 index)
+ [model_in, filename, dest_folder](const std::string& option, S32 index)
{
if (index >= 0) // -1 on cancel
{
LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor");
+ me->mUploadFolder = dest_folder;
me->loadMaterial(model_in, filename, index);
}
},
@@ -2448,7 +2451,7 @@ void LLMaterialEditor::loadMaterial(const tinygltf::Model &model_in, const std::
if (index == model_in.materials.size())
{
// bulk upload all the things
- upload_bulk({ filename }, LLFilePicker::FFLOAD_MATERIAL, true, LLUUID::null);
+ upload_bulk({ filename }, LLFilePicker::FFLOAD_MATERIAL, true, mUploadFolder);
return;
}
diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp
index ee5e5b438e..723f834d6f 100644
--- a/indra/newview/llmaterialmgr.cpp
+++ b/indra/newview/llmaterialmgr.cpp
@@ -67,7 +67,7 @@
class LLMaterialHttpHandler : public LLHttpSDHandler
{
public:
- typedef boost::function<void(bool, const LLSD&)> CallbackFunction;
+ typedef std::function<void(bool, const LLSD&)> CallbackFunction;
typedef std::shared_ptr<LLMaterialHttpHandler> ptr_t;
LLMaterialHttpHandler(const std::string& method, CallbackFunction cback);
@@ -137,9 +137,9 @@ LLMaterialMgr::LLMaterialMgr():
{
LLAppCoreHttp & app_core_http(LLAppViewer::instance()->getAppCoreHttp());
- mHttpRequest = LLCore::HttpRequest::ptr_t(new LLCore::HttpRequest());
- mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders());
- mHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions());
+ mHttpRequest = std::make_shared<LLCore::HttpRequest>();
+ mHttpHeaders = std::make_shared<LLCore::HttpHeaders>();
+ mHttpOptions = std::make_shared<LLCore::HttpOptions>();
mHttpPolicy = app_core_http.getPolicy(LLAppCoreHttp::AP_MATERIALS);
mMaterials.insert(std::pair<LLMaterialID, LLMaterialPtr>(LLMaterialID::null, LLMaterialPtr(NULL)));
@@ -684,9 +684,9 @@ void LLMaterialMgr::processGetQueue()
LLSD postData = LLSD::emptyMap();
postData[MATERIALS_CAP_ZIP_FIELD] = materialBinary;
- LLCore::HttpHandler::ptr_t handler(new LLMaterialHttpHandler("POST",
+ LLCore::HttpHandler::ptr_t handler = std::make_shared<LLMaterialHttpHandler>("POST",
boost::bind(&LLMaterialMgr::onGetResponse, this, _1, _2, region_id)
- ));
+ );
LL_DEBUGS("Materials") << "POSTing to region '" << regionp->getName() << "' at '" << capURL << " for " << materialsData.size() << " materials."
<< "\ndata: " << ll_pretty_print_sd(materialsData) << LL_ENDL;
@@ -864,9 +864,9 @@ void LLMaterialMgr::processGetAllQueueCoro(LLUUID regionId)
LL_DEBUGS("Materials") << "GET all for region " << regionId << "url " << capURL << LL_ENDL;
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(
- new LLCoreHttpUtil::HttpCoroutineAdapter("processGetAllQueue", LLCore::HttpRequest::DEFAULT_POLICY_ID));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest());
+ LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("processGetAllQueue", LLCore::HttpRequest::DEFAULT_POLICY_ID);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, capURL);
@@ -973,9 +973,9 @@ void LLMaterialMgr::processPutQueue()
LL_DEBUGS("Materials") << "put for " << itRequest->second.size() << " faces to region " << itRequest->first->getName() << LL_ENDL;
- LLCore::HttpHandler::ptr_t handler (new LLMaterialHttpHandler("PUT",
+ LLCore::HttpHandler::ptr_t handler = std::make_shared<LLMaterialHttpHandler>("PUT",
boost::bind(&LLMaterialMgr::onPutResponse, this, _1, _2)
- ));
+ );
LLCore::HttpHandle handle = LLCoreHttpUtil::requestPutWithLLSD(
mHttpRequest, mHttpPolicy, capURL,
diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp
index 83a6e66019..50236587ac 100644
--- a/indra/newview/llmediadataclient.cpp
+++ b/indra/newview/llmediadataclient.cpp
@@ -172,9 +172,9 @@ LLMediaDataClient::LLMediaDataClient(F32 queue_timer_delay, F32 retry_timer_dela
mMaxSortedQueueSize(max_sorted_queue_size),
mMaxRoundRobinQueueSize(max_round_robin_queue_size),
mQueueTimerIsRunning(false),
- mHttpRequest(new LLCore::HttpRequest()),
- mHttpHeaders(new LLCore::HttpHeaders()),
- mHttpOpts(new LLCore::HttpOptions()),
+ mHttpRequest(std::make_shared<LLCore::HttpRequest>()),
+ mHttpHeaders(std::make_shared<LLCore::HttpHeaders>()),
+ mHttpOpts(std::make_shared<LLCore::HttpOptions>()),
mHttpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID)
{
// *TODO: Look up real Policy ID
@@ -660,7 +660,7 @@ void LLMediaDataClient::Handler::onFailure(LLCore::HttpResponse * response, LLCo
void LLObjectMediaDataClient::fetchMedia(LLMediaDataClientObject *object)
{
// Create a get request and put it in the queue.
- enqueue(Request::ptr_t(new RequestGet(object, this)));
+ enqueue(std::make_shared<RequestGet>(object, this));
}
const char *LLObjectMediaDataClient::getCapabilityName() const
@@ -880,14 +880,14 @@ LLSD LLObjectMediaDataClient::RequestGet::getPayload() const
LLCore::HttpHandler::ptr_t LLObjectMediaDataClient::RequestGet::createHandler()
{
- return LLCore::HttpHandler::ptr_t(new LLObjectMediaDataClient::Handler(shared_from_this()));
+ return std::make_shared<LLObjectMediaDataClient::Handler>(shared_from_this());
}
void LLObjectMediaDataClient::updateMedia(LLMediaDataClientObject *object)
{
// Create an update request and put it in the queue.
- enqueue(Request::ptr_t(new RequestUpdate(object, this)));
+ enqueue(std::make_shared<RequestUpdate>(object, this));
}
LLObjectMediaDataClient::RequestUpdate::RequestUpdate(LLMediaDataClientObject *obj, LLMediaDataClient *mdc):
@@ -917,7 +917,7 @@ LLSD LLObjectMediaDataClient::RequestUpdate::getPayload() const
LLCore::HttpHandler::ptr_t LLObjectMediaDataClient::RequestUpdate::createHandler()
{
// This just uses the base class's responder.
- return LLCore::HttpHandler::ptr_t(new LLMediaDataClient::Handler(shared_from_this()));
+ return std::make_shared<LLMediaDataClient::Handler>(shared_from_this());
}
void LLObjectMediaDataClient::Handler::onSuccess(LLCore::HttpResponse * response, const LLSD &content)
@@ -1037,7 +1037,7 @@ void LLObjectMediaNavigateClient::navigate(LLMediaDataClientObject *object, U8 t
// LL_INFOS("LLMediaDataClient") << "navigate() initiated: " << ll_print_sd(sd_payload) << LL_ENDL;
// Create a get request and put it in the queue.
- enqueue(Request::ptr_t(new RequestNavigate(object, this, texture_index, url)));
+ enqueue(std::make_shared<RequestNavigate>(object, this, texture_index, url));
}
LLObjectMediaNavigateClient::RequestNavigate::RequestNavigate(LLMediaDataClientObject *obj, LLMediaDataClient *mdc, U8 texture_index, const std::string &url):
@@ -1058,7 +1058,7 @@ LLSD LLObjectMediaNavigateClient::RequestNavigate::getPayload() const
LLCore::HttpHandler::ptr_t LLObjectMediaNavigateClient::RequestNavigate::createHandler()
{
- return LLCore::HttpHandler::ptr_t(new LLObjectMediaNavigateClient::Handler(shared_from_this()));
+ return std::make_shared<LLObjectMediaNavigateClient::Handler>(shared_from_this());
}
void LLObjectMediaNavigateClient::Handler::onSuccess(LLCore::HttpResponse * response, const LLSD &content)
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 413f02b723..c0b1a5326a 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -654,12 +654,10 @@ public:
mRequestedBytes(requested_bytes)
{}
- virtual ~LLMeshHandlerBase()
- {}
+ virtual ~LLMeshHandlerBase() = default;
-protected:
- LLMeshHandlerBase(const LLMeshHandlerBase &); // Not defined
- void operator=(const LLMeshHandlerBase &); // Not defined
+ LLMeshHandlerBase(const LLMeshHandlerBase &) = delete;
+ LLMeshHandlerBase& operator=(const LLMeshHandlerBase&) = delete;
public:
virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response);
@@ -693,9 +691,8 @@ public:
}
virtual ~LLMeshHeaderHandler();
-protected:
- LLMeshHeaderHandler(const LLMeshHeaderHandler &); // Not defined
- void operator=(const LLMeshHeaderHandler &); // Not defined
+ LLMeshHeaderHandler(const LLMeshHeaderHandler&) = delete;
+ LLMeshHeaderHandler& operator=(const LLMeshHeaderHandler&) = delete;
public:
virtual void processData(LLCore::BufferArray * body, S32 body_offset, U8 * data, S32 data_size);
@@ -719,9 +716,8 @@ public:
}
virtual ~LLMeshLODHandler();
-protected:
- LLMeshLODHandler(const LLMeshLODHandler &); // Not defined
- void operator=(const LLMeshLODHandler &); // Not defined
+ LLMeshLODHandler(const LLMeshLODHandler&) = delete;
+ LLMeshLODHandler& operator=(const LLMeshLODHandler&) = delete;
public:
virtual void processData(LLCore::BufferArray * body, S32 body_offset, U8 * data, S32 data_size);
@@ -750,9 +746,8 @@ public:
}
virtual ~LLMeshSkinInfoHandler();
-protected:
- LLMeshSkinInfoHandler(const LLMeshSkinInfoHandler &); // Not defined
- void operator=(const LLMeshSkinInfoHandler &); // Not defined
+ LLMeshSkinInfoHandler(const LLMeshSkinInfoHandler&) = delete;
+ LLMeshSkinInfoHandler& operator=(const LLMeshSkinInfoHandler&) = delete;
void processSkin(U8* data, S32 data_size);
@@ -778,9 +773,8 @@ public:
{}
virtual ~LLMeshDecompositionHandler();
-protected:
- LLMeshDecompositionHandler(const LLMeshDecompositionHandler &); // Not defined
- void operator=(const LLMeshDecompositionHandler &); // Not defined
+ LLMeshDecompositionHandler(const LLMeshDecompositionHandler&) = delete;
+ LLMeshDecompositionHandler& operator=(const LLMeshDecompositionHandler&) = delete;
public:
virtual void processData(LLCore::BufferArray * body, S32 body_offset, U8 * data, S32 data_size);
@@ -804,9 +798,8 @@ public:
{}
virtual ~LLMeshPhysicsShapeHandler();
-protected:
- LLMeshPhysicsShapeHandler(const LLMeshPhysicsShapeHandler &); // Not defined
- void operator=(const LLMeshPhysicsShapeHandler &); // Not defined
+ LLMeshPhysicsShapeHandler(const LLMeshPhysicsShapeHandler&) = delete;
+ LLMeshPhysicsShapeHandler& operator=(const LLMeshPhysicsShapeHandler&) = delete;
public:
virtual void processData(LLCore::BufferArray * body, S32 body_offset, U8 * data, S32 data_size);
@@ -943,20 +936,20 @@ LLMeshRepoThread::LLMeshRepoThread()
mSkinMapMutex = new LLMutex();
mSignal = new LLCondition();
mHttpRequest = new LLCore::HttpRequest;
- mHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+ mHttpOptions = std::make_shared<LLCore::HttpOptions>();
mHttpOptions->setTransferTimeout(SMALL_MESH_XFER_TIMEOUT);
mHttpOptions->setUseRetryAfter(gSavedSettings.getBOOL("MeshUseHttpRetryAfter"));
- mHttpLargeOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+ mHttpLargeOptions = std::make_shared<LLCore::HttpOptions>();
mHttpLargeOptions->setTransferTimeout(LARGE_MESH_XFER_TIMEOUT);
mHttpLargeOptions->setUseRetryAfter(gSavedSettings.getBOOL("MeshUseHttpRetryAfter"));
- mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders);
+ mHttpHeaders = std::make_shared<LLCore::HttpHeaders>();
mHttpHeaders->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_VND_LL_MESH);
mHttpPolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_MESH2);
mHttpLargePolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_LARGE_MESH);
// Lod processing is expensive due to the number of requests
// and a need to do expensive cacheOptimize().
- mMeshThreadPool.reset(new LL::ThreadPool("MeshLodProcessing", 2));
+ mMeshThreadPool = std::make_unique<LL::ThreadPool>("MeshLodProcessing", 2);
mMeshThreadPool->start();
}
@@ -1653,7 +1646,7 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id)
if (!http_url.empty())
{
- LLMeshHandlerBase::ptr_t handler(new LLMeshSkinInfoHandler(mesh_id, offset, size));
+ LLMeshHandlerBase::ptr_t handler = std::make_shared<LLMeshSkinInfoHandler>(mesh_id, offset, size);
LLCore::HttpHandle handle = getByteRange(http_url, offset, size, handler);
if (LLCORE_HTTP_HANDLE_INVALID == handle)
{
@@ -1761,7 +1754,7 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id)
if (!http_url.empty())
{
- LLMeshHandlerBase::ptr_t handler(new LLMeshDecompositionHandler(mesh_id, offset, size));
+ LLMeshHandlerBase::ptr_t handler = std::make_shared<LLMeshDecompositionHandler>(mesh_id, offset, size);
LLCore::HttpHandle handle = getByteRange(http_url, offset, size, handler);
if (LLCORE_HTTP_HANDLE_INVALID == handle)
{
@@ -1860,7 +1853,7 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id)
if (!http_url.empty())
{
- LLMeshHandlerBase::ptr_t handler(new LLMeshPhysicsShapeHandler(mesh_id, offset, size));
+ LLMeshHandlerBase::ptr_t handler = std::make_shared<LLMeshPhysicsShapeHandler>(mesh_id, offset, size);
LLCore::HttpHandle handle = getByteRange(http_url, offset, size, handler);
if (LLCORE_HTTP_HANDLE_INVALID == handle)
{
@@ -1988,7 +1981,7 @@ bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params)
//within the first 4KB
//NOTE -- this will break of headers ever exceed 4KB
- LLMeshHandlerBase::ptr_t handler(new LLMeshHeaderHandler(mesh_params, 0, MESH_HEADER_SIZE));
+ LLMeshHandlerBase::ptr_t handler = std::make_shared<LLMeshHeaderHandler>(mesh_params, 0, MESH_HEADER_SIZE);
LLCore::HttpHandle handle = getByteRange(http_url, 0, MESH_HEADER_SIZE, handler);
if (LLCORE_HTTP_HANDLE_INVALID == handle)
{
@@ -2164,7 +2157,7 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod)
{
LL_DEBUGS(LOG_MESH) << "Mesh/Cache: Mesh body for ID " << mesh_id << " - was retrieved from the simulator." << LL_ENDL;
- LLMeshHandlerBase::ptr_t handler(new LLMeshLODHandler(mesh_params, lod, offset, size));
+ LLMeshHandlerBase::ptr_t handler = std::make_shared<LLMeshLODHandler>(mesh_params, lod, offset, size);
LLCore::HttpHandle handle = getByteRange(http_url, offset, size, handler);
if (LLCORE_HTTP_HANDLE_INVALID == handle)
{
@@ -2611,11 +2604,11 @@ LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list_t& data
mMeshUploadTimeOut = gSavedSettings.getS32("MeshUploadTimeOut");
mHttpRequest = new LLCore::HttpRequest;
- mHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+ mHttpOptions = std::make_shared<LLCore::HttpOptions>();
mHttpOptions->setTransferTimeout(mMeshUploadTimeOut);
mHttpOptions->setUseRetryAfter(gSavedSettings.getBOOL("MeshUseHttpRetryAfter"));
mHttpOptions->setRetries(UPLOAD_RETRY_LIMIT);
- mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders);
+ mHttpHeaders = std::make_shared<LLCore::HttpHeaders>();
mHttpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_LLSD_XML);
mHttpPolicyClass = LLAppViewer::instance()->getAppCoreHttp().getPolicy(LLAppCoreHttp::AP_UPLOADS);
}
@@ -4321,7 +4314,7 @@ S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_para
else
{
//first request for this mesh
- std::shared_ptr<PendingRequestBase> request(new PendingRequestLOD(mesh_params, new_lod));
+ std::shared_ptr<PendingRequestBase> request = std::make_shared<PendingRequestLOD>(mesh_params, new_lod);
mPendingRequests.emplace_back(request);
mLoadingMeshes[new_lod][mesh_id].initData(vobj, request);
LLMeshRepository::sLODPending++;
@@ -4819,7 +4812,7 @@ const LLMeshSkinInfo* LLMeshRepository::getSkinInfo(const LLUUID& mesh_id, LLVOV
else
{
//first request for this mesh
- std::shared_ptr<PendingRequestBase> request(new PendingRequestUUID(mesh_id, MESH_REQUEST_SKIN));
+ std::shared_ptr<PendingRequestBase> request = std::make_shared<PendingRequestUUID>(mesh_id, MESH_REQUEST_SKIN);
mLoadingSkins[mesh_id].initData(requesting_obj, request);
mPendingRequests.emplace_back(request);
}
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp
index f6d635f51f..9157e34833 100644
--- a/indra/newview/llmutelist.cpp
+++ b/indra/newview/llmutelist.cpp
@@ -190,7 +190,7 @@ LLMuteList::~LLMuteList()
void LLMuteList::cleanupSingleton()
{
- LLAvatarNameCache::getInstance()->setAccountNameChangedCallback(NULL);
+ LLAvatarNameCache::getInstance()->setAccountNameChangedCallback(nullptr);
}
bool LLMuteList::isLinden(const std::string& name)
diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h
index dde85f4d29..ffff21c95c 100644
--- a/indra/newview/llnamelistctrl.h
+++ b/indra/newview/llnamelistctrl.h
@@ -210,12 +210,12 @@ private:
boost::signals2::signal<void(const LLUUID &)> mIconClickedSignal;
public:
- boost::signals2::connection setOnNameListCompleteCallback(boost::function<void(bool)> onNameListCompleteCallback)
+ boost::signals2::connection setOnNameListCompleteCallback(std::function<void(bool)> onNameListCompleteCallback)
{
return mNameListCompleteSignal.connect(onNameListCompleteCallback);
}
- boost::signals2::connection setIconClickedCallback(boost::function<void(const LLUUID &)> cb)
+ boost::signals2::connection setIconClickedCallback(std::function<void(const LLUUID&)> cb)
{
return mIconClickedSignal.connect(cb);
}
diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h
index 2ed90e31b2..b3283ca642 100644
--- a/indra/newview/llnotificationlistitem.h
+++ b/indra/newview/llnotificationlistitem.h
@@ -84,7 +84,7 @@ public:
virtual void onMouseLeave(S32 x, S32 y, MASK mask);
//callbacks
- typedef boost::function<void (LLNotificationListItem* item)> item_callback_t;
+ typedef std::function<void (LLNotificationListItem* item)> item_callback_t;
typedef boost::signals2::signal<void (LLNotificationListItem* item)> item_signal_t;
item_signal_t mOnItemClose;
item_signal_t mOnItemClick;
@@ -156,8 +156,8 @@ protected:
LLTextBox* mGroupNameBoxExp;
private:
- LLGroupNotificationListItem(const LLGroupNotificationListItem &);
- LLGroupNotificationListItem & operator=(LLGroupNotificationListItem &);
+ LLGroupNotificationListItem(const LLGroupNotificationListItem&) = delete;
+ LLGroupNotificationListItem& operator=(LLGroupNotificationListItem&) = delete;
void setGroupName(std::string name);
bool updateFromCache();
@@ -175,8 +175,8 @@ public:
private:
friend class LLNotificationListItem;
LLGroupInviteNotificationListItem(const Params& p);
- LLGroupInviteNotificationListItem(const LLGroupInviteNotificationListItem &);
- LLGroupInviteNotificationListItem & operator=(LLGroupInviteNotificationListItem &);
+ LLGroupInviteNotificationListItem(const LLGroupInviteNotificationListItem&) = delete;
+ LLGroupInviteNotificationListItem& operator=(LLGroupInviteNotificationListItem&) = delete;
void setFee(S32 fee);
@@ -202,8 +202,8 @@ public:
private:
friend class LLNotificationListItem;
LLGroupNoticeNotificationListItem(const Params& p);
- LLGroupNoticeNotificationListItem(const LLGroupNoticeNotificationListItem &);
- LLGroupNoticeNotificationListItem & operator=(LLGroupNoticeNotificationListItem &);
+ LLGroupNoticeNotificationListItem(const LLGroupNoticeNotificationListItem&) = delete;
+ LLGroupNoticeNotificationListItem& operator=(LLGroupNoticeNotificationListItem&) = delete;
void setSender(std::string sender);
void onClickAttachment();
@@ -226,8 +226,8 @@ public:
private:
friend class LLNotificationListItem;
LLTransactionNotificationListItem(const Params& p);
- LLTransactionNotificationListItem(const LLTransactionNotificationListItem &);
- LLTransactionNotificationListItem & operator=(LLTransactionNotificationListItem &);
+ LLTransactionNotificationListItem(const LLTransactionNotificationListItem&) = delete;
+ LLTransactionNotificationListItem& operator=(LLTransactionNotificationListItem&) = delete;
LLAvatarIconCtrl* mAvatarIcon;
LLAvatarIconCtrl* mAvatarIconExp;
};
@@ -239,8 +239,8 @@ public:
private:
friend class LLNotificationListItem;
LLSystemNotificationListItem(const Params& p);
- LLSystemNotificationListItem(const LLSystemNotificationListItem &);
- LLSystemNotificationListItem & operator=(LLSystemNotificationListItem &);
+ LLSystemNotificationListItem(const LLSystemNotificationListItem&) = delete;
+ LLSystemNotificationListItem & operator=(LLSystemNotificationListItem &) = delete;
LLIconCtrl* mSystemNotificationIcon;
LLIconCtrl* mSystemNotificationIconExp;
bool mIsCaution;
diff --git a/indra/newview/llnotificationmanager.cpp b/indra/newview/llnotificationmanager.cpp
index 505f276f8c..29f11f7ca6 100644
--- a/indra/newview/llnotificationmanager.cpp
+++ b/indra/newview/llnotificationmanager.cpp
@@ -60,7 +60,7 @@ void LLNotificationManager::init()
mChannels.emplace_back(new LLBrowserNotification());
mChannels.emplace_back(new LLIMHandler());
- mChatHandler = std::shared_ptr<LLFloaterIMNearbyChatHandler>(new LLFloaterIMNearbyChatHandler());
+ mChatHandler = std::make_shared<LLFloaterIMNearbyChatHandler>();
}
//--------------------------------------------------------------------------
diff --git a/indra/newview/llnotificationstorage.cpp b/indra/newview/llnotificationstorage.cpp
index 75bafb8785..5cec35fc88 100644
--- a/indra/newview/llnotificationstorage.cpp
+++ b/indra/newview/llnotificationstorage.cpp
@@ -41,7 +41,7 @@
#include "llregistry.h"
#include "llviewermessage.h"
-typedef boost::function<LLNotificationResponderInterface * (const LLSD& pParams)> responder_constructor_t;
+typedef std::function<LLNotificationResponderInterface*(const LLSD& pParams)> responder_constructor_t;
class LLResponderRegistry : public LLRegistrySingleton<std::string, responder_constructor_t, LLResponderRegistry>
{
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index 58cd9fab83..32831fcd9b 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -54,7 +54,7 @@
#include "llvoavatarself.h"
#include "llwearableitemslist.h"
-static bool is_tab_header_clicked(LLAccordionCtrlTab* tab, S32 y);
+static bool is_tab_header_clicked(LLOutfitAccordionCtrlTab* tab, S32 y);
static const LLOutfitTabNameComparator OUTFIT_TAB_NAME_COMPARATOR;
static const LLOutfitTabFavComparator OUTFIT_TAB_FAV_COMPARATOR;
@@ -246,7 +246,10 @@ void LLOutfitsList::updateAddedCategory(LLUUID cat_id)
list->setCommitCallback(boost::bind(&LLOutfitsList::onListSelectionChange, this, _1));
// Setting list refresh callback to apply filter on list change.
- list->setRefreshCompleteCallback(boost::bind(&LLOutfitsList::onRefreshComplete, this, _1));
+ list->setRefreshCompleteCallback([this, tab](LLUICtrl* ctrl, const LLSD& sd)
+ {
+ onRefreshComplete(ctrl, tab);
+ });
list->setRightMouseDownCallback(boost::bind(&LLOutfitsList::onWearableItemsListRightClick, this, _1, _2, _3));
@@ -294,7 +297,7 @@ void LLOutfitsList::updateRemovedCategory(LLUUID cat_id)
if (outfits_iter != mOutfitsMap.end())
{
const LLUUID& outfit_id = outfits_iter->first;
- LLAccordionCtrlTab* tab = outfits_iter->second;
+ LLOutfitAccordionCtrlTab* tab = outfits_iter->second;
// An outfit is removed from the list. Do the following:
// 1. Remove outfit category from observer to stop monitoring its changes.
@@ -322,11 +325,11 @@ void LLOutfitsList::onHighlightBaseOutfit(LLUUID base_id, LLUUID prev_id)
{
if (mOutfitsMap[prev_id])
{
- ((LLOutfitAccordionCtrlTab*)mOutfitsMap[prev_id])->setOutfitSelected(false);
+ mOutfitsMap[prev_id]->setOutfitSelected(false);
}
if (mOutfitsMap[base_id])
{
- ((LLOutfitAccordionCtrlTab*)mOutfitsMap[base_id])->setOutfitSelected(true);
+ mOutfitsMap[base_id]->setOutfitSelected(true);
}
}
@@ -370,7 +373,7 @@ void LLOutfitsList::onSetSelectedOutfitByUUID(const LLUUID& outfit_uuid)
{
if (outfit_uuid == iter->first)
{
- LLAccordionCtrlTab* tab = iter->second;
+ LLOutfitAccordionCtrlTab* tab = iter->second;
if (!tab) continue;
LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView());
@@ -464,7 +467,7 @@ void LLOutfitsList::onCollapseAllFolders()
iter != mOutfitsMap.end();
++iter)
{
- LLAccordionCtrlTab* tab = iter->second;
+ LLOutfitAccordionCtrlTab* tab = iter->second;
if(tab && tab->isExpanded())
{
tab->changeOpenClose(true);
@@ -478,7 +481,7 @@ void LLOutfitsList::onExpandAllFolders()
iter != mOutfitsMap.end();
++iter)
{
- LLAccordionCtrlTab* tab = iter->second;
+ LLOutfitAccordionCtrlTab* tab = iter->second;
if(tab && !tab->isExpanded())
{
tab->changeOpenClose(false);
@@ -501,7 +504,7 @@ void LLOutfitsList::updateChangedCategoryName(LLViewerInventoryCategory *cat, st
if (outfits_iter != mOutfitsMap.end())
{
// Update tab name with the new category name.
- LLOutfitAccordionCtrlTab* tab = (LLOutfitAccordionCtrlTab*) outfits_iter->second;
+ LLOutfitAccordionCtrlTab* tab = outfits_iter->second;
if (tab)
{
tab->setName(name);
@@ -554,7 +557,7 @@ void LLOutfitsList::deselectOutfit(const LLUUID& category_id)
LLOutfitListBase::deselectOutfit(category_id);
}
-void LLOutfitsList::restoreOutfitSelection(LLAccordionCtrlTab* tab, const LLUUID& category_id)
+void LLOutfitsList::restoreOutfitSelection(LLOutfitAccordionCtrlTab* tab, const LLUUID& category_id)
{
// Try restoring outfit selection after filtering.
if (mAccordion->getSelectedTab() == tab)
@@ -563,23 +566,21 @@ void LLOutfitsList::restoreOutfitSelection(LLAccordionCtrlTab* tab, const LLUUID
}
}
-void LLOutfitsList::onRefreshComplete(LLUICtrl* ctrl)
+void LLOutfitsList::onRefreshComplete(LLUICtrl* ctrl, LLOutfitAccordionCtrlTab* tab)
{
if (!ctrl || getFilterSubString().empty())
return;
- for (outfits_map_t::iterator
- iter = mOutfitsMap.begin(),
- iter_end = mOutfitsMap.end();
- iter != iter_end; ++iter)
+ LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView());
+ if (list != ctrl)
{
- LLAccordionCtrlTab* tab = iter->second;
- if (!tab) continue;
-
- LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView());
- if (list != ctrl) continue;
-
- applyFilterToTab(iter->first, tab, getFilterSubString());
+ llassert(false);
+ LL_WARNS() << "LLOutfitsList::onRefreshComplete: ctrl does not match tab's list!" << LL_ENDL;
+ return;
+ }
+ if (tab->getFilterGeneration() != getFilterGeneration())
+ {
+ applyFilterToTab(tab->getFolderID(), tab, getFilterSubString());
}
}
@@ -592,7 +593,7 @@ void LLOutfitsList::onFilterSubStringChanged(const std::string& new_string, cons
while (iter != iter_end)
{
const LLUUID& category_id = iter->first;
- LLAccordionCtrlTab* tab = iter++->second;
+ LLOutfitAccordionCtrlTab* tab = iter++->second;
if (!tab) continue;
LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView());
@@ -631,9 +632,10 @@ void LLOutfitsList::onFilterSubStringChanged(const std::string& new_string, cons
void LLOutfitsList::applyFilterToTab(
const LLUUID& category_id,
- LLAccordionCtrlTab* tab,
+ LLOutfitAccordionCtrlTab* tab,
const std::string& filter_substring)
{
+ LL_PROFILE_ZONE_SCOPED;
if (!tab) return;
LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView());
if (!list) return;
@@ -645,6 +647,7 @@ void LLOutfitsList::applyFilterToTab(
LLStringUtil::toUpper(cur_filter);
tab->setTitle(tab->getTitle(), cur_filter);
+ tab->setFilterGeneration(getFilterGeneration());
if (std::string::npos == title.find(cur_filter))
{
@@ -768,7 +771,7 @@ void LLOutfitsList::onCOFChanged()
outfits_map_t::iterator map_iter = mOutfitsMap.begin(), map_end = mOutfitsMap.end();
while (map_iter != map_end)
{
- LLAccordionCtrlTab* tab = (map_iter++)->second;
+ LLOutfitAccordionCtrlTab* tab = (map_iter++)->second;
if (!tab) continue;
LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView());
@@ -799,7 +802,7 @@ void LLOutfitsList::sortOutfits()
void LLOutfitsList::onOutfitRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id)
{
- LLAccordionCtrlTab* tab = dynamic_cast<LLAccordionCtrlTab*>(ctrl);
+ LLOutfitAccordionCtrlTab* tab = dynamic_cast<LLOutfitAccordionCtrlTab*>(ctrl);
if (mOutfitMenu && is_tab_header_clicked(tab, y) && cat_id.notNull())
{
// Focus tab header to trigger tab selection change.
@@ -822,7 +825,7 @@ void LLOutfitsList::handleInvFavColorChange()
++iter)
{
if (!iter->second) continue;
- LLOutfitAccordionCtrlTab* tab = (LLOutfitAccordionCtrlTab*)iter->second;
+ LLOutfitAccordionCtrlTab* tab = iter->second;
// refresh font color
tab->setFavorite(tab->getFavorite());
@@ -849,7 +852,7 @@ void LLOutfitsList::onChangeSortOrder(const LLSD& userdata)
{
for (outfits_map_t::value_type& outfit : mOutfitsMap)
{
- LLAccordionCtrlTab* tab = outfit.second;
+ LLOutfitAccordionCtrlTab* tab = outfit.second;
const LLUUID& category_id = outfit.first;
if (!tab) continue;
@@ -890,7 +893,7 @@ LLOutfitListGearMenuBase* LLOutfitsList::createGearMenu()
}
-bool is_tab_header_clicked(LLAccordionCtrlTab* tab, S32 y)
+bool is_tab_header_clicked(LLOutfitAccordionCtrlTab* tab, S32 y)
{
if(!tab || !tab->getHeaderVisible()) return false;
diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h
index 0bf5becb05..bcf7e45696 100644
--- a/indra/newview/lloutfitslist.h
+++ b/indra/newview/lloutfitslist.h
@@ -38,14 +38,13 @@
#include "lltoggleablemenu.h"
#include "llviewermenu.h"
-class LLAccordionCtrlTab;
+class LLOutfitAccordionCtrlTab;
class LLInventoryCategoriesObserver;
class LLOutfitListGearMenuBase;
class LLOutfitListSortMenuBase;
class LLWearableItemsList;
class LLListContextMenu;
-
/**
* @class LLOutfitTabNameComparator
*
@@ -76,7 +75,7 @@ public:
class LLOutfitListBase : public LLPanelAppearanceTab
{
public:
- typedef boost::function<void(const LLUUID&)> selection_change_callback_t;
+ typedef std::function<void(const LLUUID&)> selection_change_callback_t;
typedef boost::signals2::signal<void(const LLUUID&)> selection_change_signal_t;
LLOutfitListBase();
@@ -266,7 +265,10 @@ public:
void setFavorite(bool is_favorite);
bool getFavorite() const { return mIsFavorite; }
+ LLUUID getFolderID() const { return mFolderID; }
void setOutfitSelected(bool val);
+ U32 getFilterGeneration() const { return mFilterGeneration; }
+ void setFilterGeneration(U32 generation) { mFilterGeneration = generation; }
static LLUIImage* sFavoriteIcon;
static LLUIColor sFgColor;
@@ -284,6 +286,7 @@ public:
LLUUID mFolderID;
bool mIsFavorite = false;
bool mIsSelected = false;
+ U32 mFilterGeneration = 0;
};
/**
* @class LLOutfitsList
@@ -386,20 +389,20 @@ private:
*
* A tab may be hidden if it doesn't match current filter.
*/
- void restoreOutfitSelection(LLAccordionCtrlTab* tab, const LLUUID& category_id);
+ void restoreOutfitSelection(LLOutfitAccordionCtrlTab* tab, const LLUUID& category_id);
/**
* Called upon list refresh event to update tab visibility depending on
* the results of applying filter to the title and list items of the tab.
*/
- void onRefreshComplete(LLUICtrl* ctrl);
+ void onRefreshComplete(LLUICtrl* ctrl, LLOutfitAccordionCtrlTab* tab);
/**
* Applies filter to the given tab
*
* @see applyFilter()
*/
- void applyFilterToTab(const LLUUID& category_id, LLAccordionCtrlTab* tab, const std::string& filter_substring);
+ void applyFilterToTab(const LLUUID& category_id, LLOutfitAccordionCtrlTab* tab, const std::string& filter_substring);
/**
* Returns true if all selected items can be worn.
@@ -426,7 +429,7 @@ private:
typedef wearables_lists_map_t::value_type wearables_lists_map_value_t;
wearables_lists_map_t mSelectedListsMap;
- typedef std::map<LLUUID, LLAccordionCtrlTab*> outfits_map_t;
+ typedef std::map<LLUUID, LLOutfitAccordionCtrlTab*> outfits_map_t;
typedef outfits_map_t::value_type outfits_map_value_t;
outfits_map_t mOutfitsMap;
diff --git a/indra/newview/llpanelappearancetab.cpp b/indra/newview/llpanelappearancetab.cpp
index 3ee4ab8e51..ef04d7f13f 100644
--- a/indra/newview/llpanelappearancetab.cpp
+++ b/indra/newview/llpanelappearancetab.cpp
@@ -40,6 +40,7 @@ void LLPanelAppearanceTab::setFilterSubString(const std::string& new_string)
{
std::string old_string = mFilterSubString;
mFilterSubString = new_string;
+ mFilterGeneration++;
onFilterSubStringChanged(mFilterSubString, old_string);
}
@@ -52,6 +53,7 @@ void LLPanelAppearanceTab::checkFilterSubString()
{
std::string old_string = mFilterSubString;
mFilterSubString = sRecentFilterSubString;
+ mFilterGeneration++;
onFilterSubStringChanged(mFilterSubString, old_string);
}
}
diff --git a/indra/newview/llpanelappearancetab.h b/indra/newview/llpanelappearancetab.h
index e088c3e6f0..936fe2aec7 100644
--- a/indra/newview/llpanelappearancetab.h
+++ b/indra/newview/llpanelappearancetab.h
@@ -48,6 +48,7 @@ public:
virtual void getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const {}
const std::string& getFilterSubString() { return mFilterSubString; }
+ U32 getFilterGeneration() { return mFilterGeneration; }
virtual void updateMenuItemsVisibility() = 0;
virtual LLToggleableMenu* getGearMenu() = 0;
@@ -63,6 +64,7 @@ protected:
private:
std::string mFilterSubString;
+ U32 mFilterGeneration = 0;
static std::string sRecentFilterSubString;
};
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 0e72771bd8..35624436b3 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -126,11 +126,11 @@ static void put_avatar_properties_coro(std::string cap_url, LLUUID agent_id, LLS
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("put_avatar_properties_coro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("put_avatar_properties_coro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLCore::HttpHeaders::ptr_t httpHeaders;
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setFollowRedirects(true);
std::string finalUrl = cap_url + "/" + agent_id.asString();
diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp
index 7d55ba3265..69f51b03b6 100644
--- a/indra/newview/llpanelblockedlist.cpp
+++ b/indra/newview/llpanelblockedlist.cpp
@@ -263,7 +263,7 @@ void LLPanelBlockedList::callbackBlockByName(const std::string& text)
// Constructor/Destructor
LLFloaterGetBlockedObjectName::LLFloaterGetBlockedObjectName(const LLSD& key)
: LLFloater(key)
-, mGetObjectNameCallback(NULL)
+, mGetObjectNameCallback(nullptr)
{
}
diff --git a/indra/newview/llpanelblockedlist.h b/indra/newview/llpanelblockedlist.h
index 1f470199ce..782a44bc5b 100644
--- a/indra/newview/llpanelblockedlist.h
+++ b/indra/newview/llpanelblockedlist.h
@@ -95,7 +95,7 @@ class LLFloaterGetBlockedObjectName : public LLFloater
{
friend class LLFloaterReg;
public:
- typedef boost::function<void (const std::string&)> get_object_name_callback_t;
+ typedef std::function<void(const std::string&)> get_object_name_callback_t;
bool postBuild() override;
diff --git a/indra/newview/llpaneldirbrowser.cpp b/indra/newview/llpaneldirbrowser.cpp
index 2105becfb6..8c981cad55 100644
--- a/indra/newview/llpaneldirbrowser.cpp
+++ b/indra/newview/llpaneldirbrowser.cpp
@@ -422,7 +422,7 @@ void LLPanelDirBrowser::processDirPeopleReply(LLMessageSystem *msg, void**)
for (S32 i = 0; i < rows; i++)
{
msg->getStringFast(_PREHASH_QueryReplies,_PREHASH_FirstName, first_name, i);
- msg->getStringFast(_PREHASH_QueryReplies,_PREHASH_LastName, last_name, i);
+ msg->getStringFast(_PREHASH_QueryReplies,_PREHASH_LastName, last_name, i);
msg->getUUIDFast( _PREHASH_QueryReplies,_PREHASH_AgentID, agent_id, i);
// msg->getU8Fast( _PREHASH_QueryReplies,_PREHASH_Online, online, i);
// unused
@@ -469,10 +469,10 @@ void LLPanelDirBrowser::processDirPeopleReply(LLMessageSystem *msg, void**)
void LLPanelDirBrowser::processDirPlacesReply(LLMessageSystem* msg, void**)
{
- LLUUID agent_id;
- LLUUID query_id;
- LLUUID parcel_id;
- std::string name;
+ LLUUID agent_id;
+ LLUUID query_id;
+ LLUUID parcel_id;
+ std::string name;
bool is_for_sale = false;
bool is_auction = false;
F32 dwell;
@@ -557,8 +557,8 @@ void LLPanelDirBrowser::processDirEventsReply(LLMessageSystem* msg, void**)
LLUUID agent_id;
LLUUID query_id;
LLUUID owner_id;
- std::string name;
- std::string date;
+ std::string name;
+ std::string date;
bool show_pg = gSavedSettings.getBOOL("ShowPGEvents");
bool show_mature = gSavedSettings.getBOOL("ShowMatureEvents");
bool show_adult = gSavedSettings.getBOOL("ShowAdultEvents");
@@ -703,7 +703,7 @@ void LLPanelDirBrowser::processDirGroupsReply(LLMessageSystem* msg, void**)
LLUUID query_id;
LLUUID group_id;
- std::string group_name;
+ std::string group_name;
S32 members;
F32 search_order;
@@ -733,10 +733,10 @@ void LLPanelDirBrowser::processDirGroupsReply(LLMessageSystem* msg, void**)
for (i = 0; i < rows; i++)
{
- msg->getUUIDFast(_PREHASH_QueryReplies, _PREHASH_GroupID, group_id, i );
- msg->getStringFast(_PREHASH_QueryReplies, _PREHASH_GroupName, group_name, i);
- msg->getS32Fast(_PREHASH_QueryReplies, _PREHASH_Members, members, i );
- msg->getF32Fast(_PREHASH_QueryReplies, _PREHASH_SearchOrder, search_order, i );
+ msg->getUUIDFast(_PREHASH_QueryReplies, _PREHASH_GroupID, group_id, i );
+ msg->getStringFast(_PREHASH_QueryReplies, _PREHASH_GroupName, group_name, i);
+ msg->getS32Fast(_PREHASH_QueryReplies, _PREHASH_Members, members, i );
+ msg->getF32Fast(_PREHASH_QueryReplies, _PREHASH_SearchOrder, search_order, i );
if (group_id.isNull())
{
@@ -831,8 +831,8 @@ void LLPanelDirBrowser::processDirClassifiedReply(LLMessageSystem* msg, void**)
{
LLUUID classified_id;
std::string name;
- U32 creation_date = 0; // unix timestamp
- U32 expiration_date = 0; // future use
+ U32 creation_date = 0; // unix timestamp
+ U32 expiration_date = 0; // future use
S32 price_for_listing = 0;
msg->getUUID("QueryReplies", "ClassifiedID", classified_id, i);
msg->getString("QueryReplies", "Name", name, i);
@@ -863,7 +863,7 @@ void LLPanelDirBrowser::processDirLandReply(LLMessageSystem *msg, void**)
LLUUID agent_id;
LLUUID query_id;
LLUUID parcel_id;
- std::string name;
+ std::string name;
std::string land_sku;
std::string land_type;
bool auction = false;
diff --git a/indra/newview/llpaneldirbrowser.h b/indra/newview/llpaneldirbrowser.h
index cb947f8507..f422affc4b 100644
--- a/indra/newview/llpaneldirbrowser.h
+++ b/indra/newview/llpaneldirbrowser.h
@@ -157,7 +157,7 @@ const S32 AUCTION_CODE = 7; // for auction place
const S32 POPULAR_CODE = 8; // popular by dwell
// mask values for search flags
-const S32 SEARCH_NONE = 0; // should try not to send this to the search engine
+const S32 SEARCH_NONE = 0; // should try not to send this to the search engine
const S32 SEARCH_PG = 1;
const S32 SEARCH_MATURE = 2;
const S32 SEARCH_ADULT = 4;
diff --git a/indra/newview/llpaneldirevents.cpp b/indra/newview/llpaneldirevents.cpp
index eb02b3901d..227ed877cd 100644
--- a/indra/newview/llpaneldirevents.cpp
+++ b/indra/newview/llpaneldirevents.cpp
@@ -100,8 +100,8 @@ void LLPanelDirEvents::setDay(S32 day)
internal_time = utc_to_pacific_time(utc_time, is_daylight_savings());
std::string buffer = llformat("%d/%d",
- 1 + internal_time->tm_mon, // Jan = 0
- internal_time->tm_mday); // 2001 = 101
+ 1 + internal_time->tm_mon, // Jan = 0
+ internal_time->tm_mday); // 2001 = 101
childSetValue("date_text", buffer);
}
@@ -132,8 +132,8 @@ void LLPanelDirEvents::performQueryOrDelete(U32 event_id)
internal_time = utc_to_pacific_time(utc_time, is_daylight_savings());
std::string buffer = llformat("%d/%d",
- 1 + internal_time->tm_mon, // Jan = 0
- internal_time->tm_mday); // 2001 = 101
+ 1 + internal_time->tm_mon, // Jan = 0
+ internal_time->tm_mday); // 2001 = 101
childSetValue("date_text", buffer);
// Record the relative day so back and forward buttons
diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp
index 3d376251ff..578206a768 100644
--- a/indra/newview/llpaneleditsky.cpp
+++ b/indra/newview/llpaneleditsky.cpp
@@ -35,7 +35,6 @@
#include "llvirtualtrackball.h"
#include "llsettingssky.h"
#include "llenvironment.h"
-#include "llatmosphere.h"
#include "llviewercontrol.h"
namespace
@@ -926,13 +925,6 @@ void LLPanelSettingsSkyDensityTab::updateProfile()
mSkySettings->setAbsorptionConfigs(absorption_config);
mSkySettings->update();
setIsDirty();
-
- if (gAtmosphere)
- {
- AtmosphericModelSettings atmospheric_settings;
- LLEnvironment::getAtmosphericModelSettings(atmospheric_settings, mSkySettings);
- gAtmosphere->configureAtmosphericModel(atmospheric_settings);
- }
}
void LLPanelSettingsSkyDensityTab::onRayleighExponentialChanged()
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index 282b6d4a0a..8bcb6e9ec3 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -438,7 +438,7 @@ template <typename T>
const LLEditWearableDictionary::PickerControlEntry*
get_picker_entry (const ETextureIndex index) { return NULL; }
-typedef boost::function<void(LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry*)> function_t;
+typedef std::function<void(LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry*)> function_t;
typedef struct PickerControlEntryNamePredicate
{
diff --git a/indra/newview/llpanelexperiencelisteditor.h b/indra/newview/llpanelexperiencelisteditor.h
index 7ff1ddac5a..70bc2ecd3c 100644
--- a/indra/newview/llpanelexperiencelisteditor.h
+++ b/indra/newview/llpanelexperiencelisteditor.h
@@ -42,7 +42,7 @@ public:
typedef boost::signals2::signal<void (const LLUUID&) > list_changed_signal_t;
// filter function for experiences, return true if the experience should be hidden.
- typedef boost::function<bool (const LLSD&)> experience_function;
+ typedef std::function<bool(const LLSD&)> experience_function;
typedef std::vector<experience_function> filter_list;
typedef LLHandle<LLFloaterExperiencePicker> PickerHandle;
LLPanelExperienceListEditor();
diff --git a/indra/newview/llpanelexperiencepicker.h b/indra/newview/llpanelexperiencepicker.h
index 72c0b1b74d..5cde0a03fb 100644
--- a/indra/newview/llpanelexperiencepicker.h
+++ b/indra/newview/llpanelexperiencepicker.h
@@ -39,9 +39,9 @@ public:
friend class LLExperienceSearchResponder;
friend class LLFloaterExperiencePicker;
- typedef boost::function<void (const uuid_vec_t&)> select_callback_t;
+ typedef std::function<void(const uuid_vec_t&)> select_callback_t;
// filter function for experiences, return true if the experience should be hidden.
- typedef boost::function<bool (const LLSD&)> filter_function;
+ typedef std::function<bool(const LLSD&)> filter_function;
typedef std::vector<filter_function> filter_list;
LLPanelExperiencePicker();
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 182b648914..de8ab95dee 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -1166,26 +1166,22 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
bool missing_asset = false;
{
LLGLenum image_format = GL_RGB;
+ bool has_alpha = false;
bool identical_image_format = false;
- LLSelectedTE::getImageFormat(image_format, identical_image_format, missing_asset);
+ LLSelectedTE::getImageFormat(image_format, has_alpha, identical_image_format, missing_asset);
if (!missing_asset)
{
- mIsAlpha = false;
+ mIsAlpha = has_alpha;
switch (image_format)
{
case GL_RGBA:
case GL_ALPHA:
- {
- mIsAlpha = true;
- }
- break;
-
case GL_RGB:
break;
default:
{
- LL_WARNS() << "Unexpected tex format in LLPanelFace...resorting to no alpha" << LL_ENDL;
+ LL_WARNS() << "Unexpected tex format in LLPanelFace..." << LL_ENDL;
}
break;
}
@@ -3292,23 +3288,22 @@ void LLPanelFace::onSelectTexture()
sendTexture();
LLGLenum image_format;
+ bool has_alpha;
bool identical_image_format = false;
bool missing_asset = false;
- LLSelectedTE::getImageFormat(image_format, identical_image_format, missing_asset);
+ LLSelectedTE::getImageFormat(image_format, has_alpha, identical_image_format, missing_asset);
- U32 alpha_mode = LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
if (!missing_asset)
{
+ U32 alpha_mode = has_alpha ? LLMaterial::DIFFUSE_ALPHA_MODE_BLEND : LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
switch (image_format)
{
case GL_RGBA:
case GL_ALPHA:
- alpha_mode = LLMaterial::DIFFUSE_ALPHA_MODE_BLEND;
- break;
case GL_RGB:
break;
default:
- LL_WARNS() << "Unexpected tex format in LLPanelFace...resorting to no alpha" << LL_ENDL;
+ LL_WARNS() << "Unexpected tex format in LLPanelFace..." << LL_ENDL;
break;
}
@@ -5258,12 +5253,13 @@ void LLPanelFace::LLSelectedTE::getFace(LLFace*& face_to_return, bool& identical
identical_face = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue(&get_te_face_func, face_to_return, false, (LLFace*)nullptr);
}
-void LLPanelFace::LLSelectedTE::getImageFormat(LLGLenum& image_format_to_return, bool& identical_face, bool& missing_asset)
+void LLPanelFace::LLSelectedTE::getImageFormat(LLGLenum& image_format_to_return, bool& has_alpha, bool& identical_face, bool& missing_asset)
{
struct LLSelectedTEGetmatId : public LLSelectedTEFunctor
{
LLSelectedTEGetmatId()
: mImageFormat(GL_RGB)
+ , mHasAlpha(false)
, mIdentical(true)
, mMissingAsset(false)
, mFirstRun(true)
@@ -5278,6 +5274,10 @@ void LLPanelFace::LLSelectedTE::getImageFormat(LLGLenum& image_format_to_return,
{
format = image->getPrimaryFormat();
missing = image->isMissingAsset();
+ if (format == GL_RGBA || format == GL_ALPHA)
+ {
+ mHasAlpha = true;
+ }
}
if (mFirstRun)
@@ -5294,6 +5294,7 @@ void LLPanelFace::LLSelectedTE::getImageFormat(LLGLenum& image_format_to_return,
return true;
}
LLGLenum mImageFormat;
+ bool mHasAlpha;
bool mIdentical;
bool mMissingAsset;
bool mFirstRun;
@@ -5301,6 +5302,7 @@ void LLPanelFace::LLSelectedTE::getImageFormat(LLGLenum& image_format_to_return,
LLSelectMgr::getInstance()->getSelection()->applyToTEs(&func);
image_format_to_return = func.mImageFormat;
+ has_alpha = func.mHasAlpha;
identical_face = func.mIdentical;
missing_asset = func.mMissingAsset;
}
diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h
index 8a8460204c..63fee6bab8 100644
--- a/indra/newview/llpanelface.h
+++ b/indra/newview/llpanelface.h
@@ -697,7 +697,7 @@ public:
{
public:
static void getFace(class LLFace*& face_to_return, bool& identical_face);
- static void getImageFormat(LLGLenum& image_format_to_return, bool& identical_face, bool& missing_asset);
+ static void getImageFormat(LLGLenum& image_format_to_return, bool& has_alpha, bool& identical_face, bool& missing_asset);
static void getTexId(LLUUID& id, bool& identical);
static void getPbrMaterialId(LLUUID& id, bool& identical, bool& has_pbr, bool& has_faces_without_pbr);
static void getObjectScaleS(F32& scale_s, bool& identical);
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index ed80c8b732..fe9145bf71 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -183,7 +183,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
: LLPanel(),
mCallback(callback),
mCallbackData(cb_data),
- mListener(new LLPanelLoginListener(this)),
+ mListener(std::make_unique<LLPanelLoginListener>(this)),
mFirstLoginThisInstall(gSavedSettings.getBOOL("FirstLoginThisInstall")),
mUsernameLength(0),
mPasswordLength(0),
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 33599357a3..64e0a8c429 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -251,7 +251,7 @@ static LLPanelInjector<LLPanelPeople> t_people("panel_people");
class LLPanelPeople::Updater
{
public:
- typedef boost::function<void()> callback_t;
+ typedef std::function<void()> callback_t;
Updater(callback_t cb)
: mCallback(cb)
{
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index be10cace9c..34d2d4d6a5 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -106,11 +106,11 @@ LLUUID post_profile_image(std::string cap_url, const LLSD &first_data, std::stri
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("post_profile_image_coro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("post_profile_image_coro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLCore::HttpHeaders::ptr_t httpHeaders;
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setFollowRedirects(true);
LLSD result = httpAdapter->postAndSuspend(httpRequest, cap_url, first_data, httpOpts, httpHeaders);
@@ -138,9 +138,9 @@ LLUUID post_profile_image(std::string cap_url, const LLSD &first_data, std::stri
}
// Upload the image
- LLCore::HttpRequest::ptr_t uploaderhttpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t uploaderhttpHeaders(new LLCore::HttpHeaders);
- LLCore::HttpOptions::ptr_t uploaderhttpOpts(new LLCore::HttpOptions);
+ LLCore::HttpRequest::ptr_t uploaderhttpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpHeaders::ptr_t uploaderhttpHeaders = std::make_shared<LLCore::HttpHeaders>();
+ LLCore::HttpOptions::ptr_t uploaderhttpOpts = std::make_shared<LLCore::HttpOptions>();
S64 length;
{
@@ -1028,7 +1028,7 @@ void LLPanelProfileSecondLife::fillCommonData(const LLAvatarData* avatar_data)
if (getSelfProfile())
{
mAllowPublish = avatar_data->flags & AVATAR_ALLOW_PUBLISH;
- mShowInSearchCombo->setValue(mAllowPublish);
+ mShowInSearchCombo->setValue(mAllowPublish ? LLSD::Integer(1) : LLSD::Integer(0));
}
}
diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp
index 3aedde74c6..4fcce50df1 100644
--- a/indra/newview/llpanelwearing.cpp
+++ b/indra/newview/llpanelwearing.cpp
@@ -466,8 +466,8 @@ void LLPanelWearing::getAttachmentLimitsCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getAttachmentLimitsCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getAttachmentLimitsCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index 9ef9c26411..c6a88dbada 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -41,7 +41,7 @@
LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLFolderViewModelInterface& root_view_model) :
LLConversationItemSession(data_source->getSessionID(), root_view_model),
mSpeakerMgr(data_source),
- mValidateSpeakerCallback(NULL)
+ mValidateSpeakerCallback(nullptr)
{
mSpeakerAddListener = new SpeakerAddListener(*this);
mSpeakerRemoveListener = new SpeakerRemoveListener(*this);
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index 7cb29a6211..4b4334c6f9 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -27,8 +27,8 @@
#ifndef LL_PARTICIPANTLIST_H
#define LL_PARTICIPANTLIST_H
-#include "llviewerprecompiledheaders.h"
#include "llconversationmodel.h"
+#include "llevent.h"
class LLSpeakerMgr;
class LLUICtrl;
@@ -38,7 +38,7 @@ class LLParticipantList : public LLConversationItemSession
LOG_CLASS(LLParticipantList);
public:
- typedef boost::function<bool (const LLUUID& speaker_id)> validate_speaker_callback_t;
+ typedef std::function<bool (const LLUUID& speaker_id)> validate_speaker_callback_t;
LLParticipantList(LLSpeakerMgr* data_source, LLFolderViewModelInterface& root_view_model);
~LLParticipantList();
diff --git a/indra/newview/llpathfindingcharacterlist.cpp b/indra/newview/llpathfindingcharacterlist.cpp
index 1366ba6c6f..8e03492381 100644
--- a/indra/newview/llpathfindingcharacterlist.cpp
+++ b/indra/newview/llpathfindingcharacterlist.cpp
@@ -65,7 +65,7 @@ void LLPathfindingCharacterList::parseCharacterListData(const LLSD& pCharacterLi
continue;
const std::string& uuid(characterDataIter->first);
const LLSD& characterData = characterDataIter->second;
- LLPathfindingObjectPtr character(new LLPathfindingCharacter(uuid, characterData));
+ LLPathfindingObjectPtr character = std::make_shared<LLPathfindingCharacter>(uuid, characterData);
objectMap.insert(std::pair<std::string, LLPathfindingObjectPtr>(uuid, character));
}
}
diff --git a/indra/newview/llpathfindinglinksetlist.cpp b/indra/newview/llpathfindinglinksetlist.cpp
index 2012d7a094..81efb0a6fc 100644
--- a/indra/newview/llpathfindinglinksetlist.cpp
+++ b/indra/newview/llpathfindinglinksetlist.cpp
@@ -206,7 +206,7 @@ void LLPathfindingLinksetList::parseLinksetListData(const LLSD& pLinksetListData
const LLSD& linksetData = linksetDataIter->second;
if(linksetData.size() != 0)
{
- LLPathfindingObjectPtr linksetPtr(new LLPathfindingLinkset(uuid, linksetData));
+ LLPathfindingObjectPtr linksetPtr = std::make_shared<LLPathfindingLinkset>(uuid, linksetData);
objectMap.insert(std::pair<std::string, LLPathfindingObjectPtr>(uuid, linksetPtr));
}
}
diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp
index 84a62b3cbf..412e25a7b1 100644
--- a/indra/newview/llpathfindingmanager.cpp
+++ b/indra/newview/llpathfindingmanager.cpp
@@ -34,7 +34,6 @@
#include <map>
#include <boost/bind.hpp>
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include "llagent.h"
@@ -451,8 +450,8 @@ void LLPathfindingManager::navMeshStatusRequestCoro(std::string url, U64 regionH
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("NavMeshStatusRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("NavMeshStatusRequest", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLViewerRegion *region = LLWorld::getInstance()->getRegionFromHandle(regionHandle);
if (!region)
@@ -541,8 +540,8 @@ void LLPathfindingManager::navAgentStateRequestCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("NavAgentStateRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("NavAgentStateRequest", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
@@ -569,8 +568,8 @@ void LLPathfindingManager::navMeshRebakeCoro(std::string url, rebake_navmesh_cal
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("NavMeshRebake", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("NavMeshRebake", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD postData = LLSD::emptyMap();
@@ -598,8 +597,8 @@ void LLPathfindingManager::linksetObjectsCoro(std::string url, LinksetsResponder
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("LinksetObjects", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("LinksetObjects", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result;
@@ -634,8 +633,8 @@ void LLPathfindingManager::linksetTerrainCoro(std::string url, LinksetsResponder
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("LinksetTerrain", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("LinksetTerrain", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result;
@@ -669,8 +668,8 @@ void LLPathfindingManager::charactersCoro(std::string url, request_id_t requestI
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("LinksetTerrain", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("charactersCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
diff --git a/indra/newview/llpathfindingmanager.h b/indra/newview/llpathfindingmanager.h
index 663cb3cf34..d209266467 100644
--- a/indra/newview/llpathfindingmanager.h
+++ b/indra/newview/llpathfindingmanager.h
@@ -27,10 +27,10 @@
#ifndef LL_LLPATHFINDINGMANAGER_H
#define LL_LLPATHFINDINGMANAGER_H
+#include <functional>
#include <string>
#include <map>
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include "llpathfindinglinkset.h"
@@ -76,21 +76,21 @@ public:
void requestGetNavMeshForRegion(LLViewerRegion *pRegion, bool pIsGetStatusOnly);
typedef U32 request_id_t;
- typedef boost::function<void (request_id_t, ERequestStatus, LLPathfindingObjectListPtr)> object_request_callback_t;
+ typedef std::function<void(request_id_t, ERequestStatus, LLPathfindingObjectListPtr)> object_request_callback_t;
void requestGetLinksets(request_id_t pRequestId, object_request_callback_t pLinksetsCallback) const;
void requestSetLinksets(request_id_t pRequestId, const LLPathfindingObjectListPtr &pLinksetListPtr, LLPathfindingLinkset::ELinksetUse pLinksetUse, S32 pA, S32 pB, S32 pC, S32 pD, object_request_callback_t pLinksetsCallback) const;
void requestGetCharacters(request_id_t pRequestId, object_request_callback_t pCharactersCallback) const;
- typedef boost::function<void (bool)> agent_state_callback_t;
+ typedef std::function<void(bool)> agent_state_callback_t;
typedef boost::signals2::signal<void (bool)> agent_state_signal_t;
typedef boost::signals2::connection agent_state_slot_t;
agent_state_slot_t registerAgentStateListener(agent_state_callback_t pAgentStateCallback);
void requestGetAgentState();
- typedef boost::function<void (bool)> rebake_navmesh_callback_t;
+ typedef std::function<void(bool)> rebake_navmesh_callback_t;
void requestRebakeNavMesh(rebake_navmesh_callback_t pRebakeNavMeshCallback);
protected:
diff --git a/indra/newview/llpathfindingnavmesh.h b/indra/newview/llpathfindingnavmesh.h
index d838a1a51c..44397c9118 100644
--- a/indra/newview/llpathfindingnavmesh.h
+++ b/indra/newview/llpathfindingnavmesh.h
@@ -27,9 +27,9 @@
#ifndef LL_LLPATHFINDINGNAVMESH_H
#define LL_LLPATHFINDINGNAVMESH_H
+#include <functional>
#include <string>
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include "llpathfindingnavmeshstatus.h"
@@ -54,7 +54,7 @@ public:
kNavMeshRequestError
} ENavMeshRequestStatus;
- typedef boost::function<void (ENavMeshRequestStatus, const LLPathfindingNavMeshStatus &, const LLSD::Binary &)> navmesh_callback_t;
+ typedef std::function<void(ENavMeshRequestStatus, const LLPathfindingNavMeshStatus&, const LLSD::Binary&)> navmesh_callback_t;
typedef boost::signals2::signal<void (ENavMeshRequestStatus, const LLPathfindingNavMeshStatus &, const LLSD::Binary &)> navmesh_signal_t;
typedef boost::signals2::connection navmesh_slot_t;
diff --git a/indra/newview/llpathfindingnavmeshzone.h b/indra/newview/llpathfindingnavmeshzone.h
index e770efa0d0..8f7750d4c5 100644
--- a/indra/newview/llpathfindingnavmeshzone.h
+++ b/indra/newview/llpathfindingnavmeshzone.h
@@ -27,9 +27,9 @@
#ifndef LL_LLPATHFINDINGNAVMESHZONE_H
#define LL_LLPATHFINDINGNAVMESHZONE_H
+#include <functional>
#include <vector>
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include "llpathfindingnavmesh.h"
@@ -62,7 +62,7 @@ public:
kNavMeshZoneComplete
} ENavMeshZoneStatus;
- typedef boost::function<void (ENavMeshZoneRequestStatus)> navmesh_zone_callback_t;
+ typedef std::function<void(ENavMeshZoneRequestStatus)> navmesh_zone_callback_t;
typedef boost::signals2::signal<void (ENavMeshZoneRequestStatus)> navmesh_zone_signal_t;
typedef boost::signals2::connection navmesh_zone_slot_t;
@@ -81,7 +81,7 @@ public:
protected:
private:
- typedef boost::function<void (void)> navmesh_location_callback_t;
+ typedef std::function<void(void)> navmesh_location_callback_t;
class NavMeshLocation
{
public:
diff --git a/indra/newview/llpathfindingobject.h b/indra/newview/llpathfindingobject.h
index 79a796dd60..bf27f114f5 100644
--- a/indra/newview/llpathfindingobject.h
+++ b/indra/newview/llpathfindingobject.h
@@ -27,9 +27,9 @@
#ifndef LL_LLPATHFINDINGOBJECT_H
#define LL_LLPATHFINDINGOBJECT_H
+#include <functional>
#include <string>
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include "llavatarname.h"
@@ -61,7 +61,7 @@ public:
inline bool isGroupOwned() const {return mIsGroupOwned;};
inline const LLVector3& getLocation() const {return mLocation;};
- typedef boost::function<void (const LLPathfindingObject *)> name_callback_t;
+ typedef std::function<void(const LLPathfindingObject*)> name_callback_t;
typedef boost::signals2::signal<void (const LLPathfindingObject *)> name_signal_t;
typedef boost::signals2::connection name_connection_t;
diff --git a/indra/newview/llpathfindingpathtool.cpp b/indra/newview/llpathfindingpathtool.cpp
index 61791492e7..57f4aefadf 100644
--- a/indra/newview/llpathfindingpathtool.cpp
+++ b/indra/newview/llpathfindingpathtool.cpp
@@ -30,7 +30,6 @@
#include "llpathfindingpathtool.h"
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include "llagent.h"
diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h
index 189b9d4954..f6b4500f0f 100644
--- a/indra/newview/llpathfindingpathtool.h
+++ b/indra/newview/llpathfindingpathtool.h
@@ -27,7 +27,7 @@
#ifndef LL_LLPATHFINDINGPATHTOOL_H
#define LL_LLPATHFINDINGPATHTOOL_H
-#include <boost/function.hpp>
+#include <functional>
#include <boost/signals2.hpp>
#include "llpathinglib.h"
@@ -62,7 +62,7 @@ public:
kCharacterTypeD
} ECharacterType;
- typedef boost::function<void (void)> path_event_callback_t;
+ typedef std::function<void(void)> path_event_callback_t;
typedef boost::signals2::signal<void (void)> path_event_signal_t;
typedef boost::signals2::connection path_event_slot_t;
diff --git a/indra/newview/llpbrterrainfeatures.cpp b/indra/newview/llpbrterrainfeatures.cpp
index bb771c6963..d652e23dd5 100644
--- a/indra/newview/llpbrterrainfeatures.cpp
+++ b/indra/newview/llpbrterrainfeatures.cpp
@@ -86,9 +86,9 @@ void LLPBRTerrainFeatures::queryRegionCoro(std::string cap_url, LLUUID region_id
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("queryRegionCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("queryRegionCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
LLCore::HttpHeaders::ptr_t httpHeaders;
httpOpts->setFollowRedirects(true);
@@ -159,9 +159,9 @@ void LLPBRTerrainFeatures::modifyRegionCoro(std::string cap_url, LLSD updates, v
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("modifyRegionCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("modifyRegionCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
LLCore::HttpHeaders::ptr_t httpHeaders;
httpOpts->setFollowRedirects(true);
diff --git a/indra/newview/llpersistentnotificationstorage.cpp b/indra/newview/llpersistentnotificationstorage.cpp
index e06d025f59..1cc311e1b5 100644
--- a/indra/newview/llpersistentnotificationstorage.cpp
+++ b/indra/newview/llpersistentnotificationstorage.cpp
@@ -141,7 +141,7 @@ void LLPersistentNotificationStorage::loadNotifications()
++notification_it)
{
LLSD notification_params = *notification_it;
- LLNotificationPtr notification(new LLNotification(notification_params));
+ LLNotificationPtr notification = std::make_shared<LLNotification>(notification_params);
LLNotificationResponderPtr responder(createResponder(notification_params["name"], notification_params["responder"]));
notification->setResponseFunctor(responder);
diff --git a/indra/newview/llpopupview.cpp b/indra/newview/llpopupview.cpp
index cc55b3c8db..16149b7e33 100644
--- a/indra/newview/llpopupview.cpp
+++ b/indra/newview/llpopupview.cpp
@@ -94,8 +94,8 @@ void LLPopupView::draw()
LLPanel::draw();
}
-bool LLPopupView::handleMouseEvent(boost::function<bool(LLView*, S32, S32)> func,
- boost::function<bool(LLView*)> predicate,
+bool LLPopupView::handleMouseEvent(std::function<bool(LLView*, S32, S32)> func,
+ std::function<bool(LLView*)> predicate,
S32 x, S32 y,
bool close_popups)
{
diff --git a/indra/newview/llpopupview.h b/indra/newview/llpopupview.h
index 4a88866185..8c0db623ac 100644
--- a/indra/newview/llpopupview.h
+++ b/indra/newview/llpopupview.h
@@ -55,7 +55,7 @@ public:
popup_list_t getCurrentPopups() { return mPopups; }
private:
- bool handleMouseEvent(boost::function<bool(LLView*, S32, S32)>, boost::function<bool(LLView*)>, S32 x, S32 y, bool close_popups);
+ bool handleMouseEvent(std::function<bool(LLView*, S32, S32)>, std::function<bool(LLView*)>, S32 x, S32 y, bool close_popups);
popup_list_t mPopups;
};
#endif //LL_LLROOTVIEW_H
diff --git a/indra/newview/llpostcard.h b/indra/newview/llpostcard.h
index cfe6f3951d..11178aa027 100644
--- a/indra/newview/llpostcard.h
+++ b/indra/newview/llpostcard.h
@@ -40,7 +40,7 @@ class LLPostCard
LOG_CLASS(LLPostCard);
public:
- typedef boost::function<void(bool ok)> result_callback_t;
+ typedef std::function<void(bool ok)> result_callback_t;
static void setPostResultCallback(result_callback_t cb) { mResultCallback = cb; }
static void reportPostResult(bool ok);
diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp
index afd58af056..84455bb679 100644
--- a/indra/newview/llpresetsmanager.cpp
+++ b/indra/newview/llpresetsmanager.cpp
@@ -26,8 +26,6 @@
#include "llviewerprecompiledheaders.h"
-#include <boost/assign/list_of.hpp>
-
#include "llpresetsmanager.h"
#include "lldiriterator.h"
@@ -250,17 +248,17 @@ void LLPresetsManager::settingChanged()
void LLPresetsManager::getControlNames(std::vector<std::string>& names)
{
- const std::vector<std::string> camera_controls = boost::assign::list_of
+ const std::vector<std::string> camera_controls = {
// From panel_preferences_move.xml
- ("CameraAngle")
- ("CameraOffsetScale")
+ "CameraAngle",
+ "CameraOffsetScale",
// From llagentcamera.cpp
- ("CameraOffsetBuild")
- ("TrackFocusObject")
- ("CameraOffsetRearView")
- ("FocusOffsetRearView")
- ("AvatarSitRotation")
- ;
+ "CameraOffsetBuild",
+ "TrackFocusObject",
+ "CameraOffsetRearView",
+ "FocusOffsetRearView",
+ "AvatarSitRotation",
+ };
names = camera_controls;
}
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index 0bbe540207..a56697117a 100644
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -58,7 +58,7 @@ class LLScriptMovedObserver;
class LLLiveLSLFile : public LLLiveFile
{
public:
- typedef boost::function<bool(const std::string& filename)> change_callback_t;
+ typedef std::function<bool(const std::string& filename)> change_callback_t;
LLLiveLSLFile(std::string file_path, change_callback_t change_cb);
~LLLiveLSLFile();
diff --git a/indra/newview/llproductinforequest.cpp b/indra/newview/llproductinforequest.cpp
index 728cb22431..d962622dfd 100644
--- a/indra/newview/llproductinforequest.cpp
+++ b/indra/newview/llproductinforequest.cpp
@@ -70,8 +70,8 @@ void LLProductInfoRequestManager::getLandDescriptionsCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getLandDescriptionsCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
diff --git a/indra/newview/llremoteparcelrequest.cpp b/indra/newview/llremoteparcelrequest.cpp
index d0aa1af2f3..f89afd38ab 100644
--- a/indra/newview/llremoteparcelrequest.cpp
+++ b/indra/newview/llremoteparcelrequest.cpp
@@ -201,8 +201,8 @@ void LLRemoteParcelInfoProcessor::regionParcelInfoCoro(std::string url,
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("RemoteParcelRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("RemoteParcelRequest", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD bodyData;
diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp
index 5dbd579b45..2790705fd8 100644
--- a/indra/newview/llsetkeybinddialog.cpp
+++ b/indra/newview/llsetkeybinddialog.cpp
@@ -40,7 +40,7 @@ class LLSetKeyBindDialog::Updater : public LLEventTimer
{
public:
- typedef boost::function<void(MASK)> callback_t;
+ typedef std::function<void(MASK)> callback_t;
Updater(callback_t cb, F32 period, MASK mask)
:LLEventTimer(period),
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp
index 9b6a87e68d..e696c2dcb5 100644
--- a/indra/newview/llsnapshotlivepreview.cpp
+++ b/indra/newview/llsnapshotlivepreview.cpp
@@ -1064,11 +1064,11 @@ void LLSnapshotLivePreview::saveTexture(bool outfit_snapshot, std::string name)
LLFolderType::EType folder_type = outfit_snapshot ? LLFolderType::FT_NONE : LLFolderType::FT_SNAPSHOT_CATEGORY;
LLInventoryType::EType inv_type = outfit_snapshot ? LLInventoryType::IT_NONE : LLInventoryType::IT_SNAPSHOT;
- LLResourceUploadInfo::ptr_t assetUploadInfo(new LLResourceUploadInfo(
+ LLResourceUploadInfo::ptr_t assetUploadInfo = std::make_shared<LLResourceUploadInfo>(
tid, LLAssetType::AT_TEXTURE, res_name, res_desc, 0,
folder_type, inv_type,
PERM_ALL, LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"),
- expected_upload_cost, LLUUID::null, !outfit_snapshot));
+ expected_upload_cost, LLUUID::null, !outfit_snapshot);
upload_new_resource(assetUploadInfo);
diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h
index 3aaa3d60e8..d8a94c8835 100644
--- a/indra/newview/llspatialpartition.h
+++ b/indra/newview/llspatialpartition.h
@@ -71,16 +71,8 @@ protected:
~LLDrawInfo();
public:
- LLDrawInfo(const LLDrawInfo& rhs)
- {
- *this = rhs;
- }
-
- const LLDrawInfo& operator=(const LLDrawInfo& rhs)
- {
- LL_ERRS() << "Illegal operation!" << LL_ENDL;
- return *this;
- }
+ LLDrawInfo(const LLDrawInfo& rhs) = delete;
+ const LLDrawInfo& operator=(const LLDrawInfo& rhs) = delete;
// return a hash of this LLDrawInfo as a debug color
LLColor4U getDebugColor() const;
@@ -206,16 +198,8 @@ class LLSpatialGroup : public LLOcclusionCullingGroup
friend class LLOctreeStateCheck;
public:
- LLSpatialGroup(const LLSpatialGroup& rhs) : LLOcclusionCullingGroup(rhs)
- {
- *this = rhs;
- }
-
- const LLSpatialGroup& operator=(const LLSpatialGroup& rhs)
- {
- LL_ERRS() << "Illegal operation!" << LL_ENDL;
- return *this;
- }
+ LLSpatialGroup(const LLSpatialGroup& rhs) = delete;
+ const LLSpatialGroup& operator=(const LLSpatialGroup& rhs) = delete;
static U32 sNodeCount;
static bool sNoDelete; //deletion of spatial groups and draw info not allowed if true
diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp
index dc0d834458..f079c70c6c 100644
--- a/indra/newview/llspeakers.cpp
+++ b/indra/newview/llspeakers.cpp
@@ -867,9 +867,9 @@ void LLIMSpeakerMgr::moderationActionCoro(std::string url, LLSD action)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("moderationActionCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("moderationActionCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setWantHeaders(true);
diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h
index b30852941f..c3773d2c33 100644
--- a/indra/newview/llspeakers.h
+++ b/indra/newview/llspeakers.h
@@ -141,7 +141,7 @@ private:
class LLSpeakerActionTimer : public LLEventTimer
{
public:
- typedef boost::function<bool(const LLUUID&)> action_callback_t;
+ typedef std::function<bool(const LLUUID&)> action_callback_t;
typedef std::map<LLUUID, LLSpeakerActionTimer*> action_timers_map_t;
typedef action_timers_map_t::value_type action_value_t;
typedef action_timers_map_t::const_iterator action_timer_const_iter_t;
diff --git a/indra/newview/llsplitbutton.cpp b/indra/newview/llsplitbutton.cpp
index 6c252ed31f..140b63c84d 100644
--- a/indra/newview/llsplitbutton.cpp
+++ b/indra/newview/llsplitbutton.cpp
@@ -118,7 +118,7 @@ void LLSplitButton::onItemSelected(LLUICtrl* ctrl)
hideButtons();
// call the callback if it exists
- if(!mSelectionCallback.empty())
+ if(mSelectionCallback != nullptr)
{
mSelectionCallback(this, ctrl->getName());
}
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index cec34635f6..59d97943e3 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -458,6 +458,32 @@ bool idle_startup()
LLStringOps::sAM = LLTrans::getString("dateTimeAM");
LLStringOps::sPM = LLTrans::getString("dateTimePM");
}
+ else
+ {
+ std::wstring utf16str = ll_convert<std::wstring>(val);
+ if (utf16str.size() > 4)
+ {
+ LL_DEBUGS("InitInfo") << "Current locale \"" << locale << "\" "
+ << "has impracitcally long AM/PM time format" << LL_ENDL;
+ // fallback to declarations in strings.xml
+ LLStringOps::sAM = LLTrans::getString("dateTimeAM");
+ LLStringOps::sPM = LLTrans::getString("dateTimePM");
+ }
+ }
+ }
+
+ // Some locales (as well some of our own dateTimeAM/PM) return long
+ // strings for AM/PM which aren't practical to display in the UI.
+ // Hardcode to "AM"/"PM" in those cases.
+ std::wstring utf16str = ll_convert<std::wstring>(LLStringOps::sAM);
+ if (utf16str.size() > 4)
+ {
+ LLStringOps::sAM = "AM";
+ }
+ utf16str = ll_convert<std::wstring>(LLStringOps::sPM);
+ if (utf16str.size() > 4)
+ {
+ LLStringOps::sPM = "PM";
}
}
@@ -2560,9 +2586,9 @@ void release_notes_coro(const std::string url)
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("releaseNotesCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("releaseNotesCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setHeadersOnly(true); // only making sure it isn't 404 or something like that
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 2727127633..44bada13c2 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -305,7 +305,9 @@ void LLStatusBar::refresh()
time_t utc_time;
utc_time = time_corrected();
- std::string timeStr = getString("time");
+ static bool use_24h = gSavedSettings.getBOOL("Use24HourClock");
+ std::string timeStr = use_24h ? getString("time") : getString("time_ampm");
+
LLSD substitution;
substitution["datetime"] = (S32) utc_time;
LLStringUtil::format (timeStr, substitution);
@@ -713,7 +715,7 @@ void collectChildren( LLMenuGL *aMenu, ll::statusbar::SearchableItemPtr aParentM
{
LLMenuItemGL *pMenu = aMenu->getItem( i );
- ll::statusbar::SearchableItemPtr pItem( new ll::statusbar::SearchableItem );
+ ll::statusbar::SearchableItemPtr pItem = std::make_shared<ll::statusbar::SearchableItem>();
pItem->mCtrl = pMenu;
pItem->mMenu = pMenu;
pItem->mLabel = utf8str_to_wstring( pMenu->ll::ui::SearchableControl::getSearchText() );
@@ -729,8 +731,8 @@ void collectChildren( LLMenuGL *aMenu, ll::statusbar::SearchableItemPtr aParentM
void LLStatusBar::collectSearchableItems()
{
- mSearchData.reset( new ll::statusbar::SearchData );
- ll::statusbar::SearchableItemPtr pItem( new ll::statusbar::SearchableItem );
+ mSearchData = std::make_unique<ll::statusbar::SearchData>();
+ ll::statusbar::SearchableItemPtr pItem = std::make_shared<ll::statusbar::SearchableItem>();
mSearchData->mRootMenu = pItem;
collectChildren( gMenuBarView, pItem );
}
diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp
index 5114ee3672..f89ae00c5b 100644
--- a/indra/newview/llsyntaxid.cpp
+++ b/indra/newview/llsyntaxid.cpp
@@ -120,8 +120,8 @@ void LLSyntaxIdLSL::fetchKeywordsFileCoro(std::string url, std::string fileSpec)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("fetchKeywordsFileCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
std::pair<std::set<std::string>::iterator, bool> insrt = mInflightFetches.insert(fileSpec);
if (!insrt.second)
diff --git a/indra/newview/llsyswellitem.h b/indra/newview/llsyswellitem.h
index 0a4e26cb98..2ad5de816b 100644
--- a/indra/newview/llsyswellitem.h
+++ b/indra/newview/llsyswellitem.h
@@ -60,7 +60,7 @@ public:
virtual void onMouseLeave(S32 x, S32 y, MASK mask);
//callbacks
- typedef boost::function<void (LLSysWellItem* item)> syswell_item_callback_t;
+ typedef std::function<void (LLSysWellItem* item)> syswell_item_callback_t;
typedef boost::signals2::signal<void (LLSysWellItem* item)> syswell_item_signal_t;
syswell_item_signal_t mOnItemClose;
syswell_item_signal_t mOnItemClick;
diff --git a/indra/newview/llteleporthistory.h b/indra/newview/llteleporthistory.h
index b534b136b0..76bd65e7a9 100644
--- a/indra/newview/llteleporthistory.h
+++ b/indra/newview/llteleporthistory.h
@@ -29,9 +29,9 @@
#include "llsingleton.h" // for LLSingleton
+#include <functional>
#include <vector>
#include <string>
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include "llteleporthistorystorage.h"
@@ -80,7 +80,7 @@ class LLTeleportHistory: public LLSingleton<LLTeleportHistory>
public:
typedef std::vector<LLTeleportHistoryItem> slurl_list_t;
- typedef boost::function<void()> history_callback_t;
+ typedef std::function<void()> history_callback_t;
typedef boost::signals2::signal<void()> history_signal_t;
/**
diff --git a/indra/newview/llteleporthistorystorage.h b/indra/newview/llteleporthistorystorage.h
index 643c4a6bfc..07da596aab 100644
--- a/indra/newview/llteleporthistorystorage.h
+++ b/indra/newview/llteleporthistorystorage.h
@@ -77,7 +77,7 @@ public:
typedef std::vector<LLTeleportHistoryPersistentItem> slurl_list_t;
// removed_index is index of removed item, which replaced by more recent
- typedef boost::function<void(S32 removed_index)> history_callback_t;
+ typedef std::function<void(S32 removed_index)> history_callback_t;
typedef boost::signals2::signal<void(S32 removed_index)> history_signal_t;
/**
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index b2f2509e80..52ec8c17c1 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -166,10 +166,10 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
mBlankImageAssetID(blank_image_asset_id),
mAllowNoTexture(allow_no_texture),
mLabel(label),
- mTentativeLabel(NULL),
- mResolutionLabel(NULL),
+ mTentativeLabel(nullptr),
+ mResolutionLabel(nullptr),
mActive( true ),
- mFilterEdit(NULL),
+ mFilterEdit(nullptr),
mImmediateFilterPermMask(immediate_filter_perm_mask),
mDnDFilterPermMask(dnd_filter_perm_mask),
mContextConeOpacity(0.f),
@@ -180,10 +180,10 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
mMaxDim(S32_MAX),
mMinDim(0),
mPreviewSettingChanged(false),
- mOnFloaterCommitCallback(NULL),
- mOnFloaterCloseCallback(NULL),
- mSetImageAssetIDCallback(NULL),
- mOnUpdateImageStatsCallback(NULL),
+ mOnFloaterCommitCallback(nullptr),
+ mOnFloaterCloseCallback(nullptr),
+ mSetImageAssetIDCallback(nullptr),
+ mOnUpdateImageStatsCallback(nullptr),
mBakeTextureEnabled(false),
mLocalTextureEnabled(false),
mNoCopyTextureSelected(false),
@@ -1090,7 +1090,7 @@ void LLFloaterTexturePicker::onSelectionChange(const std::deque<LLFolderViewItem
mNoCopyTextureSelected = false;
if (itemp)
{
- if (!mTextureSelectedCallback.empty())
+ if (mTextureSelectedCallback != nullptr)
{
mTextureSelectedCallback(itemp);
}
@@ -1683,11 +1683,11 @@ static LLDefaultChildRegistry::Register<LLTextureCtrl> r("texture_picker");
LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p)
: LLUICtrl(p),
- mDragCallback(NULL),
- mDropCallback(NULL),
- mOnCancelCallback(NULL),
- mOnCloseCallback(NULL),
- mOnSelectCallback(NULL),
+ mDragCallback(nullptr),
+ mDropCallback(nullptr),
+ mOnCancelCallback(nullptr),
+ mOnCloseCallback(nullptr),
+ mOnSelectCallback(nullptr),
mBorderColor( p.border_color() ),
mAllowNoTexture( p.allow_no_texture ),
mAllowLocalTexture( true ),
diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h
index 467b8d1091..e0060474ce 100644
--- a/indra/newview/lltexturectrl.h
+++ b/indra/newview/lltexturectrl.h
@@ -50,8 +50,8 @@ class LLViewerFetchedTexture;
class LLFetchedGLTFMaterial;
// used for setting drag & drop callbacks.
-typedef boost::function<bool (LLUICtrl*, LLInventoryItem*)> drag_n_drop_callback;
-typedef boost::function<void (LLInventoryItem*)> texture_selected_callback;
+typedef std::function<bool (LLUICtrl*, LLInventoryItem*)> drag_n_drop_callback;
+typedef std::function<void (LLInventoryItem*)> texture_selected_callback;
// Helper functions for UI that work with picker
bool get_is_predefined_texture(LLUUID asset_id);
@@ -299,10 +299,10 @@ private:
//////////////////////////////////////////////////////////////////////////////////////////
// LLFloaterTexturePicker
-typedef boost::function<void(LLTextureCtrl::ETexturePickOp op, LLPickerSource source, const LLUUID& asset_id, const LLUUID& inventory_id, const LLUUID& tracking_id)> floater_commit_callback;
-typedef boost::function<void()> floater_close_callback;
-typedef boost::function<void(const LLUUID& asset_id)> set_image_asset_id_callback;
-typedef boost::function<void(LLPointer<LLViewerTexture> texture)> set_on_update_image_stats_callback;
+typedef std::function<void(LLTextureCtrl::ETexturePickOp op, LLPickerSource source, const LLUUID& asset_id, const LLUUID& inventory_id, const LLUUID& tracking_id)> floater_commit_callback;
+typedef std::function<void()> floater_close_callback;
+typedef std::function<void(const LLUUID& asset_id)> set_image_asset_id_callback;
+typedef std::function<void(LLPointer<LLViewerTexture> texture)> set_on_update_image_stats_callback;
class LLFloaterTexturePicker : public LLFloater
{
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index f7cb0ee7ed..51ade60827 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -743,10 +743,10 @@ public:
: LLTextureFetch::TFRequest(),
mRegionHandle(region_handle)
{}
- TFReqSetRegion & operator=(const TFReqSetRegion &); // Not defined
+ TFReqSetRegion(const TFReqSetRegion&) = delete;
+ TFReqSetRegion& operator=(const TFReqSetRegion&) = delete;
- virtual ~TFReqSetRegion()
- {}
+ virtual ~TFReqSetRegion() = default;
virtual bool doWork(LLTextureFetch * fetcher);
@@ -793,7 +793,9 @@ public:
const LLUUID & session_id,
const LLUUID & agent_id,
LLSD& stats_sd);
- TFReqSendMetrics & operator=(const TFReqSendMetrics &); // Not defined
+
+ TFReqSendMetrics(const TFReqSendMetrics&) = delete;
+ TFReqSendMetrics& operator=(const TFReqSendMetrics&) = delete;
virtual ~TFReqSendMetrics();
@@ -2462,13 +2464,13 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, bool threaded, bool qa_mod
LLAppCoreHttp & app_core_http(LLAppViewer::instance()->getAppCoreHttp());
mHttpRequest = new LLCore::HttpRequest;
- mHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
- mHttpOptionsWithHeaders = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+ mHttpOptions = std::make_shared<LLCore::HttpOptions>();
+ mHttpOptionsWithHeaders = std::make_shared<LLCore::HttpOptions>();
mHttpOptionsWithHeaders->setWantHeaders(true);
- mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders);
+ mHttpHeaders = std::make_shared<LLCore::HttpHeaders>();
mHttpHeaders->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_IMAGE_X_J2C);
mHttpPolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_TEXTURE);
- mHttpMetricsHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders);
+ mHttpMetricsHeaders = std::make_shared<LLCore::HttpHeaders>();
mHttpMetricsHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_LLSD_XML);
mHttpMetricsPolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_REPORTING);
mHttpHighWater = HTTP_NONPIPE_REQUESTS_HIGH_WATER;
@@ -3572,7 +3574,7 @@ TFReqSendMetrics::TFReqSendMetrics(const std::string & caps_url,
mSessionID(session_id),
mAgentID(agent_id),
mStatsSD(stats_sd),
- mHandler(new AssetReportHandler)
+ mHandler(std::make_shared<AssetReportHandler>())
{}
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 0f871dc1bb..3c939a88e5 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -117,7 +117,7 @@ LLToast::LLToast(const LLToast::Params& p)
mIsFading(false),
mIsHovered(false)
{
- mTimer.reset(new LLToastLifeTimer(this, p.lifetime_secs));
+ mTimer = std::make_unique<LLToastLifeTimer>(this, p.lifetime_secs);
buildFromFile("panel_toast.xml");
@@ -140,7 +140,7 @@ LLToast::LLToast(const LLToast::Params& p)
}
// init callbacks if present
- if(!p.on_delete_toast().empty())
+ if (p.on_delete_toast() != nullptr)
{
mOnDeleteToastSignal.connect(p.on_delete_toast());
}
diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h
index cf116bfadf..a73f7820ba 100644
--- a/indra/newview/lltoast.h
+++ b/indra/newview/lltoast.h
@@ -75,7 +75,7 @@ class LLToast : public LLModalDialog, public LLInstanceTracker<LLToast>
friend class LLToastLifeTimer;
public:
- typedef boost::function<void (LLToast* toast)> toast_callback_t;
+ typedef std::function<void (LLToast* toast)> toast_callback_t;
typedef boost::signals2::signal<void (LLToast* toast)> toast_signal_t;
typedef boost::signals2::signal<void (LLToast* toast, bool mouse_enter)> toast_hover_check_signal_t;
diff --git a/indra/newview/lltoolpipette.h b/indra/newview/lltoolpipette.h
index 0f1574f2d5..6c79674d76 100644
--- a/indra/newview/lltoolpipette.h
+++ b/indra/newview/lltoolpipette.h
@@ -34,7 +34,6 @@
#include "lltool.h"
#include "lltextureentry.h"
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
class LLViewerObject;
diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp
index 72e30bd765..dcd1582eb9 100644
--- a/indra/newview/lltranslate.cpp
+++ b/indra/newview/lltranslate.cpp
@@ -155,10 +155,10 @@ void LLTranslationAPIHandler::verifyKeyCoro(LLTranslate::EService service, LLSD
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getMerchantStatusCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
std::string user_agent = stringize(
@@ -199,7 +199,7 @@ void LLTranslationAPIHandler::verifyKeyCoro(LLTranslate::EService service, LLSD
bOk = false;
}
- if (!fnc.empty())
+ if (fnc != nullptr)
{
fnc(service, bOk, parseResult);
}
@@ -210,10 +210,10 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getMerchantStatusCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
std::string user_agent = stringize(
@@ -275,7 +275,7 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s
LLStringUtil::replaceString(translation, "&amp;", "&");
LLStringUtil::replaceString(translation, "&apos;", "'");
- if (!success.empty())
+ if (success != nullptr)
success(translation, detected_lang);
}
else
@@ -291,7 +291,7 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s
}
LL_WARNS() << "Translation request failed: " << err_msg << LL_ENDL;
- if (!failure.empty())
+ if (failure != nullptr)
failure(status, err_msg);
}
}
diff --git a/indra/newview/lltranslate.h b/indra/newview/lltranslate.h
index 0ad769b27f..14372cf406 100644
--- a/indra/newview/lltranslate.h
+++ b/indra/newview/lltranslate.h
@@ -28,10 +28,10 @@
#define LL_LLTRANSLATE_H
#include "llbufferstream.h"
-#include <boost/function.hpp>
-
#include "llsingleton.h"
+#include <functional>
+
class LLTranslationAPIHandler;
/**
* Entry point for machine translation services.
@@ -59,9 +59,9 @@ public :
SERVICE_DEEPL,
} EService;
- typedef boost::function<void(EService, bool, S32)> KeyVerificationResult_fn;
- typedef boost::function<void(std::string , std::string )> TranslationSuccess_fn;
- typedef boost::function<void(int, std::string)> TranslationFailure_fn;
+ typedef std::function<void(EService, bool, S32)> KeyVerificationResult_fn;
+ typedef std::function<void(std::string, std::string)> TranslationSuccess_fn;
+ typedef std::function<void(int, std::string)> TranslationFailure_fn;
/**
* Translate given text.
diff --git a/indra/newview/llviewerassetstats.h b/indra/newview/llviewerassetstats.h
index de395da285..297d0a70ff 100644
--- a/indra/newview/llviewerassetstats.h
+++ b/indra/newview/llviewerassetstats.h
@@ -182,7 +182,7 @@ public:
LLViewerAssetStats(const LLViewerAssetStats &);
// Default destructor is correct.
- LLViewerAssetStats & operator=(const LLViewerAssetStats &); // Not defined
+ LLViewerAssetStats& operator=(const LLViewerAssetStats&) = delete;
// Clear all metrics data. This leaves the currently-active region
// in place but with zero'd data for all metrics. All other regions
diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp
index 255cfc998a..141f370ecb 100644
--- a/indra/newview/llviewerassetstorage.cpp
+++ b/indra/newview/llviewerassetstorage.cpp
@@ -68,7 +68,7 @@ public:
{
}
- LLViewerAssetRequest & operator=(const LLViewerAssetRequest &); // Not defined
+ LLViewerAssetRequest& operator=(const LLViewerAssetRequest&) = delete;
// Default assignment operator valid
// virtual
@@ -502,9 +502,9 @@ void LLViewerAssetStorage::assetRequestCoro(
LLCore::HttpRequest::policy_t httpPolicy(LLAppCoreHttp::AP_TEXTURE);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("assetRequestCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("assetRequestCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
LLSD result = httpAdapter->getRawAndSuspend(httpRequest, url, httpOpts);
diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp
index 7d5386110d..65a69acc88 100644
--- a/indra/newview/llviewerassetupload.cpp
+++ b/indra/newview/llviewerassetupload.cpp
@@ -300,17 +300,19 @@ void LLResourceUploadInfo::assignDefaults()
{
mDescription = "(No Description)";
}
-
- if (mAssetType == LLAssetType::AT_GLTF ||
- mAssetType == LLAssetType::AT_GLTF_BIN)
+ if (mFolderId.isNull()) // don't overwrite if destination is already specified
{
- mFolderId = LLUUID::null;
- }
- else
- {
- mFolderId = gInventory.findUserDefinedCategoryUUIDForType(
- (mDestinationFolderType == LLFolderType::FT_NONE) ?
- (LLFolderType::EType)mAssetType : mDestinationFolderType);
+ if (mAssetType == LLAssetType::AT_GLTF ||
+ mAssetType == LLAssetType::AT_GLTF_BIN)
+ {
+ mFolderId = LLUUID::null;
+ }
+ else
+ {
+ mFolderId = gInventory.findUserDefinedCategoryUUIDForType(
+ (mDestinationFolderType == LLFolderType::FT_NONE) ?
+ (LLFolderType::EType)mAssetType : mDestinationFolderType);
+ }
}
}
@@ -862,8 +864,8 @@ LLUUID LLViewerAssetUpload::EnqueueInventoryUpload(const std::string &url, const
void LLViewerAssetUpload::AssetInventoryUploadCoproc(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter,
const LLUUID &id, std::string url, LLResourceUploadInfo::ptr_t uploadInfo)
{
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOptions(new LLCore::HttpOptions);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOptions = std::make_shared<LLCore::HttpOptions>();
httpOptions->setTimeout(LL_ASSET_UPLOAD_TIMEOUT_SEC);
LLSD result = uploadInfo->prepareUpload();
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 75cc76fee6..8b4b508d7c 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -871,6 +871,7 @@ void settings_setup_listeners()
setting_setup_signal_listener(gSavedSettings, "RenderShadowDetail", handleSetShaderChanged);
setting_setup_signal_listener(gSavedSettings, "RenderDeferredSSAO", handleSetShaderChanged);
setting_setup_signal_listener(gSavedSettings, "RenderPerformanceTest", handleRenderPerfTestChanged);
+ setting_setup_signal_listener(gSavedSettings, "RenderAvatarCloth", handleSetShaderChanged);
setting_setup_signal_listener(gSavedSettings, "ChatFontSize", handleChatFontSizeChanged);
setting_setup_signal_listener(gSavedSettings, "ConsoleMaxLines", handleConsoleMaxLinesChanged);
setting_setup_signal_listener(gSavedSettings, "UploadBakedTexOld", handleUploadBakedTexOldChanged);
diff --git a/indra/newview/llviewerdisplayname.cpp b/indra/newview/llviewerdisplayname.cpp
index 243d4dec0e..c174c495ec 100644
--- a/indra/newview/llviewerdisplayname.cpp
+++ b/indra/newview/llviewerdisplayname.cpp
@@ -104,9 +104,9 @@ void LLViewerDisplayName::setDisplayNameCoro(const std::string& cap_url, const L
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("SetDisplayNameCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("SetDisplayNameCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
// People API can return localized error messages. Indicate our
// language preference via header.
diff --git a/indra/newview/llviewerinput.cpp b/indra/newview/llviewerinput.cpp
index ea3088613f..3c79f0b21c 100644
--- a/indra/newview/llviewerinput.cpp
+++ b/indra/newview/llviewerinput.cpp
@@ -63,13 +63,13 @@ const LLKeyData agent_control_lbutton(CLICK_LEFT, KEY_NONE, MASK_NONE, true);
struct LLKeybindFunctionData
{
- LLKeybindFunctionData(boost::function<bool(EKeystate keystate)> function, bool global)
+ LLKeybindFunctionData(std::function<bool(EKeystate keystate)> function, bool global)
:
mFunction(function),
mIsGlobal(global)
{
}
- boost::function<bool(EKeystate keystate)> mFunction;
+ std::function<bool(EKeystate keystate)> mFunction;
// todo: might be good idea to make this into enum, like: global/inworld/menu
bool mIsGlobal;
};
@@ -1165,8 +1165,8 @@ bool LLViewerInput::handleGlobalBindsMouse(EMouseClickType clicktype, MASK mask,
bool LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, const std::string& function_name)
{
size_t index;
- typedef boost::function<bool(EKeystate)> function_t;
- function_t function = NULL;
+ typedef std::function<bool(EKeystate)> function_t;
+ function_t function = nullptr;
std::string name;
// Allow remapping of F2-F12
@@ -1255,8 +1255,8 @@ bool LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, cons
bool LLViewerInput::bindMouse(const S32 mode, const EMouseClickType mouse, const MASK mask, const std::string& function_name)
{
size_t index;
- typedef boost::function<bool(EKeystate)> function_t;
- function_t function = NULL;
+ typedef std::function<bool(EKeystate)> function_t;
+ function_t function = nullptr;
if (mouse == CLICK_LEFT
&& mask == MASK_NONE
diff --git a/indra/newview/llviewerinput.h b/indra/newview/llviewerinput.h
index 50b2c4ab9f..80ba99e201 100644
--- a/indra/newview/llviewerinput.h
+++ b/indra/newview/llviewerinput.h
@@ -38,7 +38,7 @@ class LLWindow;
class LLNamedFunction
{
public:
- LLNamedFunction() : mFunction(NULL) { };
+ LLNamedFunction() : mFunction(nullptr) { };
~LLNamedFunction() { };
std::string mName;
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index ec5381ddfc..efa3f5cd1e 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -491,7 +491,7 @@ void LLViewerInventoryItem::fetchFromServer(void) const
body["items"][0]["owner_id"] = mPermissions.getOwner();
body["items"][0]["item_id"] = mUUID;
- LLCore::HttpHandler::ptr_t handler(new LLInventoryModel::FetchItemHttpHandler(body));
+ LLCore::HttpHandler::ptr_t handler = std::make_shared<LLInventoryModel::FetchItemHttpHandler>(body);
gInventory.requestPost(true, url, body, handler, "Inventory Item");
}
}
@@ -1712,7 +1712,7 @@ void create_new_item(const std::string& name,
LLAssetType::EType asset_type,
LLInventoryType::EType inv_type,
U32 next_owner_perm,
- std::function<void(const LLUUID&)> created_cb = NULL)
+ std::function<void(const LLUUID&)> created_cb = nullptr)
{
std::string desc;
LLViewerAssetType::generateDescriptionFor(asset_type, desc);
@@ -1836,7 +1836,7 @@ void menu_create_inventory_item(LLInventoryPanel* panel, LLUUID dest_id, const L
parent_id = gInventory.getRootFolderID();
}
- std::function<void(const LLUUID&)> callback_cat_created = NULL;
+ std::function<void(const LLUUID&)> callback_cat_created = nullptr;
if (panel)
{
LLHandle<LLPanel> handle = panel->getHandle();
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 0dfbf0cced..a42bdaa2b0 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -284,9 +284,9 @@ private:
LLUUID mTargetLandmarkId;
};
-typedef boost::function<void(const LLUUID&)> inventory_func_type;
-typedef boost::function<void(const LLSD&)> llsd_func_type;
-typedef boost::function<void()> nullary_func_type;
+typedef std::function<void(const LLUUID&)> inventory_func_type;
+typedef std::function<void(const LLSD&)> llsd_func_type;
+typedef std::function<void()> nullary_func_type;
void no_op_inventory_func(const LLUUID&); // A do-nothing inventory_func
void no_op_llsd_func(const LLSD&); // likewise for LLSD
@@ -470,7 +470,7 @@ void menu_create_inventory_item(LLInventoryPanel* root,
const LLSD& userdata,
const LLUUID& default_parent_uuid = LLUUID::null);
-void menu_create_inventory_item(LLInventoryPanel* panel, LLUUID dest_id, const LLSD& userdata, const LLUUID& default_parent_uuid = LLUUID::null, std::function<void(const LLUUID&)> folder_created_cb = NULL);
+void menu_create_inventory_item(LLInventoryPanel* panel, LLUUID dest_id, const LLSD& userdata, const LLUUID& default_parent_uuid = LLUUID::null, std::function<void(const LLUUID&)> folder_created_cb = nullptr);
void slam_inventory_folder(const LLUUID& folder_id,
const LLSD& contents,
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 89861d74bc..d5f63674e9 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -1191,7 +1191,7 @@ bool LLViewerMedia::parseRawCookie(const std::string raw_cookie, std::string& na
/////////////////////////////////////////////////////////////////////////////////////////
LLCore::HttpHeaders::ptr_t LLViewerMedia::getHttpHeaders()
{
- LLCore::HttpHeaders::ptr_t headers(new LLCore::HttpHeaders);
+ LLCore::HttpHeaders::ptr_t headers = std::make_shared<LLCore::HttpHeaders>();
headers->append(HTTP_OUT_HEADER_ACCEPT, "*/*");
headers->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_XML);
@@ -1219,10 +1219,10 @@ void LLViewerMedia::getOpenIDCookieCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getOpenIDCookieCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getOpenIDCookieCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
httpOpts->setFollowRedirects(true);
httpOpts->setWantHeaders(true);
@@ -1357,10 +1357,10 @@ void LLViewerMedia::openIDSetupCoro(std::string openidUrl, std::string openidTok
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("openIDSetupCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("openIDSetupCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
httpOpts->setWantHeaders(true);
@@ -2631,10 +2631,10 @@ void LLViewerMediaImpl::mimeDiscoveryCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("mimeDiscoveryCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("mimeDiscoveryCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
// Increment our refcount so that we do not go away while the coroutine is active.
this->ref();
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 34a3745222..abaf813530 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -8999,6 +8999,17 @@ class LLViewHighlightTransparent : public view_listener_t
}
};
+class LLViewHighlightTransparentProbe : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ gSavedSettings.setBOOL("RenderReflectionProbeShowTransparent", !gSavedSettings.getBOOL("RenderReflectionProbeShowTransparent"));
+ // invisible objects skip building their render batches unless sShowDebugAlpha is true, so rebuild batches whenever toggling this flag
+ gPipeline.rebuildDrawInfo();
+ return true;
+ }
+};
+
class LLViewCheckHighlightTransparent : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -9742,6 +9753,7 @@ void initialize_menus()
view_listener_t::addMenu(new LLViewLookAtLastChatter(), "View.LookAtLastChatter");
view_listener_t::addMenu(new LLViewShowHoverTips(), "View.ShowHoverTips");
view_listener_t::addMenu(new LLViewHighlightTransparent(), "View.HighlightTransparent");
+ view_listener_t::addMenu(new LLViewHighlightTransparentProbe(), "View.HighlightTransparentProbe");
view_listener_t::addMenu(new LLViewToggleRenderType(), "View.ToggleRenderType");
view_listener_t::addMenu(new LLViewShowHUDAttachments(), "View.ShowHUDAttachments");
view_listener_t::addMenu(new LLZoomer(1.2f), "View.ZoomOut");
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 801ff3c212..772abb0373 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -530,7 +530,7 @@ void upload_single_file(
return;
}
-void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k)
+void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLUUID& dest)
{
for (std::vector<std::string>::const_iterator in_iter = filenames.begin(); in_iter != filenames.end(); ++in_iter)
{
@@ -642,7 +642,7 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k)
LLFileSystem fmt_file(new_asset_id, LLAssetType::AT_TEXTURE, LLFileSystem::WRITE);
fmt_file.write(formatted->getData(), formatted->getDataSize());
- LLResourceUploadInfo::ptr_t assetUploadInfo(new LLResourceUploadInfo(
+ LLResourceUploadInfo::ptr_t assetUploadInfo = std::make_shared<LLResourceUploadInfo>(
tid, LLAssetType::AT_TEXTURE,
asset_name,
asset_name, 0,
@@ -650,15 +650,16 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k)
LLFloaterPerms::getNextOwnerPerms("Uploads"),
LLFloaterPerms::getGroupPerms("Uploads"),
LLFloaterPerms::getEveryonePerms("Uploads"),
- LLAgentBenefitsMgr::current().getTextureUploadCost(raw_image->getWidth(), raw_image->getHeight())
- ));
+ LLAgentBenefitsMgr::current().getTextureUploadCost(raw_image->getWidth(), raw_image->getHeight()),
+ dest
+ );
upload_new_resource(assetUploadInfo);
}
}
else
{
- LLNewFileResourceUploadInfo* info_p = new LLNewFileResourceUploadInfo(
+ LLResourceUploadInfo::ptr_t uploadInfo = std::make_shared<LLNewFileResourceUploadInfo>(
filename,
asset_name,
asset_name, 0,
@@ -666,8 +667,8 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k)
LLFloaterPerms::getNextOwnerPerms("Uploads"),
LLFloaterPerms::getGroupPerms("Uploads"),
LLFloaterPerms::getEveryonePerms("Uploads"),
- expected_upload_cost);
- LLResourceUploadInfo::ptr_t uploadInfo(info_p);
+ expected_upload_cost,
+ dest);
upload_new_resource(uploadInfo);
}
@@ -687,14 +688,14 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k)
// Todo:
// 1. Decouple bulk upload from material editor
// 2. Take into account possiblity of identical textures
- LLMaterialEditor::uploadMaterialFromModel(filename, model, i);
+ LLMaterialEditor::uploadMaterialFromModel(filename, model, i, dest);
}
}
}
}
}
-void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLSD& notification, const LLSD& response)
+void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLSD& notification, const LLSD& response, const LLUUID& dest)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option != 0)
@@ -703,7 +704,7 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLS
return;
}
- do_bulk_upload(filenames, allow_2k);
+ do_bulk_upload(filenames, allow_2k, dest);
}
bool get_bulk_upload_expected_cost(
diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h
index 8f7df48a2e..e40dd84bc9 100644
--- a/indra/newview/llviewermenufile.h
+++ b/indra/newview/llviewermenufile.h
@@ -72,7 +72,7 @@ bool get_bulk_upload_expected_cost(
S32& bvh_count,
S32& textures_2k_count);
-void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k);
+void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLUUID &dest_folder);
void upload_single_file(
const std::vector<std::string>& filenames,
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index e9f6d7175e..36e8e27800 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -162,8 +162,8 @@ void accept_friendship_coro(std::string url, LLSD notification)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("friendshipResponceErrorProcessing", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("friendshipResponceErrorProcessing", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
if (url.empty())
{
LL_WARNS("Friendship") << "Empty capability!" << LL_ENDL;
@@ -212,8 +212,8 @@ void decline_friendship_coro(std::string url, LLSD notification, S32 option)
}
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("friendshipResponceErrorProcessing", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("friendshipResponceErrorProcessing", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD payload = notification["payload"];
url += "?from=" + payload["from_id"].asString();
@@ -570,8 +570,8 @@ void response_group_invitation_coro(std::string url, LLUUID group_id, bool notif
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("responseGroupInvitation", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("responseGroupInvitation", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD payload;
payload["group"] = group_id;
@@ -1558,6 +1558,7 @@ void LLOfferInfo::sendReceiveResponse(bool accept, const LLUUID &destination_fol
if (mTransactionID.isNull())
{
// Not provided, message won't work
+ LL_WARNS("Messaging") << "Missing transaction id, response for " << mIM << " won't work" << LL_ENDL;
return;
}
@@ -1600,6 +1601,8 @@ void LLOfferInfo::sendReceiveResponse(bool accept, const LLUUID &destination_fol
msg->addU8Fast(_PREHASH_Dialog, (U8)(im + 1));
msg->addBinaryDataFast(_PREHASH_BinaryBucket, &(destination_folder_id.mData),
sizeof(destination_folder_id.mData));
+
+ LL_DEBUGS("Messaging") << "Processing" << (U8)(im + 1) << " with transaction id " << mTransactionID << LL_ENDL;
}
else
{
@@ -2014,7 +2017,7 @@ bool lure_callback(const LLSD& notification, const LLSD& response)
if (notification_ptr)
{
- LLNotificationFormPtr modified_form(new LLNotificationForm(*notification_ptr->getForm()));
+ LLNotificationFormPtr modified_form = std::make_shared<LLNotificationForm>(*notification_ptr->getForm());
modified_form->setElementEnabled("Teleport", false);
modified_form->setElementEnabled("Cancel", false);
notification_ptr->updateForm(modified_form);
diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h
index 52f383faa9..00743909f0 100644
--- a/indra/newview/llviewermessage.h
+++ b/indra/newview/llviewermessage.h
@@ -36,9 +36,10 @@
#include "llnotifications.h"
#include "llextendedstatus.h"
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
+#include <functional>
+
//
// Forward declarations
//
@@ -216,7 +217,7 @@ class LLViewerMessage : public LLSingleton<LLViewerMessage>
{
LLSINGLETON_EMPTY_CTOR(LLViewerMessage);
public:
- typedef boost::function<void()> teleport_started_callback_t;
+ typedef std::function<void()> teleport_started_callback_t;
typedef boost::signals2::signal<void()> teleport_started_signal_t;
boost::signals2::connection setTeleportStartedCallback(teleport_started_callback_t cb);
@@ -264,7 +265,7 @@ private:
std::string getSanitizedDescription();
void sendReceiveResponse(bool accept, const LLUUID &destination_folder_id);
- typedef boost::function<bool (const LLSD&, const LLSD&)> respond_function_t;
+ typedef std::function<bool (const LLSD&, const LLSD&)> respond_function_t;
typedef std::map<std::string, respond_function_t> respond_function_map_t;
respond_function_map_t mRespondFunctions;
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index ed4856df11..1675c44c5c 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -2988,8 +2988,8 @@ void LLViewerObject::fetchInventoryFromCapCoro(const LLUUID task_inv)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("TaskInventoryRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("TaskInventoryRequest", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
std::string url = obj->mRegionp->getCapability("RequestTaskInventory") + "?task_id=" + obj->mID.asString();
// If we already have a copy of the inventory then add it so the server won't re-send something we already have.
// We expect this case to crop up in the case of failed inventory mutations, but it might happen otherwise as well.
@@ -7235,7 +7235,7 @@ void LLAlphaObject::getBlendFunc(S32 face, LLRender::eBlendFactor& src, LLRender
void LLStaticViewerObject::updateDrawable(bool force_damped)
{
// Force an immediate rebuild on any update
- if (mDrawable.notNull())
+ if (mDrawable.notNull() && mDrawable->getVObj())
{
mDrawable->updateXform(true);
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL);
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index fb9e5fd0a9..1b38fed3bb 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -1055,8 +1055,8 @@ void LLViewerObjectList::fetchObjectCostsCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("fetchObjectCostsCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
@@ -1179,8 +1179,8 @@ void LLViewerObjectList::fetchPhisicsFlagsCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("fetchPhisicsFlagsCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD idList;
U32 objectIndex = 0;
diff --git a/indra/newview/llviewerparcelaskplay.h b/indra/newview/llviewerparcelaskplay.h
index 720daa2e5d..563fb13011 100644
--- a/indra/newview/llviewerparcelaskplay.h
+++ b/indra/newview/llviewerparcelaskplay.h
@@ -38,7 +38,7 @@ class LLViewerParcelAskPlay : public LLSingleton<LLViewerParcelAskPlay>
void cleanupSingleton() override;
public:
// functor expects functor(region_id, parcel_id, url, play/stop)
- typedef boost::function<void(const LLUUID&, const S32&, const std::string&, const bool&)> ask_callback;
+ typedef std::function<void(const LLUUID&, const S32&, const std::string&, const bool&)> ask_callback;
void askToPlay(const LLUUID &region_id, const S32 &parcel_id, const std::string &url, ask_callback cb);
void cancelNotification();
diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h
index 8863bc7a06..0d79496ccc 100644
--- a/indra/newview/llviewerparcelmgr.h
+++ b/indra/newview/llviewerparcelmgr.h
@@ -33,9 +33,10 @@
#include "llparcelselection.h"
#include "llui.h"
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
+#include <functional>
+
class LLUUID;
class LLMessageSystem;
class LLParcel;
@@ -79,9 +80,9 @@ class LLViewerParcelMgr : public LLSingleton<LLViewerParcelMgr>
~LLViewerParcelMgr();
public:
- typedef boost::function<void (const LLVector3d&, const bool& local)> teleport_finished_callback_t;
+ typedef std::function<void (const LLVector3d&, const bool& local)> teleport_finished_callback_t;
typedef boost::signals2::signal<void (const LLVector3d&, const bool&)> teleport_finished_signal_t;
- typedef boost::function<void()> teleport_failed_callback_t;
+ typedef std::function<void()> teleport_failed_callback_t;
typedef boost::signals2::signal<void()> teleport_failed_signal_t;
static void cleanupGlobals();
diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp
index b556aef768..6dead0cf82 100644
--- a/indra/newview/llviewerpartsim.cpp
+++ b/indra/newview/llviewerpartsim.cpp
@@ -76,12 +76,12 @@ LLViewerPart::LLViewerPart() :
mPartID(0),
mLastUpdateTime(0.f),
mSkipOffset(0.f),
- mVPCallback(NULL),
- mImagep(NULL)
+ mVPCallback(nullptr),
+ mImagep(nullptr)
{
- mPartSourcep = NULL;
- mParent = NULL;
- mChild = NULL;
+ mPartSourcep = nullptr;
+ mParent = nullptr;
+ mChild = nullptr;
++LLViewerPartSim::sParticleCount2 ;
}
diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h
index 5700d8b278..f6ee00cb25 100644
--- a/indra/newview/llviewerprecompiledheaders.h
+++ b/indra/newview/llviewerprecompiledheaders.h
@@ -125,7 +125,6 @@
#include "llpanel.h"
#include "llfloater.h"
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include <boost/unordered_set.hpp>
#include <boost/unordered_map.hpp>
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 98440d96ae..edd262faa0 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -252,8 +252,8 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("BaseCapabilitiesRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("BaseCapabilitiesRequest", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result;
LLViewerRegion *regionp = NULL;
@@ -406,8 +406,8 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCompleteCoro(U64 regionHandle)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("BaseCapabilitiesRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("BaseCapabilitiesRequest", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result;
LLViewerRegion *regionp = NULL;
@@ -540,8 +540,8 @@ void LLViewerRegionImpl::requestSimulatorFeatureCoro(std::string url, U64 region
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("BaseCapabilitiesRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("requestSimulatorFeatureCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLViewerRegion *regionp = NULL;
S32 attemptNumber = 0;
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index bde0fa13ce..fac18b28f4 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -295,10 +295,10 @@ public:
typedef LLCoreHttpUtil::HttpCoroutineAdapter::completionCallback_t httpCallback_t;
bool requestPostCapability(const std::string &capName,
LLSD &postData,
- httpCallback_t cbSuccess = NULL,
- httpCallback_t cbFailure = NULL);
- bool requestGetCapability(const std::string &capName, httpCallback_t cbSuccess = NULL, httpCallback_t cbFailure = NULL);
- bool requestDelCapability(const std::string &capName, httpCallback_t cbSuccess = NULL, httpCallback_t cbFailure = NULL);
+ httpCallback_t cbSuccess = nullptr,
+ httpCallback_t cbFailure = nullptr);
+ bool requestGetCapability(const std::string& capName, httpCallback_t cbSuccess = nullptr, httpCallback_t cbFailure = nullptr);
+ bool requestDelCapability(const std::string& capName, httpCallback_t cbSuccess = nullptr, httpCallback_t cbFailure = nullptr);
/// implements LLCapabilityProvider
/*virtual*/ const LLHost& getHost() const;
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 0c912e8dbc..27865f7598 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -37,7 +37,6 @@
#include "llrender.h"
#include "llenvironment.h"
#include "llerrorcontrol.h"
-#include "llatmosphere.h"
#include "llworld.h"
#include "llsky.h"
@@ -582,6 +581,7 @@ void LLViewerShaderMgr::setShaders()
unloadShaders();
LLPipeline::sRenderGlow = gSavedSettings.getBOOL("RenderGlow");
+ LLPipeline::RenderAvatarCloth = gSavedSettings.getBOOL("RenderAvatarCloth");
if (gViewerWindow)
{
@@ -2357,7 +2357,9 @@ bool LLViewerShaderMgr::loadShadersDeferred()
gDeferredAvatarProgram.mShaderFiles.push_back(make_pair("deferred/avatarF.glsl", GL_FRAGMENT_SHADER));
gDeferredAvatarProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED];
+ gDeferredAvatarProgram.clearPermutations();
add_common_permutations(&gDeferredAvatarProgram);
+ gDeferredAvatarProgram.addPermutation("AVATAR_CLOTH", LLPipeline::RenderAvatarCloth ? "1" : "0");
success = gDeferredAvatarProgram.createShader();
llassert(success);
@@ -3562,7 +3564,7 @@ bool LLViewerShaderMgr::loadShadersInterface()
std::string LLViewerShaderMgr::getShaderDirPrefix(void)
{
- return gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "shaders/class");
+ return gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "shaders", "class");
}
void LLViewerShaderMgr::updateShaderUniforms(LLGLSLShader * shader)
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 6f79532ec3..11ca3098fd 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -1111,7 +1111,6 @@ F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time)
imagep->postCreateTexture();
imagep->mCreatePending = false;
- mCreateTextureList.pop();
if (imagep->hasGLTexture() && imagep->getDiscardLevel() < imagep->getDesiredDiscardLevel() &&
(imagep->getDesiredDiscardLevel() <= MAX_DISCARD_LEVEL))
@@ -1123,6 +1122,8 @@ F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time)
imagep->scaleDown();
}
+ mCreateTextureList.pop();
+
if (create_timer.getElapsedTimeF32() > max_time)
{
break;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 670a3b2939..692e192edb 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -86,6 +86,7 @@
#include "raytrace.h"
// newview includes
+#include "llaccordionctrl.h"
#include "llbox.h"
#include "llchicletbar.h"
#include "llconsole.h"
@@ -1883,8 +1884,8 @@ LLViewerWindow::LLViewerWindow(const Params& p)
// pass its value right now. Instead, pass it a nullary function that
// will, when we later need it, return the value of gKeyboard.
// boost::lambda::var() constructs such a functor on the fly.
- mWindowListener.reset(new LLWindowListener(this, boost::lambda::var(gKeyboard)));
- mViewerWindowListener.reset(new LLViewerWindowListener(this));
+ mWindowListener = std::make_unique<LLWindowListener>(this, boost::lambda::var(gKeyboard));
+ mViewerWindowListener = std::make_unique<LLViewerWindowListener>(this);
mSystemChannel.reset(new LLNotificationChannel("System", "Visible", LLNotificationFilters::includeEverything));
mCommunicationChannel.reset(new LLCommunicationChannel("Communication", "Visible"));
@@ -3440,6 +3441,8 @@ void LLViewerWindow::updateUI()
LLConsole::updateClass();
+ // execute postponed arrange calls
+ LLAccordionCtrl::updateClass();
// animate layout stacks so we have up to date rect for world view
LLLayoutStack::updateClass();
@@ -6139,7 +6142,7 @@ bool LLViewerWindow::getUIVisibility()
//
LLPickInfo::LLPickInfo()
: mKeyMask(MASK_NONE),
- mPickCallback(NULL),
+ mPickCallback(nullptr),
mPickType(PICK_INVALID),
mWantSurfaceInfo(false),
mObjectFace(-1),
@@ -6150,7 +6153,7 @@ LLPickInfo::LLPickInfo()
mNormal(),
mTangent(),
mBinormal(),
- mHUDIcon(NULL),
+ mHUDIcon(nullptr),
mPickTransparent(false),
mPickRigged(false),
mPickParticle(false)
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 61aa84394c..f3c7ef3289 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -48,9 +48,10 @@
#include "lltrace.h"
#include "llsnapshotmodel.h"
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
+#include <functional>
+
class LLView;
class LLViewerObject;
class LLUUID;
@@ -238,7 +239,7 @@ public:
const std::map<std::string, std::string>& args);
// signal on update of WorldView rect
- typedef boost::function<void (LLRect old_world_rect, LLRect new_world_rect)> world_rect_callback_t;
+ typedef std::function<void (LLRect old_world_rect, LLRect new_world_rect)> world_rect_callback_t;
typedef boost::signals2::signal<void (LLRect old_world_rect, LLRect new_world_rect)> world_rect_signal_t;
world_rect_signal_t mOnWorldViewRectUpdated;
boost::signals2::connection setOnWorldViewRectUpdated(world_rect_callback_t cb) { return mOnWorldViewRectUpdated.connect(cb); }
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index c6a7a59034..438f84d625 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3300,7 +3300,7 @@ void LLVOAvatar::idleUpdateLoadingEffect()
void LLVOAvatar::idleUpdateWindEffect()
{
// update wind effect
- if ((LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_AVATAR) >= LLDrawPoolAvatar::SHADER_LEVEL_CLOTH))
+ if (LLPipeline::RenderAvatarCloth)
{
F32 hover_strength = 0.f;
F32 time_delta = mRippleTimer.getElapsedTimeF32() - mRippleTimeLast;
@@ -4422,10 +4422,10 @@ void LLVOAvatar::updateOrientation(LLAgent& agent, F32 speed, F32 delta_time)
LLVector3 pelvisDir( mRoot->getWorldMatrix().getFwdRow4().mV );
- const F32 AVATAR_PELVIS_ROTATE_THRESHOLD_SLOW = 60.0f;
- const F32 AVATAR_PELVIS_ROTATE_THRESHOLD_FAST = 2.0f;
+ static LLCachedControl<F32> s_pelvis_rot_threshold_slow(gSavedSettings, "AvatarRotateThresholdSlow", 60.0);
+ static LLCachedControl<F32> s_pelvis_rot_threshold_fast(gSavedSettings, "AvatarRotateThresholdFast", 2.0);
- F32 pelvis_rot_threshold = clamp_rescale(speed, 0.1f, 1.0f, AVATAR_PELVIS_ROTATE_THRESHOLD_SLOW, AVATAR_PELVIS_ROTATE_THRESHOLD_FAST);
+ F32 pelvis_rot_threshold = clamp_rescale(speed, 0.1f, 1.0f, s_pelvis_rot_threshold_slow, s_pelvis_rot_threshold_fast);
if (self_in_mouselook)
{
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 653c7e82eb..e5c14a34a5 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -2211,9 +2211,9 @@ void LLVOAvatarSelf::appearanceChangeMetricsCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("appearanceChangeMetrics", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("appearanceChangeMetrics", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
S32 currentSequence = mMetricSequence;
if (S32_MAX == ++mMetricSequence)
@@ -2735,7 +2735,7 @@ void LLVOAvatarSelf::onCustomizeEnd(bool disable_camera_switch)
// Dereferencing the previous callback will cause
// updateAppearanceFromCOF to be called, whenever all refs
// have resolved.
- gAgentAvatarp->mEndCustomizeCallback = NULL;
+ gAgentAvatarp->mEndCustomizeCallback = nullptr;
}
}
diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp
index fdd39a0e30..86d08b8658 100644
--- a/indra/newview/llvograss.cpp
+++ b/indra/newview/llvograss.cpp
@@ -736,7 +736,7 @@ void LLGrassPartition::getGeometry(LLSpatialGroup* group)
void LLVOGrass::updateDrawable(bool force_damped)
{
// Force an immediate rebuild on any update
- if (mDrawable.notNull())
+ if (mDrawable.notNull() && mDrawable->getVObj())
{
mDrawable->updateXform(true);
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL);
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp
index fbe896ac27..b941d356a1 100644
--- a/indra/newview/llvoicechannel.cpp
+++ b/indra/newview/llvoicechannel.cpp
@@ -610,8 +610,8 @@ void LLVoiceChannelGroup::voiceCallCapCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("voiceCallCapCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("voiceCallCapCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD postData;
postData["method"] = "call";
diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h
index bf119638d3..18e1d60987 100644
--- a/indra/newview/llvoicechannel.h
+++ b/indra/newview/llvoicechannel.h
@@ -57,7 +57,7 @@ public:
typedef boost::signals2::signal<void(const EState& old_state, const EState& new_state, const EDirection& direction, bool ended_by_agent, const LLUUID& session_id)> state_changed_signal_t;
// on current channel changed signal
- typedef boost::function<void(const LLUUID& session_id)> channel_changed_callback_t;
+ typedef std::function<void(const LLUUID& session_id)> channel_changed_callback_t;
typedef boost::signals2::signal<void(const LLUUID& session_id)> channel_changed_signal_t;
static channel_changed_signal_t sCurrentVoiceChannelChangedSignal;
static boost::signals2::connection setCurrentVoiceChannelChangedCallback(channel_changed_callback_t cb, bool at_front = false);
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 8792ae3285..d132cbfa36 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -1164,9 +1164,9 @@ bool LLVivoxVoiceClient::provisionVoiceAccount()
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("voiceAccountProvision", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("voiceAccountProvision", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
int retryCount(0);
LLSD result;
@@ -1576,8 +1576,8 @@ bool LLVivoxVoiceClient::requestParcelVoiceInfo()
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("parcelVoiceInfoRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("parcelVoiceInfoRequest", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->postAndSuspend(httpRequest, url, LLSD());
@@ -4620,7 +4620,7 @@ LLVivoxVoiceClient::participantStatePtr_t LLVivoxVoiceClient::sessionState::addP
if(!result)
{
// participant isn't already in one list or the other.
- result.reset(new participantState(useAlternateURI?mSIPURI:uri));
+ result = std::make_shared<participantState>(useAlternateURI?mSIPURI:uri);
mParticipantsByURI.insert(participantMap::value_type(result->mURI, result));
mParticipantsChanged = true;
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp
index 5c13b849d7..4af71c37d0 100644
--- a/indra/newview/llvoicewebrtc.cpp
+++ b/indra/newview/llvoicewebrtc.cpp
@@ -1313,7 +1313,7 @@ LLWebRTCVoiceClient::participantStatePtr_t LLWebRTCVoiceClient::sessionState::ad
if (!result)
{
// participant isn't already in one list or the other.
- result.reset(new participantState(agent_id, region));
+ result = std::make_shared<participantState>(agent_id, region);
mParticipantsByUUID.insert(participantUUIDMap::value_type(agent_id, result));
result->mAvatarID = agent_id;
}
@@ -2177,7 +2177,7 @@ bool LLWebRTCVoiceClient::estateSessionState::processConnectionStates()
// Only connect if the region supports WebRTC voice server type
if (isRegionWebRTCEnabled(neighbor))
{
- connectionPtr_t connection(new LLVoiceWebRTCSpatialConnection(neighbor, INVALID_PARCEL_ID, mChannelID));
+ connectionPtr_t connection = std::make_shared<LLVoiceWebRTCSpatialConnection>(neighbor, INVALID_PARCEL_ID, mChannelID);
mWebRTCConnections.push_back(connection);
connection->setMuteMic(mMuted); // mute will be set for primary connection when that connection comes up
@@ -2454,11 +2454,11 @@ void LLVoiceWebRTCConnection::processIceUpdatesCoro(connectionPtr_t connection)
body["viewer_session"] = connection->mViewerSession;
body["voice_server_type"] = WEBRTC_VOICE_SERVER_TYPE;
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(
- new LLCoreHttpUtil::HttpCoroutineAdapter("LLVoiceWebRTCAdHocConnection::processIceUpdatesCoro",
- LLCore::HttpRequest::DEFAULT_POLICY_ID));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter =
+ std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("LLVoiceWebRTCAdHocConnection::processIceUpdatesCoro",
+ LLCore::HttpRequest::DEFAULT_POLICY_ID);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setWantHeaders(true);
@@ -2668,11 +2668,11 @@ void LLVoiceWebRTCConnection::breakVoiceConnectionCoro(connectionPtr_t connectio
body["viewer_session"] = connection->mViewerSession;
body["voice_server_type"] = WEBRTC_VOICE_SERVER_TYPE;
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(
- new LLCoreHttpUtil::HttpCoroutineAdapter("LLVoiceWebRTCAdHocConnection::breakVoiceConnection",
- LLCore::HttpRequest::DEFAULT_POLICY_ID));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter =
+ std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("LLVoiceWebRTCAdHocConnection::breakVoiceConnection",
+ LLCore::HttpRequest::DEFAULT_POLICY_ID);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setWantHeaders(true);
@@ -2737,11 +2737,11 @@ void LLVoiceWebRTCSpatialConnection::requestVoiceConnection()
}
body["channel_type"] = "local";
body["voice_server_type"] = WEBRTC_VOICE_SERVER_TYPE;
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(
- new LLCoreHttpUtil::HttpCoroutineAdapter("LLVoiceWebRTCAdHocConnection::requestVoiceConnection",
- LLCore::HttpRequest::DEFAULT_POLICY_ID));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter =
+ std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("LLVoiceWebRTCAdHocConnection::requestVoiceConnection",
+ LLCore::HttpRequest::DEFAULT_POLICY_ID);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setWantHeaders(true);
LLSD result = httpAdapter->postAndSuspend(httpRequest, url, body, httpOpts);
@@ -3503,11 +3503,11 @@ void LLVoiceWebRTCAdHocConnection::requestVoiceConnection()
body["channel_type"] = "multiagent";
body["voice_server_type"] = WEBRTC_VOICE_SERVER_TYPE;
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(
- new LLCoreHttpUtil::HttpCoroutineAdapter("LLVoiceWebRTCAdHocConnection::requestVoiceConnection",
- LLCore::HttpRequest::DEFAULT_POLICY_ID));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter =
+ std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("LLVoiceWebRTCAdHocConnection::requestVoiceConnection",
+ LLCore::HttpRequest::DEFAULT_POLICY_ID);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setWantHeaders(true);
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index aa230f4636..89cc05802d 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -5911,6 +5911,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
}
else
{
+ static LLCachedControl<bool> render_reflection_object(gSavedSettings, "RenderReflectionProbeShowTransparent", false);
F32 alpha;
if (is_pbr)
{
@@ -5925,7 +5926,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
drawablep->setState(LLDrawable::HAS_ALPHA);
add_face(sAlphaFaces, alpha_count, facep);
}
- else if (LLDrawPoolAlpha::sShowDebugAlpha ||
+ else if ((LLDrawPoolAlpha::sShowDebugAlpha && (render_reflection_object || !vobj->isReflectionProbe())) ||
(gPipeline.sRenderHighlight && !drawablep->getParent() &&
//only root objects are highlighted with red color in this case
drawablep->getVObj() && drawablep->getVObj()->flagScripted() &&
diff --git a/indra/newview/llwatchdog.h b/indra/newview/llwatchdog.h
index 1931c582b0..b7dd55577e 100644
--- a/indra/newview/llwatchdog.h
+++ b/indra/newview/llwatchdog.h
@@ -27,8 +27,6 @@
#ifndef LL_LLTHREADWATCHDOG_H
#define LL_LLTHREADWATCHDOG_H
-#include <boost/function.hpp>
-
#ifndef LL_TIMER_H
#include "lltimer.h"
#endif
diff --git a/indra/newview/llwebprofile.cpp b/indra/newview/llwebprofile.cpp
index 4528ad012d..132cbf4fcd 100644
--- a/indra/newview/llwebprofile.cpp
+++ b/indra/newview/llwebprofile.cpp
@@ -83,7 +83,7 @@ void LLWebProfile::setAuthCookie(const std::string& cookie)
/*static*/
LLCore::HttpHeaders::ptr_t LLWebProfile::buildDefaultHeaders()
{
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
LLSD headers = LLViewerMedia::getInstance()->getHeaders();
for (LLSD::map_iterator it = headers.beginMap(); it != headers.endMap(); ++it)
@@ -100,9 +100,9 @@ void LLWebProfile::uploadImageCoro(LLPointer<LLImageFormatted> image, std::strin
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("uploadImageCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
LLCore::HttpHeaders::ptr_t httpHeaders;
if (dynamic_cast<LLImagePNG*>(image.get()) == 0)
diff --git a/indra/newview/llwebprofile.h b/indra/newview/llwebprofile.h
index a9cfa102c0..5b3f3f2ce1 100644
--- a/indra/newview/llwebprofile.h
+++ b/indra/newview/llwebprofile.h
@@ -51,7 +51,7 @@ class LLWebProfile
LOG_CLASS(LLWebProfile);
public:
- typedef boost::function<void(bool ok)> status_callback_t;
+ typedef std::function<void(bool ok)> status_callback_t;
static void uploadImage(LLPointer<LLImageFormatted> image, const std::string& caption, bool add_location);
static void setAuthCookie(const std::string& cookie);
diff --git a/indra/newview/llwindowlistener.cpp b/indra/newview/llwindowlistener.cpp
index ebcdd537a5..edaa44aa70 100644
--- a/indra/newview/llwindowlistener.cpp
+++ b/indra/newview/llwindowlistener.cpp
@@ -41,9 +41,9 @@
#include "llrootview.h"
#include "llsdutil.h"
#include "stringize.h"
+#include <functional>
#include <typeinfo>
#include <map>
-#include <boost/bind.hpp>
LLWindowListener::LLWindowListener(LLViewerWindow *window, const KeyboardGetter& kbgetter)
: LLEventAPI("LLWindow", "Inject input events into the LLWindow instance"),
@@ -352,7 +352,7 @@ struct WhichButton: public StringLookup<Actions>
};
static WhichButton buttons;
-typedef boost::function<bool(LLCoordGL, MASK)> MouseFunc;
+typedef std::function<bool(LLCoordGL, MASK)> MouseFunc;
// Wrap a function returning 'void' to return 'true' instead. I'm sure there's
// a more generic way to accomplish this, but generically handling the
@@ -363,7 +363,7 @@ typedef boost::function<bool(LLCoordGL, MASK)> MouseFunc;
// seem to overload comma the same way; or at least not with bind().)
class MouseFuncTrue
{
- typedef boost::function<void(LLCoordGL, MASK)> MouseFuncVoid;
+ typedef std::function<void(LLCoordGL, MASK)> MouseFuncVoid;
MouseFuncVoid mFunc;
public:
@@ -463,9 +463,9 @@ static void mouseEvent(const MouseFunc& func, const LLSD& request)
// Instantiate a TemporaryDrilldownFunc to route incoming mouse events
// to the target LLView*. But put it on the heap since "path" is
- // optional. Nonetheless, manage it with a boost::scoped_ptr so it
+ // optional. Nonetheless, manage it with a std::unique_ptr so it
// will be destroyed when we leave.
- tempfunc.reset(new LLView::TemporaryDrilldownFunc(llview::TargetEvent(target)));
+ tempfunc = std::make_unique<LLView::TemporaryDrilldownFunc>(llview::TargetEvent(target));
}
// The question of whether the requested LLView actually handled the
@@ -484,11 +484,11 @@ void LLWindowListener::mouseDown(LLSD const & request)
if (actions.valid)
{
// Normally you can pass NULL to an LLWindow* without compiler
- // complaint, but going through boost::bind() evidently
+ // complaint, but going through std::bind() evidently
// bypasses that special case: it only knows you're trying to pass an
// int to a pointer. Explicitly cast NULL to the desired pointer type.
- mouseEvent(boost::bind(actions.down, mWindow,
- static_cast<LLWindow*>(NULL), _1, _2),
+ mouseEvent(std::bind(actions.down, mWindow,
+ static_cast<LLWindow*>(NULL), std::placeholders::_1, std::placeholders::_2),
request);
}
}
@@ -498,8 +498,7 @@ void LLWindowListener::mouseUp(LLSD const & request)
Actions actions(buttons.lookup(request["button"]));
if (actions.valid)
{
- mouseEvent(boost::bind(actions.up, mWindow,
- static_cast<LLWindow*>(NULL), _1, _2),
+ mouseEvent(std::bind(actions.up, mWindow, static_cast<LLWindow*>(NULL), std::placeholders::_1, std::placeholders::_2),
request);
}
}
@@ -511,8 +510,8 @@ void LLWindowListener::mouseMove(LLSD const & request)
// void, whereas mouseEvent() accepts a function returning bool -- and
// uses that bool return. Use MouseFuncTrue to construct a callable that
// returns bool anyway.
- mouseEvent(MouseFuncTrue(boost::bind(&LLWindowCallbacks::handleMouseMove, mWindow,
- static_cast<LLWindow*>(NULL), _1, _2)),
+ mouseEvent(MouseFuncTrue(std::bind(&LLWindowCallbacks::handleMouseMove, mWindow, static_cast<LLWindow*>(NULL), std::placeholders::_1,
+ std::placeholders::_2)),
request);
}
diff --git a/indra/newview/llwindowlistener.h b/indra/newview/llwindowlistener.h
index 207f64c8c0..9908a9c451 100644
--- a/indra/newview/llwindowlistener.h
+++ b/indra/newview/llwindowlistener.h
@@ -28,7 +28,7 @@
#define LL_LLWINDOWLISTENER_H
#include "lleventapi.h"
-#include <boost/function.hpp>
+#include <functional>
class LLKeyboard;
class LLViewerWindow;
@@ -36,7 +36,7 @@ class LLViewerWindow;
class LLWindowListener : public LLEventAPI
{
public:
- typedef boost::function<LLKeyboard*()> KeyboardGetter;
+ typedef std::function<LLKeyboard*()> KeyboardGetter;
LLWindowListener(LLViewerWindow * window, const KeyboardGetter& kbgetter);
void getInfo(LLSD const & evt);
diff --git a/indra/newview/llwlhandlers.cpp b/indra/newview/llwlhandlers.cpp
index 4e3a7a8788..aabcb2e514 100644
--- a/indra/newview/llwlhandlers.cpp
+++ b/indra/newview/llwlhandlers.cpp
@@ -101,8 +101,8 @@ void LLEnvironmentRequest::environmentRequestCoro(std::string url, LLEnvironment
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
S32 requestId = ++LLEnvironmentRequest::sLastRequest;
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("EnvironmentRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("EnvironmentRequest", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
@@ -193,8 +193,8 @@ void LLEnvironmentApply::environmentApplyCoro(std::string url, LLSD content, LLE
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("EnvironmentApply", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("EnvironmentApply", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->postAndSuspend(httpRequest, url, content);
diff --git a/indra/newview/llworldmap.h b/indra/newview/llworldmap.h
index aab19a4d5f..68e7f3ee29 100644
--- a/indra/newview/llworldmap.h
+++ b/indra/newview/llworldmap.h
@@ -28,7 +28,6 @@
#define LL_LLWORLDMAP_H
#include "llworldmipmap.h"
-#include <boost/function.hpp>
#include "v3dmath.h"
#include "lluuid.h"
diff --git a/indra/newview/llworldmapmessage.cpp b/indra/newview/llworldmapmessage.cpp
index c60d075e0c..e81e6b4596 100644
--- a/indra/newview/llworldmapmessage.cpp
+++ b/indra/newview/llworldmapmessage.cpp
@@ -43,7 +43,7 @@ LLWorldMapMessage::LLWorldMapMessage() :
mSLURLRegionName(),
mSLURLRegionHandle(0),
mSLURL(),
- mSLURLCallback(0),
+ mSLURLCallback(nullptr),
mSLURLTeleport(false)
{
}
@@ -215,14 +215,14 @@ void LLWorldMapMessage::processMapBlockReply(LLMessageSystem* msg, void**)
// Handle the SLURL callback if any
url_callback_t callback = LLWorldMapMessage::getInstance()->mSLURLCallback;
- if(callback != NULL)
+ if (callback != nullptr)
{
U64 handle = to_region_handle(x_world, y_world);
// Check if we reached the requested region
if ((LLStringUtil::compareInsensitive(LLWorldMapMessage::getInstance()->mSLURLRegionName, name)==0)
|| (LLWorldMapMessage::getInstance()->mSLURLRegionHandle == handle))
{
- LLWorldMapMessage::getInstance()->mSLURLCallback = NULL;
+ LLWorldMapMessage::getInstance()->mSLURLCallback = nullptr;
LLWorldMapMessage::getInstance()->mSLURLRegionName.clear();
LLWorldMapMessage::getInstance()->mSLURLRegionHandle = 0;
diff --git a/indra/newview/llworldmapmessage.h b/indra/newview/llworldmapmessage.h
index 357d31ccc1..87ae935bb9 100644
--- a/indra/newview/llworldmapmessage.h
+++ b/indra/newview/llworldmapmessage.h
@@ -27,7 +27,7 @@
#ifndef LL_LLWORLDMAPMESSAGE_H
#define LL_LLWORLDMAPMESSAGE_H
-#include "boost/function.hpp"
+#include <functional>
// Handling of messages (send and process) as well as SLURL callback if necessary
class LLMessageSystem;
@@ -38,7 +38,7 @@ class LLWorldMapMessage : public LLSingleton<LLWorldMapMessage>
~LLWorldMapMessage();
public:
- typedef boost::function<void(U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport)>
+ typedef std::function<void(U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport)>
url_callback_t;
// Process incoming answers to map stuff requests
diff --git a/indra/newview/llxmlrpclistener.cpp b/indra/newview/llxmlrpclistener.cpp
index 92e6c88752..758615a730 100644
--- a/indra/newview/llxmlrpclistener.cpp
+++ b/indra/newview/llxmlrpclistener.cpp
@@ -241,7 +241,7 @@ public:
}
LLSD http_params = command.get("http_params");
- mTransaction.reset(new LLXMLRPCTransaction(mUri, mMethod, request_params, http_params));
+ mTransaction = std::make_unique<LLXMLRPCTransaction>(mUri, mMethod, request_params, http_params);
mPreviousStatus = mTransaction->status(NULL);
// Now ensure that we get regular callbacks to poll for completion.
diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp
index 7fbcb5fc04..7b0bf6f251 100644
--- a/indra/newview/llxmlrpctransaction.cpp
+++ b/indra/newview/llxmlrpctransaction.cpp
@@ -50,13 +50,6 @@
#include "llappviewer.h"
#include "lltrans.h"
-#include "boost/move/unique_ptr.hpp"
-
-namespace boost
-{
- using ::boost::movelib::unique_ptr; // move unique_ptr into the boost namespace.
-}
-
// Static instance of LLXMLRPCListener declared here so that every time we
// bring in this code, we instantiate a listener. If we put the static
// instance of LLXMLRPCListener into llxmlrpclistener.cpp, the linker would
@@ -194,11 +187,11 @@ LLXMLRPCTransaction::Impl::Impl
if (!mHttpRequest)
{
- mHttpRequest = LLCore::HttpRequest::ptr_t(new LLCore::HttpRequest);
+ mHttpRequest = std::make_shared<LLCore::HttpRequest>();
}
// LLRefCounted starts with a 1 ref, so don't add a ref in the smart pointer
- httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions());
+ httpOpts = std::make_shared<LLCore::HttpOptions>();
// Delay between repeats will start from 5 sec and grow to 20 sec with each repeat
httpOpts->setMinBackoff((LLCore::HttpTime)5E6L);
@@ -221,7 +214,7 @@ LLXMLRPCTransaction::Impl::Impl
httpOpts->setSSLVerifyHost(vefifySSLCert ? 2 : 0);
// LLRefCounted starts with a 1 ref, so don't add a ref in the smart pointer
- httpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders());
+ httpHeaders = std::make_shared<LLCore::HttpHeaders>();
httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_TEXT_XML);
@@ -244,7 +237,7 @@ LLXMLRPCTransaction::Impl::Impl
body->append(request.c_str(), request.size());
- mHandler = LLXMLRPCTransaction::Handler::ptr_t(new Handler(mHttpRequest, this));
+ mHandler = std::make_shared<Handler>(mHttpRequest, this);
mPostH = mHttpRequest->requestPost(LLCore::HttpRequest::DEFAULT_POLICY_ID,
mURI, body.get(), httpOpts, httpHeaders, mHandler);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index fc66e9283e..d2aebfbce5 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -218,6 +218,7 @@ S32 LLPipeline::RenderBufferVisualization;
bool LLPipeline::RenderMirrors;
S32 LLPipeline::RenderHeroProbeUpdateRate;
S32 LLPipeline::RenderHeroProbeConservativeUpdateMultiplier;
+bool LLPipeline::RenderAvatarCloth;
LLTrace::EventStatHandle<S64> LLPipeline::sStatBatchSize("renderbatchsize");
const U32 LLPipeline::MAX_PREVIEW_WIDTH = 512;
@@ -601,6 +602,7 @@ void LLPipeline::init()
connectRefreshCachedSettingsSafe("RenderMirrors");
connectRefreshCachedSettingsSafe("RenderHeroProbeUpdateRate");
connectRefreshCachedSettingsSafe("RenderHeroProbeConservativeUpdateMultiplier");
+ connectRefreshCachedSettingsSafe("RenderAvatarCloth");
LLPointer<LLControlVariable> cntrl_ptr = gSavedSettings.getControl("CollectFontVertexBuffers");
if (cntrl_ptr.notNull())
@@ -1133,6 +1135,7 @@ void LLPipeline::refreshCachedSettings()
RenderMirrors = gSavedSettings.getBOOL("RenderMirrors");
RenderHeroProbeUpdateRate = gSavedSettings.getS32("RenderHeroProbeUpdateRate");
RenderHeroProbeConservativeUpdateMultiplier = gSavedSettings.getS32("RenderHeroProbeConservativeUpdateMultiplier");
+ RenderAvatarCloth = gSavedSettings.getBOOL("RenderAvatarCloth");
sReflectionProbesEnabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderReflectionsEnabled") && gSavedSettings.getBOOL("RenderReflectionsEnabled");
RenderSpotLight = nullptr;
@@ -2952,7 +2955,7 @@ void LLPipeline::markMoved(LLDrawable *drawablep, bool damped_motion)
void LLPipeline::markShift(LLDrawable *drawablep)
{
- if (!drawablep || drawablep->isDead())
+ if (!drawablep || drawablep->isDead() || !drawablep->getVObj())
{
return;
}
@@ -2986,7 +2989,7 @@ void LLPipeline::shiftObjects(const LLVector3 &offset)
iter != mShiftList.end(); iter++)
{
LLDrawable *drawablep = *iter;
- if (drawablep->isDead())
+ if (drawablep->isDead() || !drawablep->getVObj())
{
continue;
}
@@ -8347,34 +8350,6 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
bindReflectionProbes(shader);
- if (gAtmosphere)
- {
- // bind precomputed textures necessary for calculating sun and sky luminance
- channel = shader.enableTexture(LLShaderMgr::TRANSMITTANCE_TEX, LLTexUnit::TT_TEXTURE);
- if (channel > -1)
- {
- shader.bindTexture(LLShaderMgr::TRANSMITTANCE_TEX, gAtmosphere->getTransmittance());
- }
-
- channel = shader.enableTexture(LLShaderMgr::SCATTER_TEX, LLTexUnit::TT_TEXTURE_3D);
- if (channel > -1)
- {
- shader.bindTexture(LLShaderMgr::SCATTER_TEX, gAtmosphere->getScattering());
- }
-
- channel = shader.enableTexture(LLShaderMgr::SINGLE_MIE_SCATTER_TEX, LLTexUnit::TT_TEXTURE_3D);
- if (channel > -1)
- {
- shader.bindTexture(LLShaderMgr::SINGLE_MIE_SCATTER_TEX, gAtmosphere->getMieScattering());
- }
-
- channel = shader.enableTexture(LLShaderMgr::ILLUMINANCE_TEX, LLTexUnit::TT_TEXTURE);
- if (channel > -1)
- {
- shader.bindTexture(LLShaderMgr::ILLUMINANCE_TEX, gAtmosphere->getIlluminance());
- }
- }
-
/*if (gCubeSnapshot)
{ // we only really care about the first two values, but the shader needs increasing separation between clip planes
shader.uniform4f(LLShaderMgr::DEFERRED_SHADOW_CLIP, 1.f, 64.f, 128.f, 256.f);
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index dff0af46e2..c051306385 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -1087,6 +1087,7 @@ public:
static bool RenderMirrors;
static S32 RenderHeroProbeUpdateRate;
static S32 RenderHeroProbeConservativeUpdateMultiplier;
+ static bool RenderAvatarCloth;
};
void render_bbox(const LLVector3 &min, const LLVector3 &max);
diff --git a/indra/newview/skins/default/xui/da/panel_status_bar.xml b/indra/newview/skins/default/xui/da/panel_status_bar.xml
index 6e7bdfc188..a976c3f17a 100644
--- a/indra/newview/skins/default/xui/da/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/da/panel_status_bar.xml
@@ -12,7 +12,7 @@
<panel.string name="bandwidth_tooltip">
Båndbredde
</panel.string>
- <panel.string name="time">
+ <panel.string name="time_ampm">
[hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]
</panel.string>
<panel.string name="timeTooltip">
diff --git a/indra/newview/skins/default/xui/de/panel_status_bar.xml b/indra/newview/skins/default/xui/de/panel_status_bar.xml
index 0829814220..7e305fb16b 100644
--- a/indra/newview/skins/default/xui/de/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/de/panel_status_bar.xml
@@ -6,7 +6,7 @@
<panel.string name="bandwidth_tooltip">
Bandbreite
</panel.string>
- <panel.string name="time">
+ <panel.string name="time_ampm">
[hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]
</panel.string>
<panel.string name="timeTooltip">
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 08521ebe81..c93cb7822e 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -724,8 +724,7 @@
<menu_item_call
label="360 snapshot"
- name="Capture 360"
- shortcut="control|alt|shift|s">
+ name="Capture 360">
<menu_item_call.on_click
function="Floater.Show"
parameter="360capture" />
@@ -1557,6 +1556,18 @@ function="World.EnvPreset"
<menu_item_check.on_click
function="View.HighlightTransparent" />
</menu_item_check>
+ <menu_item_check
+ label="Highlight Transparent Probes"
+ name="Highlight Transparent Probes"
+ shortcut="alt|shift|T">
+ <menu_item_check.on_check
+ function="CheckControl"
+ parameter="RenderReflectionProbeShowTransparent" />
+ <menu_item_check.on_click
+ function="View.HighlightTransparentProbe" />
+ <menu_item_check.on_enable
+ function="View.CheckHighlightTransparent"/>
+ </menu_item_check>
<menu_item_separator/>
<menu_item_check
@@ -3365,8 +3376,7 @@ function="World.EnvPreset"
</menu_item_check>
<menu_item_check
label="Object-Object Occlusion"
- name="Object-Object Occlusion"
- shortcut="control|shift|O">
+ name="Object-Object Occlusion">
<menu_item_check.on_check
function="CheckControl"
parameter="UseOcclusion" />
@@ -3493,6 +3503,16 @@ function="World.EnvPreset"
parameter="RenderAttachedParticles" />
</menu_item_check>
<menu_item_check
+ label="Render Avatar Cloth"
+ name="Render Avatar Cloth">
+ <menu_item_check.on_check
+ function="CheckControl"
+ parameter="RenderAvatarCloth" />
+ <menu_item_check.on_click
+ function="ToggleControl"
+ parameter="RenderAvatarCloth" />
+ </menu_item_check>
+ <menu_item_check
label="Collect Font Vertex Buffers"
name="Collect Font Vertex Buffers">
<menu_item_check.on_check
diff --git a/indra/newview/skins/default/xui/en/panel_group_land_money.xml b/indra/newview/skins/default/xui/en/panel_group_land_money.xml
index ad9ce8f37e..ed6f98fb2b 100644
--- a/indra/newview/skins/default/xui/en/panel_group_land_money.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_land_money.xml
@@ -67,23 +67,23 @@
<scroll_list.columns
label="Parcel"
name="name"
- relative_width="0.2" />
+ relative_width="0.25" />
<scroll_list.columns
label="Region"
name="location"
- relative_width="0.2" />
+ relative_width="0.25" />
<scroll_list.columns
label="Type"
name="type"
- relative_width="0.2" />
+ relative_width="0.25" />
<scroll_list.columns
label="Area"
name="area"
- relative_width="0.2" />
+ relative_width="0.25" />
<scroll_list.columns
label="Hidden"
name="hidden"
- relative_width="0.2" />
+ width="-1" />
</scroll_list>
<text
type="string"
diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml
index cf52916484..16111758cc 100644
--- a/indra/newview/skins/default/xui/en/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml
@@ -21,10 +21,14 @@
Bandwidth
</panel.string>
<panel.string
- name="time">
+ name="time_ampm">
[hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]
</panel.string>
<panel.string
+ name="time">
+ [hour, datetime, slt]:[min, datetime, slt] [timezone,datetime, slt]
+ </panel.string>
+ <panel.string
name="timeTooltip">
[weekday, datetime, slt], [day, datetime, slt] [month, datetime, slt] [year, datetime, slt]
</panel.string>
diff --git a/indra/newview/skins/default/xui/es/panel_status_bar.xml b/indra/newview/skins/default/xui/es/panel_status_bar.xml
index bdedd04cc8..1e304e9c05 100644
--- a/indra/newview/skins/default/xui/es/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/es/panel_status_bar.xml
@@ -6,7 +6,7 @@
<panel.string name="bandwidth_tooltip">
Ancho de banda
</panel.string>
- <panel.string name="time">
+ <panel.string name="time_ampm">
[hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]
</panel.string>
<panel.string name="timeTooltip">
diff --git a/indra/newview/skins/default/xui/fr/panel_status_bar.xml b/indra/newview/skins/default/xui/fr/panel_status_bar.xml
index 84c6dda4b4..227525a608 100644
--- a/indra/newview/skins/default/xui/fr/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/fr/panel_status_bar.xml
@@ -6,7 +6,7 @@
<panel.string name="bandwidth_tooltip">
Bande passante
</panel.string>
- <panel.string name="time">
+ <panel.string name="time_ampm">
[hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]
</panel.string>
<panel.string name="timeTooltip">
diff --git a/indra/newview/skins/default/xui/it/panel_status_bar.xml b/indra/newview/skins/default/xui/it/panel_status_bar.xml
index 160fd4e180..04d61c2973 100644
--- a/indra/newview/skins/default/xui/it/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/it/panel_status_bar.xml
@@ -6,7 +6,7 @@
<panel.string name="bandwidth_tooltip">
Larghezza di banda
</panel.string>
- <panel.string name="time">
+ <panel.string name="time_ampm">
[hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]
</panel.string>
<panel.string name="timeTooltip">
diff --git a/indra/newview/skins/default/xui/ja/panel_status_bar.xml b/indra/newview/skins/default/xui/ja/panel_status_bar.xml
index 2497b15548..bbb9d7daf1 100644
--- a/indra/newview/skins/default/xui/ja/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/ja/panel_status_bar.xml
@@ -6,7 +6,7 @@
<panel.string name="bandwidth_tooltip">
帯域幅
</panel.string>
- <panel.string name="time">
+ <panel.string name="time_ampm">
[ampm, datetime, slt] [hour12, datetime, slt]:[min, datetime, slt] [timezone,datetime, slt]
</panel.string>
<panel.string name="timeTooltip">
diff --git a/indra/newview/skins/default/xui/pl/panel_status_bar.xml b/indra/newview/skins/default/xui/pl/panel_status_bar.xml
index d50ed3387c..12091225f7 100644
--- a/indra/newview/skins/default/xui/pl/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/pl/panel_status_bar.xml
@@ -6,9 +6,6 @@
<panel.string name="bandwidth_tooltip">
Przepustowość
</panel.string>
- <panel.string name="time">
- [hour, datetime, slt]:[min, datetime, slt] [timezone,datetime, slt]
- </panel.string>
<panel.string name="buycurrencylabel">
[AMT] L$
</panel.string>
diff --git a/indra/newview/skins/default/xui/pt/panel_status_bar.xml b/indra/newview/skins/default/xui/pt/panel_status_bar.xml
index 9e15f9a02c..47712ad28b 100644
--- a/indra/newview/skins/default/xui/pt/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/pt/panel_status_bar.xml
@@ -6,7 +6,7 @@
<panel.string name="bandwidth_tooltip">
Banda
</panel.string>
- <panel.string name="time">
+ <panel.string name="time_ampm">
[hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]
</panel.string>
<panel.string name="timeTooltip">
diff --git a/indra/newview/skins/default/xui/ru/panel_status_bar.xml b/indra/newview/skins/default/xui/ru/panel_status_bar.xml
index 124b8f2cff..1fd9b94406 100644
--- a/indra/newview/skins/default/xui/ru/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/ru/panel_status_bar.xml
@@ -6,9 +6,6 @@
<panel.string name="bandwidth_tooltip">
Ширина канала
</panel.string>
- <panel.string name="time">
- [hour, datetime, slt]:[min, datetime, slt] [timezone,datetime, slt]
- </panel.string>
<panel.string name="timeTooltip">
[weekday, datetime, slt], [day, datetime, slt] [month, datetime, slt] [year, datetime, slt]
</panel.string>
diff --git a/indra/newview/skins/default/xui/tr/panel_status_bar.xml b/indra/newview/skins/default/xui/tr/panel_status_bar.xml
index 616960ffb4..9ae5a251ec 100644
--- a/indra/newview/skins/default/xui/tr/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/tr/panel_status_bar.xml
@@ -6,7 +6,7 @@
<panel.string name="bandwidth_tooltip">
Bant genişliği
</panel.string>
- <panel.string name="time">
+ <panel.string name="time_ampm">
[hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]
</panel.string>
<panel.string name="timeTooltip">
diff --git a/indra/newview/skins/default/xui/zh/panel_status_bar.xml b/indra/newview/skins/default/xui/zh/panel_status_bar.xml
index 0d6fcea451..90155fea86 100644
--- a/indra/newview/skins/default/xui/zh/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/zh/panel_status_bar.xml
@@ -6,7 +6,7 @@
<panel.string name="bandwidth_tooltip">
頻寬
</panel.string>
- <panel.string name="time">
+ <panel.string name="time_ampm">
[hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]
</panel.string>
<panel.string name="timeTooltip">
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index 29ca903256..b82a58163c 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -123,7 +123,7 @@ void LLCredential::authenticatorType(std::string &idType)
LLNotificationPtr LLNotificationsUtil::add(const std::string& name,
const LLSD& substitutions,
const LLSD& payload,
- boost::function<void (const LLSD&, const LLSD&)> functor)
+ std::function<void (const LLSD&, const LLSD&)> functor)
{
return LLNotificationPtr((LLNotification*)NULL);
}
@@ -253,7 +253,7 @@ void LLProgressView::setMessage(std::string const &){}
// LLNotifications
class MockNotifications : public LLNotificationsInterface
{
- boost::function<void (const LLSD&, const LLSD&)> mResponder;
+ std::function<void (const LLSD&, const LLSD&)> mResponder;
int mAddedCount;
public:
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 0e2c9d177e..94d234686a 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -259,10 +259,9 @@ class ViewerManifest(LLManifest):
global CHANNEL_VENDOR_BASE
channel_type=self.channel_type()
if channel_type == 'release':
- app_suffix='Viewer'
+ return CHANNEL_VENDOR_BASE
else:
- app_suffix=self.channel_variant()
- return CHANNEL_VENDOR_BASE + ' ' + app_suffix
+ return CHANNEL_VENDOR_BASE + ' ' + self.channel_variant()
def exec_name(self):
return "SecondLifeViewer"
@@ -861,13 +860,12 @@ class Darwin_x86_64_Manifest(ViewerManifest):
with self.prefix(src="", dst="Contents"): # everything goes in Contents
bugsplat_db = self.args.get('bugsplat')
if bugsplat_db:
- # Inject BugsplatServerURL into Info.plist if provided.
+ # Inject Bugsplat's db into Info.plist if provided.
Info_plist = self.dst_path_of("Info.plist")
with open(Info_plist, 'rb') as f:
Info = plistlib.load(f)
# https://www.bugsplat.com/docs/platforms/os-x#configuration
- Info["BugsplatServerURL"] = \
- "https://{}.bugsplat.com/".format(bugsplat_db)
+ Info["BugSplatDatabase"] = bugsplat_db
self.put_in_file(
plistlib.dumps(Info),
os.path.basename(Info_plist),
@@ -881,6 +879,8 @@ class Darwin_x86_64_Manifest(ViewerManifest):
if self.args.get('bugsplat'):
self.path2basename(relpkgdir, "BugsplatMac.framework")
+ self.path2basename(relpkgdir, "CrashReporter.framework")
+ self.path2basename(relpkgdir, "HockeySDK.framework")
# OpenAL dylibs
if self.args['openal'] == 'ON':
@@ -920,6 +920,24 @@ class Darwin_x86_64_Manifest(ViewerManifest):
# work, we need the build to noisily fail!
oldpath = subprocess.check_output(
['objdump', '--macho', '--dylib-id', '--non-verbose',
+ os.path.join(relpkgdir, "HockeySDK.framework", "HockeySDK")],
+ text=True
+ ).splitlines()[-1] # take the last line of output
+ self.run_command(
+ ['install_name_tool', '-change', oldpath,
+ '@executable_path/../Frameworks/HockeySDK.framework/HockeySDK',
+ executable])
+ oldpath = subprocess.check_output(
+ ['objdump', '--macho', '--dylib-id', '--non-verbose',
+ os.path.join(relpkgdir, "CrashReporter.framework", "CrashReporter")],
+ text=True
+ ).splitlines()[-1] # take the last line of output
+ self.run_command(
+ ['install_name_tool', '-change', oldpath,
+ '@executable_path/../Frameworks/CrashReporter.framework/CrashReporter',
+ executable])
+ oldpath = subprocess.check_output(
+ ['objdump', '--macho', '--dylib-id', '--non-verbose',
os.path.join(relpkgdir, "BugsplatMac.framework", "BugsplatMac")],
text=True
).splitlines()[-1] # take the last line of output