summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/CMakeLists.txt3
-rwxr-xr-xindra/newview/app_settings/logcontrol.xml1
-rwxr-xr-xindra/newview/llaccountingcost.h55
-rwxr-xr-xindra/newview/llagent.cpp45
-rwxr-xr-xindra/newview/llagent.h6
-rwxr-xr-xindra/newview/llagentlistener.cpp2
-rwxr-xr-xindra/newview/llagentpicksinfo.cpp4
-rwxr-xr-xindra/newview/llagentpilot.cpp27
-rwxr-xr-xindra/newview/llagentpilot.h3
-rwxr-xr-xindra/newview/llagentwearables.cpp14
-rwxr-xr-xindra/newview/llagentwearables.h2
-rwxr-xr-xindra/newview/llagentwearablesfetch.cpp14
-rwxr-xr-xindra/newview/llappearancemgr.cpp119
-rwxr-xr-xindra/newview/llappviewer.cpp73
-rwxr-xr-xindra/newview/llappviewer.h8
-rwxr-xr-xindra/newview/llappviewerwin32.cpp15
-rwxr-xr-xindra/newview/llavataractions.cpp18
-rwxr-xr-xindra/newview/llavataractions.h1
-rwxr-xr-xindra/newview/llavatariconctrl.cpp1
-rwxr-xr-xindra/newview/llavatarlist.cpp2
-rwxr-xr-xindra/newview/llavatarpropertiesprocessor.cpp1
-rwxr-xr-xindra/newview/llavatarpropertiesprocessor.h8
-rwxr-xr-xindra/newview/llblocklist.cpp2
-rwxr-xr-xindra/newview/llchatbar.cpp1
-rwxr-xr-xindra/newview/llcofwearables.cpp2
-rwxr-xr-xindra/newview/llcolorswatch.cpp15
-rwxr-xr-xindra/newview/llcolorswatch.h29
-rwxr-xr-xindra/newview/llcompilequeue.cpp212
-rwxr-xr-xindra/newview/llcompilequeue.h22
-rwxr-xr-xindra/newview/llconversationlog.cpp66
-rwxr-xr-xindra/newview/llconversationlog.h7
-rwxr-xr-xindra/newview/llconversationloglist.cpp6
-rwxr-xr-xindra/newview/lldebugmessagebox.h1
-rwxr-xr-xindra/newview/lldebugview.cpp1
-rwxr-xr-xindra/newview/lldrawable.cpp8
-rwxr-xr-xindra/newview/lldrawable.h3
-rwxr-xr-xindra/newview/lldrawpoolsky.cpp2
-rwxr-xr-xindra/newview/llfavoritesbar.cpp24
-rwxr-xr-xindra/newview/llfeaturemanager.cpp1
-rwxr-xr-xindra/newview/llfirstuse.cpp5
-rwxr-xr-xindra/newview/llfloaterabout.cpp1
-rwxr-xr-xindra/newview/llfloaterbulkpermission.cpp19
-rwxr-xr-xindra/newview/llfloaterbulkpermission.h6
-rwxr-xr-xindra/newview/llfloatercolorpicker.cpp7
-rwxr-xr-xindra/newview/llfloatercolorpicker.h5
-rwxr-xr-xindra/newview/llfloaterevent.cpp1
-rwxr-xr-xindra/newview/llfloatergesture.cpp8
-rwxr-xr-xindra/newview/llfloatergroups.cpp10
-rwxr-xr-xindra/newview/llfloaterlandholdings.cpp8
-rwxr-xr-xindra/newview/llfloateroutbox.cpp4
-rwxr-xr-xindra/newview/llfloaterpreference.cpp5
-rwxr-xr-xindra/newview/llfloatertopobjects.h16
-rwxr-xr-xindra/newview/llfloaterworldmap.cpp33
-rwxr-xr-xindra/newview/llfloaterworldmap.h5
-rwxr-xr-xindra/newview/llfriendcard.cpp30
-rwxr-xr-xindra/newview/llgiveinventory.cpp22
-rwxr-xr-xindra/newview/llgroupactions.cpp6
-rwxr-xr-xindra/newview/llgroupiconctrl.cpp28
-rwxr-xr-xindra/newview/llgrouplist.cpp6
-rwxr-xr-xindra/newview/llgroupmgr.h11
-rwxr-xr-xindra/newview/llhudicon.h1
-rwxr-xr-xindra/newview/llhudmanager.cpp18
-rwxr-xr-xindra/newview/llhudmanager.h3
-rwxr-xr-xindra/newview/llimview.cpp26
-rwxr-xr-xindra/newview/llimview.h7
-rwxr-xr-xindra/newview/llinventorybridge.cpp78
-rwxr-xr-xindra/newview/llinventoryitemslist.h4
-rwxr-xr-xindra/newview/llinventorymodel.cpp124
-rwxr-xr-xindra/newview/llinventorymodel.h5
-rwxr-xr-xindra/newview/llinventoryobserver.cpp6
-rwxr-xr-xindra/newview/llinventorypanel.cpp10
-rwxr-xr-xindra/newview/llinventorypanel.h1
-rwxr-xr-xindra/newview/lllogchat.cpp4
-rwxr-xr-xindra/newview/llmanip.cpp4
-rwxr-xr-xindra/newview/llmaniprotate.cpp4
-rwxr-xr-xindra/newview/llmanipscale.cpp4
-rwxr-xr-xindra/newview/llmaniptranslate.cpp12
-rwxr-xr-xindra/newview/llnamelistctrl.cpp2
-rwxr-xr-xindra/newview/llpanelavatar.cpp1
-rwxr-xr-xindra/newview/llpanelcontents.h1
-rwxr-xr-xindra/newview/llpaneleditwearable.cpp2
-rwxr-xr-xindra/newview/llpanelface.cpp14
-rwxr-xr-xindra/newview/llpanelgrouplandmoney.cpp32
-rwxr-xr-xindra/newview/llpanelgrouplandmoney.h5
-rwxr-xr-xindra/newview/llpanellandmarkinfo.cpp6
-rwxr-xr-xindra/newview/llpanellogin.cpp7
-rwxr-xr-xindra/newview/llpanelme.cpp1
-rwxr-xr-xindra/newview/llpanelobjectinventory.cpp6
-rwxr-xr-xindra/newview/llpanelpicks.cpp1
-rwxr-xr-xindra/newview/llpanelteleporthistory.cpp22
-rwxr-xr-xindra/newview/llpanelteleporthistory.h2
-rwxr-xr-xindra/newview/llphysicsshapebuilderutil.h2
-rwxr-xr-xindra/newview/llpreview.cpp1
-rwxr-xr-xindra/newview/llpreviewgesture.cpp8
-rwxr-xr-xindra/newview/llpreviewscript.cpp6
-rwxr-xr-xindra/newview/llpreviewscript.h3
-rwxr-xr-xindra/newview/llscriptfloater.cpp2
-rwxr-xr-xindra/newview/llselectmgr.cpp3
-rwxr-xr-xindra/newview/llselectmgr.h27
-rwxr-xr-xindra/newview/llspeakers.cpp2
-rwxr-xr-xindra/newview/llstartup.cpp7
-rwxr-xr-xindra/newview/llstartup.h12
-rwxr-xr-xindra/newview/llstatusbar.cpp1
-rwxr-xr-xindra/newview/llsurface.cpp2
-rwxr-xr-xindra/newview/llsurfacepatch.cpp7
-rwxr-xr-xindra/newview/lltexturectrl.cpp8
-rwxr-xr-xindra/newview/lltoastgroupnotifypanel.h1
-rwxr-xr-xindra/newview/lltool.cpp2
-rwxr-xr-xindra/newview/lltoolbrush.cpp2
-rwxr-xr-xindra/newview/lltooldraganddrop.cpp46
-rwxr-xr-xindra/newview/lltooldraganddrop.h2
-rwxr-xr-xindra/newview/lltoolfocus.cpp8
-rwxr-xr-xindra/newview/lltoolgrab.cpp12
-rwxr-xr-xindra/newview/lltoolgun.cpp4
-rwxr-xr-xindra/newview/lltoolpie.cpp10
-rwxr-xr-xindra/newview/lltoolplacer.cpp2
-rwxr-xr-xindra/newview/lltoolselectland.cpp8
-rwxr-xr-xindra/newview/lltoolselectrect.cpp5
-rwxr-xr-xindra/newview/lltracker.cpp1
-rwxr-xr-xindra/newview/lltracker.h5
-rwxr-xr-xindra/newview/llviewerassettype.h1
-rwxr-xr-xindra/newview/llviewerdisplay.cpp5
-rwxr-xr-xindra/newview/llviewergesture.h1
-rwxr-xr-xindra/newview/llviewerinventory.h4
-rwxr-xr-xindra/newview/llviewerjointattachment.cpp2
-rwxr-xr-xindra/newview/llviewerjointmesh.cpp9
-rwxr-xr-xindra/newview/llviewerkeyboard.cpp8
-rwxr-xr-xindra/newview/llviewermenu.cpp26
-rwxr-xr-xindra/newview/llviewermessage.cpp19
-rwxr-xr-xindra/newview/llviewermessage.h1
-rwxr-xr-xindra/newview/llviewerobject.cpp11
-rwxr-xr-xindra/newview/llviewerobjectlist.cpp13
-rwxr-xr-xindra/newview/llviewerparcelmgr.cpp13
-rwxr-xr-xindra/newview/llviewerparcelmgr.h3
-rwxr-xr-xindra/newview/llviewerparceloverlay.cpp89
-rwxr-xr-xindra/newview/llviewerparceloverlay.h7
-rwxr-xr-xindra/newview/llviewerprecompiledheaders.h4
-rwxr-xr-xindra/newview/llviewerregion.cpp40
-rwxr-xr-xindra/newview/llviewerregion.h5
-rwxr-xr-xindra/newview/llviewerstats.cpp20
-rwxr-xr-xindra/newview/llviewerstats.h51
-rwxr-xr-xindra/newview/llviewertexteditor.cpp2
-rwxr-xr-xindra/newview/llviewertexture.cpp1
-rwxr-xr-xindra/newview/llviewertexturelist.cpp81
-rw-r--r--indra/newview/llviewerwearable.h1
-rwxr-xr-xindra/newview/llviewerwindow.cpp3
-rwxr-xr-xindra/newview/llvlcomposition.cpp1
-rwxr-xr-xindra/newview/llvlmanager.cpp22
-rwxr-xr-xindra/newview/llvlmanager.h3
-rwxr-xr-xindra/newview/llvoavatar.cpp39
-rwxr-xr-xindra/newview/llvoavatar.h5
-rwxr-xr-xindra/newview/llvoavatarself.cpp20
-rwxr-xr-xindra/newview/llvoavatarself.h4
-rwxr-xr-xindra/newview/llvograss.cpp1
-rwxr-xr-xindra/newview/llvograss.h1
-rwxr-xr-xindra/newview/llvoicevivox.cpp4
-rwxr-xr-xindra/newview/llvopartgroup.cpp2
-rwxr-xr-xindra/newview/llvosky.cpp2
-rwxr-xr-xindra/newview/llvotree.h1
-rwxr-xr-xindra/newview/llvotreenew.h218
-rwxr-xr-xindra/newview/llvovolume.cpp1
-rwxr-xr-xindra/newview/llvowater.cpp1
-rwxr-xr-xindra/newview/llwaterparammanager.cpp4
-rwxr-xr-xindra/newview/llwearableitemslist.h2
-rwxr-xr-xindra/newview/llwind.h2
-rwxr-xr-xindra/newview/llwlparammanager.cpp4
-rwxr-xr-xindra/newview/llworld.cpp10
-rwxr-xr-xindra/newview/llworld.h6
-rwxr-xr-xindra/newview/llworldmap.h12
-rwxr-xr-xindra/newview/llworldmapview.cpp2
-rwxr-xr-xindra/newview/pipeline.cpp2
-rwxr-xr-xindra/newview/roles_constants.h192
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_stats.xml3
-rwxr-xr-xindra/newview/skins/default/xui/en/strings.xml1
174 files changed, 1309 insertions, 1348 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 3689c2856d..1b779e5c99 100755
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -682,6 +682,7 @@ set(viewer_HEADER_FILES
CMakeLists.txt
ViewerInstall.cmake
groupchatlistener.h
+ llaccountingcost.h
llaccountingcostmanager.h
llagent.h
llagentaccess.h
@@ -1221,7 +1222,6 @@ set(viewer_HEADER_FILES
llvosky.h
llvosurfacepatch.h
llvotree.h
- llvotreenew.h
llvovolume.h
llvowater.h
llvowlsky.h
@@ -1250,6 +1250,7 @@ set(viewer_HEADER_FILES
macmain.h
noise.h
pipeline.h
+ roles_constants.h
VertexCache.h
VorbisFramework.h
)
diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml
index 92a241857e..b500c37098 100755
--- a/indra/newview/app_settings/logcontrol.xml
+++ b/indra/newview/app_settings/logcontrol.xml
@@ -42,6 +42,7 @@
</array>
<key>tags</key>
<array>
+ <string>SceneLoadTiming</string>
<!-- sample entry for debugging specific items
<string>Avatar</string>
<string>Voice</string>
diff --git a/indra/newview/llaccountingcost.h b/indra/newview/llaccountingcost.h
new file mode 100755
index 0000000000..bc770fe1d2
--- /dev/null
+++ b/indra/newview/llaccountingcost.h
@@ -0,0 +1,55 @@
+/**
+ * @file llaccountingcost.h
+ * @
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_ACCOUNTINGQUOTA_H
+#define LL_ACCOUNTINGQUOTA_H
+
+//SelectionQuota atm does not require a id
+struct SelectionCost
+{
+ SelectionCost( /*LLTransactionID transactionId, */ F32 physicsCost, F32 networkCost, F32 simulationCost )
+ //: mTransactionId( transactionId)
+ : mPhysicsCost( physicsCost )
+ , mNetworkCost( networkCost )
+ , mSimulationCost( simulationCost )
+ {
+ }
+ SelectionCost()
+ : mPhysicsCost( 0.0f )
+ , mNetworkCost( 0.0f )
+ , mSimulationCost( 0.0f )
+ {}
+
+ F32 mPhysicsCost, mNetworkCost, mSimulationCost;
+ //LLTransactionID mTransactionId;
+};
+
+typedef enum { Roots = 0 , Prims } eSelectionType;
+
+#endif
+
+
+
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 8ec74bb268..460ae62522 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -2991,7 +2991,7 @@ LLQuaternion LLAgent::getHeadRotation()
return rot;
}
-void LLAgent::sendAnimationRequests(LLDynamicArray<LLUUID> &anim_ids, EAnimRequest request)
+void LLAgent::sendAnimationRequests(const std::vector<LLUUID> &anim_ids, EAnimRequest request)
{
if (gAgentID.isNull())
{
@@ -3006,7 +3006,7 @@ void LLAgent::sendAnimationRequests(LLDynamicArray<LLUUID> &anim_ids, EAnimReque
msg->addUUIDFast(_PREHASH_AgentID, getID());
msg->addUUIDFast(_PREHASH_SessionID, getSessionID());
- for (S32 i = 0; i < anim_ids.count(); i++)
+ for (S32 i = 0; i < anim_ids.size(); i++)
{
if (anim_ids[i].isNull())
{
@@ -3204,10 +3204,10 @@ void LLAgent::processAgentDropGroup(LLMessageSystem *msg, void **)
// Remove the group if it already exists remove it and add the new data to pick up changes.
LLGroupData gd;
gd.mID = group_id;
- S32 index = gAgent.mGroups.find(gd);
- if (index != -1)
+ std::vector<LLGroupData>::iterator found_it = std::find(gAgent.mGroups.begin(), gAgent.mGroups.end(), gd);
+ if (found_it != gAgent.mGroups.end())
{
- gAgent.mGroups.remove(index);
+ gAgent.mGroups.erase(found_it);
if (gAgent.getGroupID() == group_id)
{
gAgent.mGroupID.setNull();
@@ -3281,10 +3281,10 @@ class LLAgentDropGroupViewerNode : public LLHTTPNode
// and add the new data to pick up changes.
LLGroupData gd;
gd.mID = group_id;
- S32 index = gAgent.mGroups.find(gd);
- if (index != -1)
+ std::vector<LLGroupData>::iterator found_it = std::find(gAgent.mGroups.begin(), gAgent.mGroups.end(), gd);
+ if (found_it != gAgent.mGroups.end())
{
- gAgent.mGroups.remove(index);
+ gAgent.mGroups.erase(found_it);
if (gAgent.getGroupID() == group_id)
{
gAgent.mGroupID.setNull();
@@ -3337,7 +3337,6 @@ void LLAgent::processAgentGroupDataUpdate(LLMessageSystem *msg, void **)
S32 count = msg->getNumberOfBlocksFast(_PREHASH_GroupData);
LLGroupData group;
- S32 index = -1;
bool need_floater_update = false;
for(S32 i = 0; i < count; ++i)
{
@@ -3352,12 +3351,12 @@ void LLAgent::processAgentGroupDataUpdate(LLMessageSystem *msg, void **)
{
need_floater_update = true;
// Remove the group if it already exists remove it and add the new data to pick up changes.
- index = gAgent.mGroups.find(group);
- if (index != -1)
+ std::vector<LLGroupData>::iterator found_it = std::find(gAgent.mGroups.begin(), gAgent.mGroups.end(), group);
+ if (found_it != gAgent.mGroups.end())
{
- gAgent.mGroups.remove(index);
+ gAgent.mGroups.erase(found_it);
}
- gAgent.mGroups.put(group);
+ gAgent.mGroups.push_back(group);
}
if (need_floater_update)
{
@@ -3396,7 +3395,6 @@ class LLAgentGroupDataUpdateViewerNode : public LLHTTPNode
{
LLGroupData group;
- S32 index = -1;
bool need_floater_update = false;
group.mID = (*iter_group)["GroupID"].asUUID();
@@ -3413,12 +3411,12 @@ class LLAgentGroupDataUpdateViewerNode : public LLHTTPNode
{
need_floater_update = true;
// Remove the group if it already exists remove it and add the new data to pick up changes.
- index = gAgent.mGroups.find(group);
- if (index != -1)
+ std::vector<LLGroupData>::iterator found_it = std::find(gAgent.mGroups.begin(), gAgent.mGroups.end(), group);
+ if (found_it != gAgent.mGroups.end())
{
- gAgent.mGroups.remove(index);
+ gAgent.mGroups.erase(found_it);
}
- gAgent.mGroups.put(group);
+ gAgent.mGroups.push_back(group);
}
if (need_floater_update)
{
@@ -4203,11 +4201,12 @@ void LLAgent::fidget()
void LLAgent::stopFidget()
{
- LLDynamicArray<LLUUID> anims;
- anims.put(ANIM_AGENT_STAND_1);
- anims.put(ANIM_AGENT_STAND_2);
- anims.put(ANIM_AGENT_STAND_3);
- anims.put(ANIM_AGENT_STAND_4);
+ std::vector<LLUUID> anims;
+ anims.reserve(4);
+ anims.push_back(ANIM_AGENT_STAND_1);
+ anims.push_back(ANIM_AGENT_STAND_2);
+ anims.push_back(ANIM_AGENT_STAND_3);
+ anims.push_back(ANIM_AGENT_STAND_4);
gAgent.sendAnimationRequests(anims, ANIM_REQUEST_STOP);
}
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 4153fbbfff..093a65682a 100755
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -29,13 +29,11 @@
#include "indra_constants.h"
#include "llevent.h" // LLObservable base class
-#include "llagentconstants.h"
#include "llagentdata.h" // gAgentID, gAgentSessionID
#include "llcharacter.h"
#include "llcoordframe.h" // for mFrameAgent
#include "llavatarappearancedefines.h"
#include "llpermissionsflags.h"
-#include "lldarray.h"
#include <boost/function.hpp>
#include <boost/shared_ptr.hpp>
@@ -431,7 +429,7 @@ public:
void stopCurrentAnimations();
void requestStopMotion(LLMotion* motion);
void onAnimStop(const LLUUID& id);
- void sendAnimationRequests(LLDynamicArray<LLUUID> &anim_ids, EAnimRequest request);
+ void sendAnimationRequests(const std::vector<LLUUID> &anim_ids, EAnimRequest request);
void sendAnimationRequest(const LLUUID &anim_id, EAnimRequest request);
void endAnimationUpdateUI();
void unpauseAnimation() { mPauseRequest = NULL; }
@@ -800,7 +798,7 @@ protected:
// Only used for building titles.
BOOL isGroupMember() const { return !mGroupID.isNull(); }
public:
- LLDynamicArray<LLGroupData> mGroups;
+ std::vector<LLGroupData> mGroups;
//--------------------------------------------------------------------
// Group Title
diff --git a/indra/newview/llagentlistener.cpp b/indra/newview/llagentlistener.cpp
index a4c0b056ac..87c44a391d 100755
--- a/indra/newview/llagentlistener.cpp
+++ b/indra/newview/llagentlistener.cpp
@@ -504,7 +504,7 @@ void LLAgentListener::lookAt(LLSD const & event_data) const
void LLAgentListener::getGroups(const LLSD& event) const
{
LLSD reply(LLSD::emptyArray());
- for (LLDynamicArray<LLGroupData>::const_iterator
+ for (std::vector<LLGroupData>::const_iterator
gi(mAgent.mGroups.begin()), gend(mAgent.mGroups.end());
gi != gend; ++gi)
{
diff --git a/indra/newview/llagentpicksinfo.cpp b/indra/newview/llagentpicksinfo.cpp
index 192ed141c7..7a04cfb48b 100755
--- a/indra/newview/llagentpicksinfo.cpp
+++ b/indra/newview/llagentpicksinfo.cpp
@@ -28,9 +28,11 @@
#include "llagentpicksinfo.h"
#include "llagent.h"
-#include "llavatarconstants.h"
#include "llavatarpropertiesprocessor.h"
+const S32 MAX_AVATAR_PICKS = 10;
+
+
class LLAgentPicksInfo::LLAgentPicksObserver : public LLAvatarPropertiesObserver
{
public:
diff --git a/indra/newview/llagentpilot.cpp b/indra/newview/llagentpilot.cpp
index c7872fc5f6..0dd107f349 100755
--- a/indra/newview/llagentpilot.cpp
+++ b/indra/newview/llagentpilot.cpp
@@ -97,11 +97,12 @@ void LLAgentPilot::loadTxt(const std::string& filename)
llinfos << "Opening pilot file " << filename << llendl;
}
- mActions.reset();
+ mActions.clear();
S32 num_actions;
file >> num_actions;
+ mActions.reserve(num_actions);
for (S32 i = 0; i < num_actions; i++)
{
S32 action_type;
@@ -109,7 +110,7 @@ void LLAgentPilot::loadTxt(const std::string& filename)
file >> new_action.mTime >> action_type;
file >> new_action.mTarget.mdV[VX] >> new_action.mTarget.mdV[VY] >> new_action.mTarget.mdV[VZ];
new_action.mType = (EActionType)action_type;
- mActions.put(new_action);
+ mActions.push_back(new_action);
}
mOverrideCamera = false;
@@ -137,7 +138,7 @@ void LLAgentPilot::loadXML(const std::string& filename)
llinfos << "Opening pilot file " << filename << llendl;
}
- mActions.reset();
+ mActions.clear();
LLSD record;
while (!file.eof() && LLSDParser::PARSE_FAILURE != LLSDSerialize::fromXML(record, file))
{
@@ -150,7 +151,7 @@ void LLAgentPilot::loadXML(const std::string& filename)
action.mCameraXAxis = ll_vector3_from_sd(record["camera_xaxis"]);
action.mCameraYAxis = ll_vector3_from_sd(record["camera_yaxis"]);
action.mCameraZAxis = ll_vector3_from_sd(record["camera_zaxis"]);
- mActions.put(action);
+ mActions.push_back(action);
}
mOverrideCamera = true;
file.close();
@@ -174,10 +175,10 @@ void LLAgentPilot::saveTxt(const std::string& filename)
llinfos << "Couldn't open " << filename << ", aborting agentpilot save!" << llendl;
}
- file << mActions.count() << '\n';
+ file << mActions.size() << '\n';
S32 i;
- for (i = 0; i < mActions.count(); i++)
+ for (i = 0; i < mActions.size(); i++)
{
file << mActions[i].mTime << "\t" << mActions[i].mType << "\t";
file << std::setprecision(32) << mActions[i].mTarget.mdV[VX] << "\t" << mActions[i].mTarget.mdV[VY] << "\t" << mActions[i].mTarget.mdV[VZ];
@@ -198,7 +199,7 @@ void LLAgentPilot::saveXML(const std::string& filename)
}
S32 i;
- for (i = 0; i < mActions.count(); i++)
+ for (i = 0; i < mActions.size(); i++)
{
Action& action = mActions[i];
LLSD record;
@@ -217,7 +218,7 @@ void LLAgentPilot::saveXML(const std::string& filename)
void LLAgentPilot::startRecord()
{
- mActions.reset();
+ mActions.clear();
mTimer.reset();
addAction(STRAIGHT);
mRecording = TRUE;
@@ -244,7 +245,7 @@ void LLAgentPilot::addAction(enum EActionType action_type)
action.mCameraYAxis = cam->getYAxis();
action.mCameraZAxis = cam->getZAxis();
mLastRecordTime = (F32)action.mTime;
- mActions.put(action);
+ mActions.push_back(action);
}
void LLAgentPilot::startPlayback()
@@ -255,7 +256,7 @@ void LLAgentPilot::startPlayback()
mCurrentAction = 0;
mTimer.reset();
- if (mActions.count())
+ if (mActions.size())
{
llinfos << "Starting playback, moving to waypoint 0" << llendl;
gAgent.startAutoPilotGlobal(mActions[0].mTarget);
@@ -291,7 +292,7 @@ void LLAgentPilot::moveCamera()
if (!getOverrideCamera())
return;
- if (mCurrentAction<mActions.count())
+ if (mCurrentAction<mActions.size())
{
S32 start_index = llmax(mCurrentAction-1,0);
S32 end_index = mCurrentAction;
@@ -331,7 +332,7 @@ void LLAgentPilot::updateTarget()
{
if (mPlaying)
{
- if (mCurrentAction < mActions.count())
+ if (mCurrentAction < mActions.size())
{
if (0 == mCurrentAction)
{
@@ -355,7 +356,7 @@ void LLAgentPilot::updateTarget()
//gAgent.stopAutoPilot();
mCurrentAction++;
- if (mCurrentAction < mActions.count())
+ if (mCurrentAction < mActions.size())
{
gAgent.startAutoPilotGlobal(mActions[mCurrentAction].mTarget);
moveCamera();
diff --git a/indra/newview/llagentpilot.h b/indra/newview/llagentpilot.h
index dd1709ec0c..f6b6376086 100755
--- a/indra/newview/llagentpilot.h
+++ b/indra/newview/llagentpilot.h
@@ -30,7 +30,6 @@
#include "stdtypes.h"
#include "lltimer.h"
#include "v3dmath.h"
-#include "lldarray.h"
// Class that drives the agent around according to a "script".
@@ -113,7 +112,7 @@ private:
LLVector3 mCameraZAxis;
};
- LLDynamicArray<Action> mActions;
+ std::vector<Action> mActions;
LLTimer mTimer;
};
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index e158dc7505..4a25b8c205 100755
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -958,7 +958,7 @@ public:
{
llinfos << "One item created " << inv_item.asString() << llendl;
LLViewerInventoryItem *item = gInventory.getItem(inv_item);
- mItemsToLink.put(item);
+ mItemsToLink.push_back(item);
updatePendingWearable(inv_item);
}
~OnWearableItemCreatedCB()
@@ -1235,7 +1235,7 @@ void LLAgentWearables::removeWearableFinal(const LLWearableType::EType type, boo
// Assumes existing wearables are not dirty.
void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& items,
- const LLDynamicArray< LLViewerWearable* >& wearables,
+ const std::vector< LLViewerWearable* >& wearables,
BOOL remove)
{
llinfos << "setWearableOutfit() start" << llendl;
@@ -1254,8 +1254,8 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
}
}
- S32 count = wearables.count();
- llassert(items.count() == count);
+ S32 count = wearables.size();
+ llassert(items.size() == count);
S32 i;
for (i = 0; i < count; i++)
@@ -1538,7 +1538,7 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj
std::set<LLUUID> requested_item_ids;
std::set<LLUUID> current_item_ids;
- for (S32 i=0; i<obj_item_array.count(); i++)
+ for (S32 i=0; i<obj_item_array.size(); i++)
requested_item_ids.insert(obj_item_array[i].get()->getLinkedUUID());
// Build up list of objects to be removed and items currently attached.
@@ -1624,7 +1624,7 @@ void LLAgentWearables::userRemoveMultipleAttachments(llvo_vec_t& objects_to_remo
void LLAgentWearables::userAttachMultipleAttachments(LLInventoryModel::item_array_t& obj_item_array)
{
// Build a compound message to send all the objects that need to be rezzed.
- S32 obj_count = obj_item_array.count();
+ S32 obj_count = obj_item_array.size();
// Limit number of packets to send
const S32 MAX_PACKETS_TO_SEND = 10;
@@ -1655,7 +1655,7 @@ void LLAgentWearables::userAttachMultipleAttachments(LLInventoryModel::item_arra
msg->addBOOLFast(_PREHASH_FirstDetachAll, false );
}
- const LLInventoryItem* item = obj_item_array.get(i).get();
+ const LLInventoryItem* item = obj_item_array.at(i).get();
msg->nextBlockFast(_PREHASH_ObjectData );
msg->addUUIDFast(_PREHASH_ItemID, item->getLinkedUUID());
msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner());
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index 5be4648636..02d24892b5 100755
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -107,7 +107,7 @@ private:
/*virtual*/void wearableUpdated(LLWearable *wearable, BOOL removed);
public:
void setWearableItem(LLInventoryItem* new_item, LLViewerWearable* wearable, bool do_append = false);
- void setWearableOutfit(const LLInventoryItem::item_array_t& items, const LLDynamicArray< LLViewerWearable* >& wearables, BOOL remove);
+ void setWearableOutfit(const LLInventoryItem::item_array_t& items, const std::vector< LLViewerWearable* >& wearables, BOOL remove);
void setWearableName(const LLUUID& item_id, const std::string& new_name);
// *TODO: Move this into llappearance/LLWearableData ?
void addLocalTextureObject(const LLWearableType::EType wearable_type, const LLAvatarAppearanceDefines::ETextureIndex texture_type, U32 wearable_index);
diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp
index 8b6b6db525..4a8d122dd8 100755
--- a/indra/newview/llagentwearablesfetch.cpp
+++ b/indra/newview/llagentwearablesfetch.cpp
@@ -54,7 +54,7 @@ void order_my_outfits_cb()
//My Outfits should at least contain saved initial outfit and one another outfit
if (cats->size() < 2)
{
- llwarning("My Outfits category was not populated properly", 0);
+ LL_WARNS() << "My Outfits category was not populated properly" << LL_ENDL;
return;
}
@@ -127,7 +127,7 @@ void LLInitialWearablesFetch::processContents()
LLInventoryModel::EXCLUDE_TRASH, is_wearable);
LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true);
- if (wearable_array.count() > 0)
+ if (wearable_array.size() > 0)
{
gAgentWearables.notifyLoadingStarted();
LLAppearanceMgr::instance().updateAppearanceFromCOF();
@@ -326,7 +326,7 @@ void LLLibraryOutfitsFetch::folderDone()
// Early out if we already have items in My Outfits
// except the case when My Outfits contains just initial outfit
- if (cat_array.count() > 1)
+ if (cat_array.size() > 1)
{
mOutfitsPopulated = true;
return;
@@ -342,9 +342,9 @@ void LLLibraryOutfitsFetch::folderDone()
cat_array, wearable_array,
LLInventoryModel::EXCLUDE_TRASH,
matchFolderFunctor);
- if (cat_array.count() > 0)
+ if (cat_array.size() > 0)
{
- const LLViewerInventoryCategory *cat = cat_array.get(0);
+ const LLViewerInventoryCategory *cat = cat_array.at(0);
mLibraryClothingID = cat->getUUID();
}
@@ -374,7 +374,7 @@ void LLLibraryOutfitsFetch::outfitsDone()
gInventory.collectDescendents(mLibraryClothingID, cat_array, wearable_array,
LLInventoryModel::EXCLUDE_TRASH);
- llassert(cat_array.count() > 0);
+ llassert(cat_array.size() > 0);
for (LLInventoryModel::cat_array_t::const_iterator iter = cat_array.begin();
iter != cat_array.end();
++iter)
@@ -401,7 +401,7 @@ void LLLibraryOutfitsFetch::outfitsDone()
matchFolderFunctor);
if (cat_array.size() > 0)
{
- const LLViewerInventoryCategory *cat = cat_array.get(0);
+ const LLViewerInventoryCategory *cat = cat_array.at(0);
mImportedClothingID = cat->getUUID();
}
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index fd9236c8b3..a18448da6e 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -148,11 +148,11 @@ LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id, const std::string
item_array,
LLInventoryModel::EXCLUDE_TRASH,
has_name);
- if (0 == cat_array.count())
+ if (0 == cat_array.size())
return LLUUID();
else
{
- LLViewerInventoryCategory *cat = cat_array.get(0);
+ LLViewerInventoryCategory *cat = cat_array.at(0);
if (cat)
return cat->getUUID();
else
@@ -754,9 +754,9 @@ void LLWearableHoldingPattern::onAllComplete()
}
// Activate all gestures in this folder
- if (mGestItems.count() > 0)
+ if (mGestItems.size() > 0)
{
- LL_DEBUGS("Avatar") << self_av_string() << "Activating " << mGestItems.count() << " gestures" << LL_ENDL;
+ LL_DEBUGS("Avatar") << self_av_string() << "Activating " << mGestItems.size() << " gestures" << LL_ENDL;
LLGestureMgr::instance().activateGestures(mGestItems);
@@ -779,7 +779,7 @@ void LLWearableHoldingPattern::onAllComplete()
// Update attachments to match those requested.
if (isAgentAvatarValid())
{
- LL_DEBUGS("Avatar") << self_av_string() << "Updating " << mObjItems.count() << " attachments" << LL_ENDL;
+ LL_DEBUGS("Avatar") << self_av_string() << "Updating " << mObjItems.size() << " attachments" << LL_ENDL;
LLAgentWearables::userUpdateAttachments(mObjItems);
}
@@ -1155,9 +1155,9 @@ static void removeDuplicateItems(LLInventoryModel::item_array_t& items)
// encountered, so we actually keep the *last* of each duplicate
// item. This is needed to give the right priority when adding
// duplicate items to an existing outfit.
- for (S32 i=items.count()-1; i>=0; i--)
+ for (S32 i=items.size()-1; i>=0; i--)
{
- LLViewerInventoryItem *item = items.get(i);
+ LLViewerInventoryItem *item = items.at(i);
LLUUID item_id = item->getLinkedUUID();
if (items_seen.find(item_id)!=items_seen.end())
continue;
@@ -1168,7 +1168,7 @@ static void removeDuplicateItems(LLInventoryModel::item_array_t& items)
it != tmp_list.end();
++it)
{
- new_items.put(*it);
+ new_items.push_back(*it);
}
items = new_items;
}
@@ -1464,7 +1464,7 @@ void LLAppearanceMgr::shallowCopyCategoryContents(const LLUUID& src_id, const LL
LLInventoryModel::cat_array_t* cats;
LLInventoryModel::item_array_t* items;
gInventory.getDirectDescendentsOf(src_id, cats, items);
- llinfos << "copying " << items->count() << " items" << llendl;
+ llinfos << "copying " << items->size() << " items" << llendl;
for (LLInventoryModel::item_array_t::const_iterator iter = items->begin();
iter != items->end();
++iter)
@@ -1644,9 +1644,9 @@ void LLAppearanceMgr::purgeBaseOutfitLink(const LLUUID& category)
LLInventoryModel::item_array_t items;
gInventory.collectDescendents(category, cats, items,
LLInventoryModel::EXCLUDE_TRASH);
- for (S32 i = 0; i < items.count(); ++i)
+ for (S32 i = 0; i < items.size(); ++i)
{
- LLViewerInventoryItem *item = items.get(i);
+ LLViewerInventoryItem *item = items.at(i);
if (item->getActualType() != LLAssetType::AT_LINK_FOLDER)
continue;
if (item->getIsLinkType())
@@ -1666,9 +1666,9 @@ void LLAppearanceMgr::purgeCategory(const LLUUID& category, bool keep_outfit_lin
LLInventoryModel::item_array_t items;
gInventory.collectDescendents(category, cats, items,
LLInventoryModel::EXCLUDE_TRASH);
- for (S32 i = 0; i < items.count(); ++i)
+ for (S32 i = 0; i < items.size(); ++i)
{
- LLViewerInventoryItem *item = items.get(i);
+ LLViewerInventoryItem *item = items.at(i);
if (keep_outfit_links && (item->getActualType() == LLAssetType::AT_LINK_FOLDER))
continue;
if (item->getIsLinkType())
@@ -1718,9 +1718,9 @@ void LLAppearanceMgr::linkAll(const LLUUID& cat_uuid,
LLInventoryModel::item_array_t& items,
LLPointer<LLInventoryCallback> cb)
{
- for (S32 i=0; i<items.count(); i++)
+ for (S32 i=0; i<items.size(); i++)
{
- const LLInventoryItem* item = items.get(i).get();
+ const LLInventoryItem* item = items.at(i).get();
link_inventory_item(gAgent.getID(),
item->getLinkedUUID(),
cat_uuid,
@@ -1749,9 +1749,9 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
{
LLInventoryModel::item_array_t gest_items;
getDescendentsOfAssetType(cof, gest_items, LLAssetType::AT_GESTURE, false);
- for(S32 i = 0; i < gest_items.count(); ++i)
+ for(S32 i = 0; i < gest_items.size(); ++i)
{
- LLViewerInventoryItem *gest_item = gest_items.get(i);
+ LLViewerInventoryItem *gest_item = gest_items.at(i);
if ( LLGestureMgr::instance().isGestureActive( gest_item->getLinkedUUID()) )
{
LLGestureMgr::instance().deactivateGesture( gest_item->getLinkedUUID() );
@@ -1798,10 +1798,10 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
// Create links to new COF contents.
LLInventoryModel::item_array_t all_items;
- all_items += body_items;
- all_items += wear_items;
- all_items += obj_items;
- all_items += gest_items;
+ std::copy(body_items.begin(), body_items.end(), std::back_inserter(all_items));
+ std::copy(wear_items.begin(), wear_items.end(), std::back_inserter(all_items));
+ std::copy(obj_items.begin(), obj_items.end(), std::back_inserter(all_items));
+ std::copy(gest_items.begin(), gest_items.end(), std::back_inserter(all_items));
// Will link all the above items.
LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy;
@@ -1856,7 +1856,8 @@ void LLAppearanceMgr::updateAgentWearables(LLWearableHoldingPattern* holder, boo
{
lldebugs << "updateAgentWearables()" << llendl;
LLInventoryItem::item_array_t items;
- LLDynamicArray< LLViewerWearable* > wearables;
+ std::vector< LLViewerWearable* > wearables;
+ wearables.reserve(32);
// For each wearable type, find the wearables of that type.
for( S32 i = 0; i < LLWearableType::WT_COUNT; i++ )
@@ -1871,14 +1872,14 @@ void LLAppearanceMgr::updateAgentWearables(LLWearableHoldingPattern* holder, boo
LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getItem(data.mItemID);
if( item && (item->getAssetUUID() == wearable->getAssetID()) )
{
- items.put(item);
- wearables.put(wearable);
+ items.push_back(item);
+ wearables.push_back(wearable);
}
}
}
}
- if(wearables.count() > 0)
+ if(wearables.size() > 0)
{
gAgentWearables.setWearableOutfit(items, wearables, !append);
}
@@ -1905,7 +1906,7 @@ bool sort_by_actual_description(const LLInventoryItem* item1, const LLInventoryI
{
if (!item1 || !item2)
{
- llwarning("either item1 or item2 is NULL", 0);
+ LL_WARNS() << "either item1 or item2 is NULL" << LL_ENDL;
return true;
}
@@ -1922,7 +1923,7 @@ void item_array_diff(LLInventoryModel::item_array_t& full_list,
++it)
{
LLViewerInventoryItem *item = *it;
- if (keep_list.find(item) < 0) // Why on earth does LLDynamicArray need to redefine find()?
+ if (std::find(keep_list.begin(), keep_list.end(), item) == keep_list.end())
{
kill_list.push_back(item);
}
@@ -2036,7 +2037,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
dumpItemArray(wear_items,"asset_dump: wear_item");
dumpItemArray(obj_items,"asset_dump: obj_item");
- if(!wear_items.count())
+ if(!wear_items.size())
{
LLNotificationsUtil::add("CouldNotPutOnOutfit");
return;
@@ -2056,9 +2057,9 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
// callback will be called (and this object deleted)
// before the final getNextData().
- for(S32 i = 0; i < wear_items.count(); ++i)
+ for(S32 i = 0; i < wear_items.size(); ++i)
{
- LLViewerInventoryItem *item = wear_items.get(i);
+ LLViewerInventoryItem *item = wear_items.at(i);
LLViewerInventoryItem *linked_item = item ? item->getLinkedItem() : NULL;
// Fault injection: use debug setting to test asset
@@ -2301,10 +2302,10 @@ void LLAppearanceMgr::wearOutfitByName(const std::string& name)
has_name);
bool copy_items = false;
LLInventoryCategory* cat = NULL;
- if (cat_array.count() > 0)
+ if (cat_array.size() > 0)
{
// Just wear the first one that matches
- cat = cat_array.get(0);
+ cat = cat_array.at(0);
}
else
{
@@ -2313,9 +2314,9 @@ void LLAppearanceMgr::wearOutfitByName(const std::string& name)
item_array,
LLInventoryModel::EXCLUDE_TRASH,
has_name);
- if(cat_array.count() > 0)
+ if(cat_array.size() > 0)
{
- cat = cat_array.get(0);
+ cat = cat_array.at(0);
copy_items = true;
}
}
@@ -2426,10 +2427,10 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, bool do_update
LLInventoryModel::EXCLUDE_TRASH);
bool linked_already = false;
U32 count = 0;
- for (S32 i=0; i<item_array.count(); i++)
+ for (S32 i=0; i<item_array.size(); i++)
{
// Are these links to the same object?
- const LLViewerInventoryItem* inv_item = item_array.get(i).get();
+ const LLViewerInventoryItem* inv_item = item_array.at(i).get();
const LLWearableType::EType wearable_type = inv_item->getWearableType();
const bool is_body_part = (wearable_type == LLWearableType::WT_SHAPE)
@@ -2502,12 +2503,12 @@ LLInventoryModel::item_array_t LLAppearanceMgr::findCOFItemLinks(const LLUUID& i
cat_array,
item_array,
LLInventoryModel::EXCLUDE_TRASH);
- for (S32 i=0; i<item_array.count(); i++)
+ for (S32 i=0; i<item_array.size(); i++)
{
- const LLViewerInventoryItem* inv_item = item_array.get(i).get();
+ const LLViewerInventoryItem* inv_item = item_array.at(i).get();
if (inv_item->getLinkedUUID() == vitem->getLinkedUUID())
{
- result.put(item_array.get(i));
+ result.push_back(item_array.at(i));
}
}
}
@@ -2579,9 +2580,9 @@ void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id)
cat_array,
item_array,
LLInventoryModel::EXCLUDE_TRASH);
- for (S32 i=0; i<item_array.count(); i++)
+ for (S32 i=0; i<item_array.size(); i++)
{
- const LLInventoryItem* item = item_array.get(i).get();
+ const LLInventoryItem* item = item_array.at(i).get();
if (item->getIsLinkType() && item->getLinkedUUID() == item_id)
{
gInventory.purgeObject(item->getUUID());
@@ -2611,7 +2612,7 @@ bool sort_by_linked_uuid(const LLViewerInventoryItem* item1, const LLViewerInven
{
if (!item1 || !item2)
{
- llwarning("item1, item2 cannot be null, something is very wrong", 0);
+ LL_WARNS() << "item1, item2 cannot be null, something is very wrong" << LL_ENDL;
return true;
}
@@ -2653,7 +2654,7 @@ void LLAppearanceMgr::updateIsDirty()
gInventory.collectDescendentsIf(base_outfit, outfit_cats, outfit_items,
LLInventoryModel::EXCLUDE_TRASH, collector);
- if(outfit_items.count() != cof_items.count())
+ if(outfit_items.size() != cof_items.size())
{
// Current outfit folder should have one more item than the outfit folder.
// this one item is the link back to the outfit folder itself.
@@ -2667,8 +2668,8 @@ void LLAppearanceMgr::updateIsDirty()
for (U32 i = 0; i < cof_items.size(); ++i)
{
- LLViewerInventoryItem *item1 = cof_items.get(i);
- LLViewerInventoryItem *item2 = outfit_items.get(i);
+ LLViewerInventoryItem *item1 = cof_items.at(i);
+ LLViewerInventoryItem *item2 = outfit_items.at(i);
if (item1->getLinkedUUID() != item2->getLinkedUUID() ||
item1->getName() != item2->getName() ||
@@ -2839,9 +2840,9 @@ void LLAppearanceMgr::divvyWearablesByType(const LLInventoryModel::item_array_t&
items_by_type.resize(LLWearableType::WT_COUNT);
if (items.empty()) return;
- for (S32 i=0; i<items.count(); i++)
+ for (S32 i=0; i<items.size(); i++)
{
- LLViewerInventoryItem *item = items.get(i);
+ LLViewerInventoryItem *item = items.at(i);
if (!item)
{
LL_WARNS("Appearance") << "NULL item found" << llendl;
@@ -2879,7 +2880,7 @@ struct WearablesOrderComparator
{
if (!item1 || !item2)
{
- llwarning("either item1 or item2 is NULL", 0);
+ LL_WARNS() << "either item1 or item2 is NULL" << LL_ENDL;
return true;
}
@@ -3122,9 +3123,9 @@ public:
LLInventoryModel::item_array_t item_array;
gInventory.collectDescendents(LLAppearanceMgr::instance().getCOF(),
cat_array,item_array,LLInventoryModel::EXCLUDE_TRASH);
- for (S32 i=0; i<item_array.count(); i++)
+ for (S32 i=0; i<item_array.size(); i++)
{
- const LLViewerInventoryItem* inv_item = item_array.get(i).get();
+ const LLViewerInventoryItem* inv_item = item_array.at(i).get();
local_items.insert(inv_item->getUUID());
LL_DEBUGS("Avatar") << "item_id: " << inv_item->getUUID()
<< " linked_item_id: " << inv_item->getLinkedUUID()
@@ -3159,9 +3160,9 @@ LLSD LLAppearanceMgr::dumpCOF() const
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t item_array;
gInventory.collectDescendents(getCOF(),cat_array,item_array,LLInventoryModel::EXCLUDE_TRASH);
- for (S32 i=0; i<item_array.count(); i++)
+ for (S32 i=0; i<item_array.size(); i++)
{
- const LLViewerInventoryItem* inv_item = item_array.get(i).get();
+ const LLViewerInventoryItem* inv_item = item_array.at(i).get();
LLSD item;
LLUUID item_id(inv_item->getUUID());
md5.update((unsigned char*)item_id.mData, 16);
@@ -3505,7 +3506,7 @@ void LLAppearanceMgr::dumpCat(const LLUUID& cat_id, const std::string& msg)
llinfos << llendl;
llinfos << str << llendl;
S32 hitcount = 0;
- for(S32 i=0; i<items.count(); i++)
+ for(S32 i=0; i<items.size(); i++)
{
LLViewerInventoryItem *item = items.get(i);
if (item)
@@ -3513,15 +3514,15 @@ void LLAppearanceMgr::dumpCat(const LLUUID& cat_id, const std::string& msg)
llinfos << i <<" "<< item->getName() <<llendl;
}
#endif
- llinfos << msg << " count " << items.count() << llendl;
+ llinfos << msg << " count " << items.size() << llendl;
}
void LLAppearanceMgr::dumpItemArray(const LLInventoryModel::item_array_t& items,
const std::string& msg)
{
- for (S32 i=0; i<items.count(); i++)
+ for (S32 i=0; i<items.size(); i++)
{
- LLViewerInventoryItem *item = items.get(i);
+ LLViewerInventoryItem *item = items.at(i);
LLViewerInventoryItem *linked_item = item ? item->getLinkedItem() : NULL;
LLUUID asset_id;
if (linked_item)
@@ -3703,7 +3704,7 @@ public:
cat_array,
item_array,
LLInventoryModel::EXCLUDE_TRASH);
- S32 count = item_array.count();
+ S32 count = item_array.size();
if(!count)
{
llwarns << "Nothing fetched in category " << mComplete.front()
@@ -3715,11 +3716,11 @@ public:
return;
}
- llinfos << "stage1 got " << item_array.count() << " items, passing to stage2 " << llendl;
+ llinfos << "stage1 got " << item_array.size() << " items, passing to stage2 " << llendl;
uuid_vec_t ids;
for(S32 i = 0; i < count; ++i)
{
- ids.push_back(item_array.get(i)->getUUID());
+ ids.push_back(item_array.at(i)->getUUID());
}
gInventory.removeObserver(this);
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index a208745822..d544b992ef 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -93,7 +93,6 @@
#include "llvocache.h"
#include "llvopartgroup.h"
#include "llweb.h"
-#include "llsecondlifeurls.h"
#include "llupdaterservice.h"
#include "llfloatertexturefetchdebugger.h"
#include "llspellcheck.h"
@@ -294,12 +293,12 @@ U32 gFrameCount = 0;
U32 gForegroundFrameCount = 0; // number of frames that app window was in foreground
LLPumpIO* gServicePump = NULL;
-U64 gFrameTime = 0;
-F32 gFrameTimeSeconds = 0.f;
-LLUnit<F32, LLUnits::Seconds> gFrameIntervalSeconds = 0.f;
+LLUnitImplicit<U64, LLUnits::Microseconds> gFrameTime = 0;
+LLUnitImplicit<F32, LLUnits::Seconds> gFrameTimeSeconds = 0.f;
+LLUnitImplicit<F32, LLUnits::Seconds> gFrameIntervalSeconds = 0.f;
F32 gFPSClamped = 10.f; // Pretend we start at target rate.
F32 gFrameDTClamped = 0.f; // Time between adjacent checks to network for packets
-U64 gStartTime = 0; // gStartTime is "private", used only to calculate gFrameTimeSeconds
+LLUnitImplicit<U64, LLUnits::Microseconds> gStartTime = 0; // gStartTime is "private", used only to calculate gFrameTimeSeconds
U32 gFrameStalls = 0;
const F64 FRAME_STALL_THRESHOLD = 1.0;
@@ -662,7 +661,7 @@ LLTextureFetch* LLAppViewer::sTextureFetch = NULL;
std::string getRuntime()
{
- return llformat("%g", LLTimer::getElapsedSeconds().value());
+ return llformat("%.4f", (F32)LLTimer::getElapsedSeconds().value());
}
LLAppViewer::LLAppViewer()
@@ -1260,7 +1259,7 @@ LLFastTimer::DeclareTimer FTM_FRAME("Frame");
bool LLAppViewer::mainLoop()
{
- llinfos << "***********************Entering main_loop***********************" << llendflush;
+ llinfos << "***********************Entering main_loop***********************" << LL_ENDL;
mMainloopTimeout = new LLWatchdogTimeout();
@@ -1465,7 +1464,7 @@ bool LLAppViewer::mainLoop()
ms_sleep(500);
}
- const F64 max_idle_time = llmin(.005*10.0*gFrameTimeSeconds, 0.005); // 5 ms a second
+ const F64 max_idle_time = llmin(.005*10.0*gFrameTimeSeconds, LLUnitImplicit<F32, LLUnits::Seconds>(0.005f)); // 5 ms a second
idleTimer.reset();
S32 total_work_pending = 0;
S32 total_io_pending = 0;
@@ -1588,7 +1587,7 @@ bool LLAppViewer::mainLoop()
destroyMainloopTimeout();
- llinfos << "***********************Exiting main_loop***********************" << llendflush;
+ llinfos << "***********************Exiting main_loop***********************" << LL_ENDL;
return true;
}
@@ -1621,7 +1620,7 @@ void LLAppViewer::flushVFSIO()
{
break;
}
- llinfos << "Waiting for pending IO to finish: " << pending << llendflush;
+ llinfos << "Waiting for pending IO to finish: " << pending << LL_ENDL;
ms_sleep(100);
}
}
@@ -1685,7 +1684,7 @@ bool LLAppViewer::cleanup()
disconnectViewer();
- llinfos << "Viewer disconnected" << llendflush;
+ llinfos << "Viewer disconnected" << LL_ENDL;
display_cleanup();
@@ -1693,7 +1692,7 @@ bool LLAppViewer::cleanup()
LLError::logToFixedBuffer(NULL);
- llinfos << "Cleaning Up" << llendflush;
+ llinfos << "Cleaning Up" << LL_ENDL;
// shut down mesh streamer
gMeshRepo.shutdown();
@@ -1708,7 +1707,7 @@ bool LLAppViewer::cleanup()
LLHUDObject::updateAll();
LLHUDManager::getInstance()->cleanupEffects();
LLHUDObject::cleanupHUDObjects();
- llinfos << "HUD Objects cleaned up" << llendflush;
+ llinfos << "HUD Objects cleaned up" << LL_ENDL;
}
LLKeyframeDataCache::clear();
@@ -1739,7 +1738,7 @@ bool LLAppViewer::cleanup()
LLCalc::cleanUp();
- llinfos << "Global stuff deleted" << llendflush;
+ llinfos << "Global stuff deleted" << LL_ENDL;
if (gAudiop)
{
@@ -1763,7 +1762,7 @@ bool LLAppViewer::cleanup()
// such that we can suck rectangle information out of
// it.
cleanupSavedSettings();
- llinfos << "Settings patched up" << llendflush;
+ llinfos << "Settings patched up" << LL_ENDL;
// delete some of the files left around in the cache.
removeCacheFiles("*.wav");
@@ -1774,29 +1773,29 @@ bool LLAppViewer::cleanup()
removeCacheFiles("*.bodypart");
removeCacheFiles("*.clothing");
- llinfos << "Cache files removed" << llendflush;
+ llinfos << "Cache files removed" << LL_ENDL;
// Wait for any pending VFS IO
flushVFSIO();
- llinfos << "Shutting down Views" << llendflush;
+ llinfos << "Shutting down Views" << LL_ENDL;
// Destroy the UI
if( gViewerWindow)
gViewerWindow->shutdownViews();
- llinfos << "Cleaning up Inventory" << llendflush;
+ llinfos << "Cleaning up Inventory" << LL_ENDL;
// Cleanup Inventory after the UI since it will delete any remaining observers
// (Deleted observers should have already removed themselves)
gInventory.cleanupInventory();
- llinfos << "Cleaning up Selections" << llendflush;
+ llinfos << "Cleaning up Selections" << LL_ENDL;
// Clean up selection managers after UI is destroyed, as UI may be observing them.
// Clean up before GL is shut down because we might be holding on to objects with texture references
LLSelectMgr::cleanupGlobals();
- llinfos << "Shutting down OpenGL" << llendflush;
+ llinfos << "Shutting down OpenGL" << LL_ENDL;
// Shut down OpenGL
if( gViewerWindow)
@@ -1808,10 +1807,10 @@ bool LLAppViewer::cleanup()
// Therefore must do this before destroying the message system.
delete gViewerWindow;
gViewerWindow = NULL;
- llinfos << "ViewerWindow deleted" << llendflush;
+ llinfos << "ViewerWindow deleted" << LL_ENDL;
}
- llinfos << "Cleaning up Keyboard & Joystick" << llendflush;
+ llinfos << "Cleaning up Keyboard & Joystick" << LL_ENDL;
// viewer UI relies on keyboard so keep it aound until viewer UI isa gone
delete gKeyboard;
@@ -1820,7 +1819,7 @@ bool LLAppViewer::cleanup()
// Turn off Space Navigator and similar devices
LLViewerJoystick::getInstance()->terminate();
- llinfos << "Cleaning up Objects" << llendflush;
+ llinfos << "Cleaning up Objects" << LL_ENDL;
LLViewerObject::cleanupVOClasses();
@@ -1842,11 +1841,11 @@ bool LLAppViewer::cleanup()
LLVolumeMgr* volume_manager = LLPrimitive::getVolumeManager();
if (!volume_manager->cleanup())
{
- llwarns << "Remaining references in the volume manager!" << llendflush;
+ llwarns << "Remaining references in the volume manager!" << LL_ENDL;
}
LLPrimitive::cleanupVolumeManager();
- llinfos << "Additional Cleanup..." << llendflush;
+ llinfos << "Additional Cleanup..." << LL_ENDL;
LLViewerParcelMgr::cleanupGlobals();
@@ -1867,10 +1866,10 @@ bool LLAppViewer::cleanup()
// Also after shutting down the messaging system since it has VFS dependencies
//
- llinfos << "Cleaning up VFS" << llendflush;
+ llinfos << "Cleaning up VFS" << LL_ENDL;
LLVFile::cleanupClass();
- llinfos << "Saving Data" << llendflush;
+ llinfos << "Saving Data" << LL_ENDL;
// Store the time of our current logoff
gSavedPerAccountSettings.setU32("LastLogoff", time_corrected());
@@ -1897,7 +1896,7 @@ bool LLAppViewer::cleanup()
else
{
gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE);
- llinfos << "Saved settings" << llendflush;
+ llinfos << "Saved settings" << LL_ENDL;
}
std::string warnings_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Warnings"));
@@ -1914,7 +1913,7 @@ bool LLAppViewer::cleanup()
if (mPurgeOnExit)
{
- llinfos << "Purging all cache files on exit" << llendflush;
+ llinfos << "Purging all cache files on exit" << LL_ENDL;
gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE,""), "*.*");
}
@@ -1931,7 +1930,7 @@ bool LLAppViewer::cleanup()
// Stop the plugin read thread if it's running.
LLPluginProcessParent::setUseReadThread(false);
- llinfos << "Shutting down Threads" << llendflush;
+ llinfos << "Shutting down Threads" << LL_ENDL;
// Let threads finish
LLTimer idleTimer;
@@ -1969,7 +1968,7 @@ bool LLAppViewer::cleanup()
sTextureFetch->shutDownTextureCacheThread() ;
sTextureFetch->shutDownImageDecodeThread() ;
- llinfos << "Shutting down message system" << llendflush;
+ llinfos << "Shutting down message system" << LL_ENDL;
end_messaging_system();
// *NOTE:Mani - The following call is not thread safe.
@@ -2008,7 +2007,7 @@ bool LLAppViewer::cleanup()
LLMetricPerformanceTesterBasic::cleanClass() ;
- llinfos << "Cleaning up Media and Textures" << llendflush;
+ llinfos << "Cleaning up Media and Textures" << LL_ENDL;
//Note:
//LLViewerMedia::cleanupClass() has to be put before gTextureList.shutdown()
@@ -2031,7 +2030,7 @@ bool LLAppViewer::cleanup()
}
#endif
- llinfos << "Misc Cleanup" << llendflush;
+ llinfos << "Misc Cleanup" << LL_ENDL;
// For safety, the LLVFS has to be deleted *after* LLVFSThread. This should be cleaned up.
// (LLVFS doesn't know about LLVFSThread so can't kill pending requests) -Steve
@@ -2051,7 +2050,7 @@ bool LLAppViewer::cleanup()
// is at the right resolution before we launch IE.
if (!gLaunchFileOnQuit.empty())
{
- llinfos << "Launch file on quit." << llendflush;
+ llinfos << "Launch file on quit." << LL_ENDL;
#if LL_WINDOWS
// Indicate an application is starting.
SetCursor(LoadCursor(NULL, IDC_WAIT));
@@ -2061,7 +2060,7 @@ bool LLAppViewer::cleanup()
ms_sleep(1000);
LLWeb::loadURLExternal( gLaunchFileOnQuit, false );
- llinfos << "File launched." << llendflush;
+ llinfos << "File launched." << LL_ENDL;
}
llinfos << "Cleaning up LLProxy." << llendl;
LLProxy::cleanupClass();
@@ -2075,7 +2074,7 @@ bool LLAppViewer::cleanup()
ll_close_fail_log();
- llinfos << "Goodbye!" << llendflush;
+ llinfos << "Goodbye!" << LL_ENDL;
// return 0;
return true;
@@ -4559,7 +4558,7 @@ void LLAppViewer::idle()
{
LLFastTimer t(FTM_NETWORK);
// Update spaceserver timeinfo
- LLWorld::getInstance()->setSpaceTimeUSec(LLWorld::getInstance()->getSpaceTimeUSec() + (U32)(dt_raw * SEC_TO_MICROSEC));
+ LLWorld::getInstance()->setSpaceTimeUSec(LLWorld::getInstance()->getSpaceTimeUSec() + LLUnits::Seconds::fromValue(dt_raw));
//////////////////////////////////////
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index e7dd605044..60a1045f58 100755
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -334,12 +334,12 @@ extern U32 gForegroundFrameCount;
extern LLPumpIO* gServicePump;
-extern U64 gFrameTime; // The timestamp of the most-recently-processed frame
-extern F32 gFrameTimeSeconds; // Loses msec precision after ~4.5 hours...
-extern LLUnit<F32, LLUnits::Seconds> gFrameIntervalSeconds; // Elapsed time between current and previous gFrameTimeSeconds
+extern LLUnitImplicit<U64, LLUnits::Microseconds> gStartTime;
+extern LLUnitImplicit<U64, LLUnits::Microseconds> gFrameTime; // The timestamp of the most-recently-processed frame
+extern LLUnitImplicit<F32, LLUnits::Seconds> gFrameTimeSeconds; // Loses msec precision after ~4.5 hours...
+extern LLUnitImplicit<F32, LLUnits::Seconds> gFrameIntervalSeconds; // Elapsed time between current and previous gFrameTimeSeconds
extern F32 gFPSClamped; // Frames per second, smoothed, weighted toward last frame
extern F32 gFrameDTClamped;
-extern U64 gStartTime;
extern U32 gFrameStalls;
extern LLTimer gRenderStartTime;
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index b7cdcb058b..f08d2c2a03 100755
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -53,7 +53,6 @@
#include <stdlib.h>
#include "llweb.h"
-#include "llsecondlifeurls.h"
#include "llviewernetwork.h"
#include "llmd5.h"
@@ -307,14 +306,14 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
// app cleanup if there was a problem.
//
#if WINDOWS_CRT_MEM_CHECKS
- llinfos << "CRT Checking memory:" << llendflush;
+ llinfos << "CRT Checking memory:" << LL_ENDL;
if (!_CrtCheckMemory())
{
- llwarns << "_CrtCheckMemory() failed at prior to cleanup!" << llendflush;
+ llwarns << "_CrtCheckMemory() failed at prior to cleanup!" << LL_ENDL;
}
else
{
- llinfos << " No corruption detected." << llendflush;
+ llinfos << " No corruption detected." << LL_ENDL;
}
#endif
@@ -323,14 +322,14 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
viewer_app_ptr->cleanup();
#if WINDOWS_CRT_MEM_CHECKS
- llinfos << "CRT Checking memory:" << llendflush;
+ llinfos << "CRT Checking memory:" << LL_ENDL;
if (!_CrtCheckMemory())
{
- llwarns << "_CrtCheckMemory() failed after cleanup!" << llendflush;
+ llwarns << "_CrtCheckMemory() failed after cleanup!" << LL_ENDL;
}
else
{
- llinfos << " No corruption detected." << llendflush;
+ llinfos << " No corruption detected." << LL_ENDL;
}
#endif
@@ -568,7 +567,7 @@ bool LLAppViewerWin32::initHardwareTest()
if (OSBTN_NO== button)
{
LL_INFOS("AppInit") << "User quitting after failed DirectX 9 detection" << LL_ENDL;
- LLWeb::loadURLExternal(DIRECTX_9_URL, false);
+ LLWeb::loadURLExternal("http://secondlife.com/support/, false);
return false;
}
gWarningSettings.setBOOL("AboutDirectX9", FALSE);
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index b513a52ff7..1d774e6eac 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -33,7 +33,6 @@
#include "llavatarnamecache.h" // IDEVO
#include "llsd.h"
-#include "lldarray.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "roles_constants.h" // for GP_MEMBER_INVITE
@@ -74,6 +73,12 @@
#include "llslurl.h" // IDEVO
#include "llsidepanelinventory.h"
+// Flags for kick message
+const U32 KICK_FLAGS_DEFAULT = 0x0;
+const U32 KICK_FLAGS_FREEZE = 1 << 0;
+const U32 KICK_FLAGS_UNFREEZE = 1 << 1;
+
+
// static
void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::string& name)
{
@@ -164,7 +169,7 @@ void LLAvatarActions::offerTeleport(const LLUUID& invitee)
if (invitee.isNull())
return;
- LLDynamicArray<LLUUID> ids;
+ std::vector<LLUUID> ids;
ids.push_back(invitee);
offerTeleport(ids);
}
@@ -242,8 +247,9 @@ void LLAvatarActions::startAdhocCall(const uuid_vec_t& ids, const LLUUID& floate
return;
}
- // convert vector into LLDynamicArray for addSession
- LLDynamicArray<LLUUID> id_array;
+ // convert vector into std::vector for addSession
+ std::vector<LLUUID> id_array;
+ id_array.reserve(ids.size());
for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
{
id_array.push_back(*it);
@@ -288,7 +294,9 @@ bool LLAvatarActions::canCall()
void LLAvatarActions::startConference(const uuid_vec_t& ids, const LLUUID& floater_id)
{
// *HACK: Copy into dynamic array
- LLDynamicArray<LLUUID> id_array;
+ std::vector<LLUUID> id_array;
+
+ id_array.reserve(ids.size());
for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
{
id_array.push_back(*it);
diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h
index 6e1198cd09..dd5f5eddf4 100755
--- a/indra/newview/llavataractions.h
+++ b/indra/newview/llavataractions.h
@@ -27,7 +27,6 @@
#ifndef LL_LLAVATARACTIONS_H
#define LL_LLAVATARACTIONS_H
-#include "lldarray.h"
#include "llsd.h"
#include "lluuid.h"
diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp
index f34ad23769..0d1ecc9c47 100755
--- a/indra/newview/llavatariconctrl.cpp
+++ b/indra/newview/llavatariconctrl.cpp
@@ -32,7 +32,6 @@
// viewer includes
#include "llagent.h"
-#include "llavatarconstants.h"
#include "llcallingcard.h" // for LLAvatarTracker
#include "llavataractions.h"
#include "llmenugl.h"
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index 9f02f301a1..8846d1317d 100755
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -586,7 +586,7 @@ bool LLAvatarItemComparator::compare(const LLPanel* item1, const LLPanel* item2)
if (!avatar_item1 || !avatar_item2)
{
- llerror("item1 and item2 cannot be null", 0);
+ LL_ERRS() << "item1 and item2 cannot be null" << LL_ENDL;
return true;
}
diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp
index 706bc42ea0..f095ef25d1 100755
--- a/indra/newview/llavatarpropertiesprocessor.cpp
+++ b/indra/newview/llavatarpropertiesprocessor.cpp
@@ -36,7 +36,6 @@
#include "llstartup.h"
// Linden library includes
-#include "llavatarconstants.h" // AVATAR_TRANSACTED, etc.
#include "lldate.h"
#include "lltrans.h"
#include "llui.h" // LLUI::getLanguage()
diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h
index fdb88a41a1..1dcd2c9b90 100755
--- a/indra/newview/llavatarpropertiesprocessor.h
+++ b/indra/newview/llavatarpropertiesprocessor.h
@@ -33,6 +33,14 @@
#include <list>
#include <map>
+// For Flags in AvatarPropertiesReply
+const U32 AVATAR_ALLOW_PUBLISH = 0x1 << 0; // whether profile is externally visible or not
+const U32 AVATAR_MATURE_PUBLISH = 0x1 << 1; // profile is "mature"
+const U32 AVATAR_IDENTIFIED = 0x1 << 2; // whether avatar has provided payment info
+const U32 AVATAR_TRANSACTED = 0x1 << 3; // whether avatar has actively used payment info
+const U32 AVATAR_ONLINE = 0x1 << 4; // the online status of this avatar, if known.
+const U32 AVATAR_AGEVERIFIED = 0x1 << 5; // whether avatar has been age-verified
+
/*
*TODO Vadim: This needs some refactoring:
- Remove EAvatarProcessorType in favor of separate observers, derived from a common parent (to get rid of void*).
diff --git a/indra/newview/llblocklist.cpp b/indra/newview/llblocklist.cpp
index 066cb71677..5133ceb64f 100755
--- a/indra/newview/llblocklist.cpp
+++ b/indra/newview/llblocklist.cpp
@@ -246,7 +246,7 @@ bool LLBlockListItemComparator::compare(const LLPanel* item1, const LLPanel* ite
if (!blocked_item1 || !blocked_item2)
{
- llerror("blocked_item1 and blocked_item2 cannot be null", 0);
+ LL_ERRS() << "blocked_item1 and blocked_item2 cannot be null" << LL_ENDL;
return true;
}
diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp
index b883941963..9b57587237 100755
--- a/indra/newview/llchatbar.cpp
+++ b/indra/newview/llchatbar.cpp
@@ -28,7 +28,6 @@
#include "llchatbar.h"
-#include "imageids.h"
#include "llfontgl.h"
#include "llrect.h"
#include "llerror.h"
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index e86d6930e8..b5bb303b65 100755
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -477,7 +477,7 @@ void LLCOFWearables::populateAttachmentsAndBodypartsLists(const LLInventoryModel
{
for (U32 i = 0; i < cof_items.size(); ++i)
{
- LLViewerInventoryItem* item = cof_items.get(i);
+ LLViewerInventoryItem* item = cof_items.at(i);
if (!item) continue;
const LLAssetType::EType item_type = item->getType();
diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp
index f1f7da5fd1..a03178adf6 100755
--- a/indra/newview/llcolorswatch.cpp
+++ b/indra/newview/llcolorswatch.cpp
@@ -37,13 +37,11 @@
#include "llui.h"
#include "llrender.h"
#include "lluiconstants.h"
-#include "llviewercontrol.h"
#include "llbutton.h"
-#include "lltextbox.h"
#include "llfloatercolorpicker.h"
#include "llviewborder.h"
-#include "llviewertexturelist.h"
#include "llfocusmgr.h"
+#include "lltextbox.h"
static LLDefaultChildRegistry::Register<LLColorSwatchCtrl> r("color_swatch");
@@ -239,16 +237,9 @@ void LLColorSwatchCtrl::draw()
}
else
{
- if (!mFallbackImageName.empty())
+ if (mFallbackImage.notNull())
{
- LLPointer<LLViewerFetchedTexture> fallback_image = LLViewerTextureManager::getFetchedTextureFromFile(mFallbackImageName, FTT_LOCAL_FILE, TRUE,
- LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
- if( fallback_image->getComponents() == 4 )
- {
- gl_rect_2d_checkerboard( interior );
- }
- gl_draw_scaled_image( interior.mLeft, interior.mBottom, interior.getWidth(), interior.getHeight(), fallback_image, LLColor4::white % alpha);
- fallback_image->addTextureStats( (F32)(interior.getWidth() * interior.getHeight()) );
+ mFallbackImage->draw(interior.mLeft, interior.mBottom, interior.getWidth(), interior.getHeight(), LLColor4::white % alpha);
}
else
{
diff --git a/indra/newview/llcolorswatch.h b/indra/newview/llcolorswatch.h
index 5bdd1712d2..df907567ab 100755
--- a/indra/newview/llcolorswatch.h
+++ b/indra/newview/llcolorswatch.h
@@ -30,16 +30,13 @@
#include "lluictrl.h"
#include "v4color.h"
#include "llfloater.h"
-#include "llviewertexture.h"
#include "lltextbox.h"
//
// Classes
//
class LLColor4;
-class LLTextBox;
class LLFloaterColorPicker;
-class LLViewerTexture;
class LLColorSwatchCtrl
: public LLUICtrl
@@ -87,7 +84,7 @@ public:
void setCanApplyImmediately(BOOL apply) { mCanApplyImmediately = apply; }
void setOnCancelCallback(commit_callback_t cb) { mOnCancelCallback = cb; }
void setOnSelectCallback(commit_callback_t cb) { mOnSelectCallback = cb; }
- void setFallbackImageName(const std::string& name) { mFallbackImageName = name; }
+ void setFallbackImage(LLPointer<LLUIImage> image) { mFallbackImage = image; }
void showPicker(BOOL take_focus);
@@ -103,20 +100,20 @@ public:
void closeFloaterColorPicker();
protected:
- BOOL mValid;
- LLColor4 mColor;
- LLUIColor mBorderColor;
- LLTextBox* mCaption;
- LLHandle<LLFloater> mPickerHandle;
- LLViewBorder* mBorder;
- BOOL mCanApplyImmediately;
- commit_callback_t mOnCancelCallback;
- commit_callback_t mOnSelectCallback;
- S32 mLabelWidth;
- S32 mLabelHeight;
+ bool mValid;
+ LLColor4 mColor;
+ LLUIColor mBorderColor;
+ LLTextBox* mCaption;
+ LLHandle<LLFloater> mPickerHandle;
+ class LLViewBorder* mBorder;
+ bool mCanApplyImmediately;
+ commit_callback_t mOnCancelCallback,
+ mOnSelectCallback;
+ S32 mLabelWidth,
+ mLabelHeight;
LLPointer<LLUIImage> mAlphaGradientImage;
- std::string mFallbackImageName;
+ LLPointer<LLUIImage> mFallbackImage;
};
#endif // LL_LLBUTTON_H
diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp
index d70d575eab..055a69727e 100755
--- a/indra/newview/llcompilequeue.cpp
+++ b/indra/newview/llcompilequeue.cpp
@@ -45,7 +45,6 @@
#include "llviewerobject.h"
#include "llviewerobjectlist.h"
#include "llviewerregion.h"
-#include "lscript_rt_interface.h"
#include "llviewercontrol.h"
#include "llviewerobject.h"
#include "llviewerregion.h"
@@ -154,7 +153,7 @@ void LLFloaterScriptQueue::onCloseBtn(void* user_data)
void LLFloaterScriptQueue::addObject(const LLUUID& id)
{
- mObjectIDs.put(id);
+ mObjectIDs.push_back(id);
}
BOOL LLFloaterScriptQueue::start()
@@ -163,7 +162,7 @@ BOOL LLFloaterScriptQueue::start()
LLStringUtil::format_map_t args;
args["[START]"] = mStartString;
- args["[COUNT]"] = llformat ("%d", mObjectIDs.count());
+ args["[COUNT]"] = llformat ("%d", mObjectIDs.size());
buffer = getString ("Starting", args);
getChild<LLScrollListCtrl>("queue output")->addSimpleElement(buffer, ADD_BOTTOM);
@@ -173,18 +172,18 @@ BOOL LLFloaterScriptQueue::start()
BOOL LLFloaterScriptQueue::isDone() const
{
- return (mCurrentObjectID.isNull() && (mObjectIDs.count() == 0));
+ return (mCurrentObjectID.isNull() && (mObjectIDs.size() == 0));
}
// go to the next object. If no objects left, it falls out silently
// and waits to be killed by the window being closed.
BOOL LLFloaterScriptQueue::nextObject()
{
- S32 count;
+ U32 count;
BOOL successful_start = FALSE;
do
{
- count = mObjectIDs.count();
+ count = mObjectIDs.size();
llinfos << "LLFloaterScriptQueue::nextObject() - " << count
<< " objects left to process." << llendl;
mCurrentObjectID.setNull();
@@ -195,7 +194,7 @@ BOOL LLFloaterScriptQueue::nextObject()
llinfos << "LLFloaterScriptQueue::nextObject() "
<< (successful_start ? "successful" : "unsuccessful")
<< llendl;
- } while((mObjectIDs.count() > 0) && !successful_start);
+ } while((mObjectIDs.size() > 0) && !successful_start);
if(isDone() && !mDone)
{
mDone = true;
@@ -212,13 +211,13 @@ BOOL LLFloaterScriptQueue::popNext()
// get the first element off of the container, and attempt to get
// the inventory.
BOOL rv = FALSE;
- S32 count = mObjectIDs.count();
+ S32 count = mObjectIDs.size();
if(mCurrentObjectID.isNull() && (count > 0))
{
- mCurrentObjectID = mObjectIDs.get(0);
+ mCurrentObjectID = mObjectIDs.at(0);
llinfos << "LLFloaterScriptQueue::popNext() - mCurrentID: "
<< mCurrentObjectID << llendl;
- mObjectIDs.remove(0);
+ mObjectIDs.erase(mObjectIDs.begin());
LLViewerObject* obj = gObjectList.findObject(mCurrentObjectID);
if(obj)
{
@@ -306,7 +305,7 @@ void LLFloaterCompileQueue::handleInventory(LLViewerObject *viewer_object,
item->getPermissions().allowCopyBy(gAgent.getID(), gAgent.getGroupID()) )
{
LLPointer<LLViewerInventoryItem> script = new LLViewerInventoryItem(item);
- mCurrentScripts.put(script);
+ mCurrentScripts.push_back(script);
asset_item_map.insert(std::make_pair(item->getAssetUUID(), item));
}
}
@@ -388,37 +387,7 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
}
else
{
- // It's now in the file, now compile it.
- buffer = LLTrans::getString("CompileQueueDownloadedCompiling") + (": ") + data->mScriptName;
-
- // Write script to local file for compilation.
- LLFILE *fp = LLFile::fopen(filename, "wb"); /*Flawfinder: ignore*/
- if (fp)
- {
- const S32 buf_size = 65536;
- U8 copy_buf[buf_size];
-
- while (file.read(copy_buf, buf_size)) /*Flawfinder: ignore*/
- {
- if (fwrite(copy_buf, file.getLastBytesRead(), 1, fp) < 1)
- {
- // return a bad file error if we can't write the whole thing
- status = LL_ERR_CANNOT_OPEN_FILE;
- }
- }
-
- fclose(fp);
- }
- else
- {
- llerrs << "Unable to find object to compile" << llendl;
- }
-
- // TODO: babbage: No compile if no cap.
- queue->compile(filename, data->mItemId);
-
- // Delete it after we're done compiling?
- LLFile::remove(filename);
+ buffer = LLTrans::getString("CompileQueueServiceUnavailable") + (": ") + data->mScriptName;
}
}
}
@@ -455,138 +424,6 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
delete data;
}
-// static
-void LLFloaterCompileQueue::onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
-{
- llinfos << "LLFloaterCompileQueue::onSaveTextComplete()" << llendl;
- if (status)
- {
- llwarns << "Unable to save text for script." << llendl;
- LLSD args;
- args["REASON"] = std::string(LLAssetStorage::getErrorString(status));
- LLNotificationsUtil::add("CompileQueueSaveText", args);
- }
-}
-
-// static
-void LLFloaterCompileQueue::onSaveBytecodeComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
-{
- llinfos << "LLFloaterCompileQueue::onSaveBytecodeComplete()" << llendl;
- LLCompileQueueData* data = (LLCompileQueueData*)user_data;
- LLFloaterCompileQueue* queue = LLFloaterReg::findTypedInstance<LLFloaterCompileQueue>("compile_queue", data->mQueueID);
- if(queue && (0 == status) && data)
- {
- queue->saveItemByItemID(data->mItemId);
- queue->removeItemByItemID(data->mItemId);
- }
- else
- {
- llwarns << "Unable to save bytecode for script." << llendl;
- LLSD args;
- args["REASON"] = std::string(LLAssetStorage::getErrorString(status));
- LLNotificationsUtil::add("CompileQueueSaveBytecode", args);
- }
- delete data;
- data = NULL;
-}
-
-// compile the file given and save it out.
-void LLFloaterCompileQueue::compile(const std::string& filename,
- const LLUUID& item_id)
-{
- LLUUID new_asset_id;
- LLTransactionID tid;
- tid.generate();
- new_asset_id = tid.makeAssetID(gAgent.getSecureSessionID());
-
- std::string uuid_string;
- new_asset_id.toString(uuid_string);
- std::string dst_filename;
- dst_filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE,uuid_string) + ".lso";
- std::string err_filename;
- err_filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE,uuid_string) + ".out";
-
- gAssetStorage->storeAssetData(filename, tid,
- LLAssetType::AT_LSL_TEXT,
- &onSaveTextComplete, NULL, FALSE);
-
- const BOOL compile_to_mono = FALSE;
- if(!lscript_compile(filename.c_str(), dst_filename.c_str(),
- err_filename.c_str(), compile_to_mono,
- uuid_string.c_str(), gAgent.isGodlike()))
- {
- llwarns << "compile failed" << llendl;
- removeItemByItemID(item_id);
- }
- else
- {
- llinfos << "compile successful." << llendl;
-
- // Save LSL bytecode
- LLCompileQueueData* data = new LLCompileQueueData(getKey().asUUID(), item_id);
- gAssetStorage->storeAssetData(dst_filename, new_asset_id,
- LLAssetType::AT_LSL_BYTECODE,
- &LLFloaterCompileQueue::onSaveBytecodeComplete,
- (void*)data, FALSE);
- }
-}
-
-void LLFloaterCompileQueue::removeItemByItemID(const LLUUID& asset_id)
-{
- llinfos << "LLFloaterCompileQueue::removeItemByAssetID()" << llendl;
- for(S32 i = 0; i < mCurrentScripts.count(); )
- {
- if(asset_id == mCurrentScripts.get(i)->getUUID())
- {
- mCurrentScripts.remove(i);
- }
- else
- {
- ++i;
- }
- }
- if(mCurrentScripts.count() == 0)
- {
- nextObject();
- }
-}
-
-const LLInventoryItem* LLFloaterCompileQueue::findItemByItemID(const LLUUID& asset_id) const
-{
- LLInventoryItem* result = NULL;
- S32 count = mCurrentScripts.count();
- for(S32 i = 0; i < count; ++i)
- {
- if(asset_id == mCurrentScripts.get(i)->getUUID())
- {
- result = mCurrentScripts.get(i);
- }
- }
- return result;
-}
-
-void LLFloaterCompileQueue::saveItemByItemID(const LLUUID& asset_id)
-{
- llinfos << "LLFloaterCompileQueue::saveItemByAssetID()" << llendl;
- LLViewerObject* viewer_object = gObjectList.findObject(mCurrentObjectID);
- if(viewer_object)
- {
- S32 count = mCurrentScripts.count();
- for(S32 i = 0; i < count; ++i)
- {
- if(asset_id == mCurrentScripts.get(i)->getUUID())
- {
- // *FIX: this auto-resets active to TRUE. That might
- // be a bad idea.
- viewer_object->saveScript(mCurrentScripts.get(i), TRUE, false);
- }
- }
- }
- else
- {
- llwarns << "Unable to finish save!" << llendl;
- }
-}
///----------------------------------------------------------------------------
/// Class LLFloaterResetQueue
@@ -608,8 +445,7 @@ void LLFloaterResetQueue::handleInventory(LLViewerObject* viewer_obj,
{
// find all of the lsl, leaving off duplicates. We'll remove
// all matching asset uuids on compilation success.
- LLDynamicArray<const char*> names;
-
+
LLInventoryObject::object_list_t::const_iterator it = inv->begin();
LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it)
@@ -660,8 +496,6 @@ void LLFloaterRunQueue::handleInventory(LLViewerObject* viewer_obj,
{
// find all of the lsl, leaving off duplicates. We'll remove
// all matching asset uuids on compilation success.
- LLDynamicArray<const char*> names;
-
LLInventoryObject::object_list_t::const_iterator it = inv->begin();
LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it)
@@ -710,13 +544,31 @@ LLFloaterNotRunQueue::~LLFloaterNotRunQueue()
{
}
+void LLFloaterCompileQueue::removeItemByItemID(const LLUUID& asset_id)
+{
+ llinfos << "LLFloaterCompileQueue::removeItemByAssetID()" << llendl;
+ for(S32 i = 0; i < mCurrentScripts.size(); )
+ {
+ if(asset_id == mCurrentScripts.at(i)->getUUID())
+ {
+ vector_replace_with_last(mCurrentScripts, mCurrentScripts.begin() + i);
+ }
+ else
+ {
+ ++i;
+ }
+ }
+ if(mCurrentScripts.empty())
+ {
+ nextObject();
+ }
+}
+
void LLFloaterNotRunQueue::handleInventory(LLViewerObject* viewer_obj,
LLInventoryObject::object_list_t* inv)
{
// find all of the lsl, leaving off duplicates. We'll remove
// all matching asset uuids on compilation success.
- LLDynamicArray<const char*> names;
-
LLInventoryObject::object_list_t::const_iterator it = inv->begin();
LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it)
diff --git a/indra/newview/llcompilequeue.h b/indra/newview/llcompilequeue.h
index 4ddab29d00..28f4625de8 100755
--- a/indra/newview/llcompilequeue.h
+++ b/indra/newview/llcompilequeue.h
@@ -27,11 +27,9 @@
#ifndef LL_LLCOMPILEQUEUE_H
#define LL_LLCOMPILEQUEUE_H
-#include "lldarray.h"
#include "llinventory.h"
#include "llviewerobject.h"
#include "llvoinventorylistener.h"
-#include "llmap.h"
#include "lluuid.h"
#include "llfloater.h"
@@ -96,7 +94,7 @@ protected:
LLButton* mCloseBtn;
// Object Queue
- LLDynamicArray<LLUUID> mObjectIDs;
+ std::vector<LLUUID> mObjectIDs;
LLUUID mCurrentObjectID;
bool mDone;
@@ -146,24 +144,6 @@ protected:
LLAssetType::EType type,
void* user_data, S32 status, LLExtStat ext_status);
- static void onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status);
-
- static void onSaveBytecodeComplete(const LLUUID& asset_id,
- void* user_data,
- S32 status, LLExtStat ext_status);
-
- // compile the file given and save it out.
- void compile(const std::string& filename, const LLUUID& asset_id);
-
- // remove any object in mScriptScripts with the matching uuid.
- void removeItemByAssetID(const LLUUID& asset_id);
-
- // save the items indicated by the item id.
- void saveItemByItemID(const LLUUID& item_id);
-
- // find InventoryItem given item id.
- const LLInventoryItem* findItemByItemID(const LLUUID& item_id) const;
-
protected:
LLViewerInventoryItem::item_array_t mCurrentScripts;
diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp
index 7883e4cb89..7ecc572a8a 100755
--- a/indra/newview/llconversationlog.cpp
+++ b/indra/newview/llconversationlog.cpp
@@ -37,21 +37,16 @@
const int CONVERSATION_LIFETIME = 30; // lifetime of LLConversation is 30 days by spec
-struct ConversationParams
-{
- ConversationParams(time_t time)
- : mTime(time),
- mTimestamp(LLConversation::createTimestamp(time))
- {}
-
- time_t mTime;
- std::string mTimestamp;
- SessionType mConversationType;
- std::string mConversationName;
- std::string mHistoryFileName;
- LLUUID mSessionID;
- LLUUID mParticipantID;
- bool mHasOfflineIMs;
+struct ConversationParams : public LLInitParam::Block<ConversationParams>
+{
+ Mandatory<LLUnit<U64, LLUnits::Seconds> > time;
+ Mandatory<std::string> timestamp;
+ Mandatory<SessionType> conversation_type;
+ Mandatory<std::string> conversation_name,
+ history_filename;
+ Mandatory<LLUUID> session_id,
+ participant_id;
+ Mandatory<bool> has_offline_ims;
};
/************************************************************************/
@@ -59,14 +54,14 @@ struct ConversationParams
/************************************************************************/
LLConversation::LLConversation(const ConversationParams& params)
-: mTime(params.mTime),
- mTimestamp(params.mTimestamp),
- mConversationType(params.mConversationType),
- mConversationName(params.mConversationName),
- mHistoryFileName(params.mHistoryFileName),
- mSessionID(params.mSessionID),
- mParticipantID(params.mParticipantID),
- mHasOfflineIMs(params.mHasOfflineIMs)
+: mTime(params.time),
+ mTimestamp(params.timestamp),
+ mConversationType(params.conversation_type),
+ mConversationName(params.conversation_name),
+ mHistoryFileName(params.history_filename),
+ mSessionID(params.session_id),
+ mParticipantID(params.participant_id),
+ mHasOfflineIMs(params.has_offline_ims)
{
setListenIMFloaterOpened();
}
@@ -118,11 +113,11 @@ void LLConversation::onIMFloaterShown(const LLUUID& session_id)
}
// static
-const std::string LLConversation::createTimestamp(const time_t& utc_time)
+const std::string LLConversation::createTimestamp(const LLUnit<U64, LLUnits::Seconds>& utc_time)
{
std::string timeStr;
LLSD substitution;
- substitution["datetime"] = (S32) utc_time;
+ substitution["datetime"] = (S32)utc_time.value();
timeStr = "["+LLTrans::getString ("TimeMonth")+"]/["
+LLTrans::getString ("TimeDay")+"]/["
@@ -137,8 +132,8 @@ const std::string LLConversation::createTimestamp(const time_t& utc_time)
bool LLConversation::isOlderThan(U32 days) const
{
- time_t now = time_corrected();
- U32 age = (U32)((now - mTime) / SEC_PER_DAY); // age of conversation in days
+ LLUnit<U64, LLUnits::Seconds> now = time_corrected();
+ LLUnit<U32, LLUnits::Days> age = now - mTime;
return age > days;
}
@@ -485,7 +480,7 @@ bool LLConversationLog::saveToFile(const std::string& filename)
// [1343222639] 2 0 0 Ad-hoc Conference| c3g67c89-c479-4c97-b21d-32869bcfe8rc 68f1c33e-4135-3e3e-a897-8c9b23115c09 Ad-hoc Conference hash597394a0-9982-766d-27b8-c75560213b9a|
fprintf(fp, "[%lld] %d %d %d %s| %s %s %s|\n",
- (S64)conv_it->getTime(),
+ (S64)conv_it->getTime().value(),
(S32)conv_it->getConversationType(),
(S32)0,
(S32)conv_it->hasOfflineMessages(),
@@ -539,13 +534,14 @@ bool LLConversationLog::loadFromFile(const std::string& filename)
conv_id_buffer,
history_file_name);
- ConversationParams params((time_t)time);
- params.mConversationType = (SessionType)stype;
- params.mHasOfflineIMs = has_offline_ims;
- params.mConversationName = std::string(conv_name_buffer);
- params.mParticipantID = LLUUID(part_id_buffer);
- params.mSessionID = LLUUID(conv_id_buffer);
- params.mHistoryFileName = std::string(history_file_name);
+ ConversationParams params;
+ params.time(time)
+ .conversation_type((SessionType)stype)
+ .has_offline_ims(has_offline_ims)
+ .conversation_name(conv_name_buffer)
+ .participant_id(LLUUID(part_id_buffer))
+ .session_id(LLUUID(conv_id_buffer))
+ .history_filename(history_file_name);
LLConversation conversation(params);
diff --git a/indra/newview/llconversationlog.h b/indra/newview/llconversationlog.h
index 265b1f0ef0..5d94cb6497 100755
--- a/indra/newview/llconversationlog.h
+++ b/indra/newview/llconversationlog.h
@@ -55,7 +55,8 @@ public:
const LLUUID& getSessionID() const { return mSessionID; }
const LLUUID& getParticipantID() const { return mParticipantID; }
const std::string& getTimestamp() const { return mTimestamp; }
- const time_t& getTime() const { return mTime; }
+ const LLUnit<U64, LLUnits::Seconds>&
+ getTime() const { return mTime; }
bool hasOfflineMessages() const { return mHasOfflineIMs; }
void setConversationName(std::string conv_name) { mConversationName = conv_name; }
@@ -75,7 +76,7 @@ public:
/*
* returns string representation(in form of: mm/dd/yyyy hh:mm) of time when conversation was started
*/
- static const std::string createTimestamp(const time_t& utc_time);
+ static const std::string createTimestamp(const LLUnit<U64, LLUnits::Seconds>& utc_time);
private:
@@ -87,7 +88,7 @@ private:
boost::signals2::connection mIMFloaterShowedConnection;
- time_t mTime; // last interaction time
+ LLUnit<U64, LLUnits::Seconds> mTime; // last interaction time
SessionType mConversationType;
std::string mConversationName;
std::string mHistoryFileName;
diff --git a/indra/newview/llconversationloglist.cpp b/indra/newview/llconversationloglist.cpp
index 5ab108b39f..bd5e0b8f88 100755
--- a/indra/newview/llconversationloglist.cpp
+++ b/indra/newview/llconversationloglist.cpp
@@ -490,7 +490,7 @@ bool LLConversationLogListItemComparator::compare(const LLPanel* item1, const LL
if (!conversation_item1 || !conversation_item2)
{
- llerror("conversation_item1 and conversation_item2 cannot be null", 0);
+ LL_ERRS() << "conversation_item1 and conversation_item2 cannot be null" << LL_ENDL;
return true;
}
@@ -518,8 +518,8 @@ bool LLConversationLogListNameComparator::doCompare(const LLConversationLogListI
bool LLConversationLogListDateComparator::doCompare(const LLConversationLogListItem* conversation1, const LLConversationLogListItem* conversation2) const
{
- time_t date1 = conversation1->getConversation()->getTime();
- time_t date2 = conversation2->getConversation()->getTime();
+ LLUnit<U64, LLUnits::Seconds> date1 = conversation1->getConversation()->getTime();
+ LLUnit<U64, LLUnits::Seconds> date2 = conversation2->getConversation()->getTime();
const LLUUID& id1 = conversation1->getConversation()->getParticipantID();
const LLUUID& id2 = conversation2->getConversation()->getParticipantID();
diff --git a/indra/newview/lldebugmessagebox.h b/indra/newview/lldebugmessagebox.h
index 211af9e074..87a0910662 100755
--- a/indra/newview/lldebugmessagebox.h
+++ b/indra/newview/lldebugmessagebox.h
@@ -28,7 +28,6 @@
#ifndef LL_LLDEBUGMESSAGEBOX_H
#define LL_LLDEBUGMESSAGEBOX_H
-#include "lldarray.h"
#include "llfloater.h"
#include "v3math.h"
#include "lltextbox.h"
diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp
index 63dd59b020..98c1685feb 100755
--- a/indra/newview/lldebugview.cpp
+++ b/indra/newview/lldebugview.cpp
@@ -33,7 +33,6 @@
#include "llconsole.h"
#include "lltextureview.h"
#include "llresmgr.h"
-#include "imageids.h"
#include "llviewercontrol.h"
#include "llviewerwindow.h"
#include "llappviewer.h"
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 628f7f7bfb..c59ce04646 100755
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -79,7 +79,7 @@ LLTrace::MemStatHandle LLDrawable::sMemStat("LLDrawable");
// static
U32 LLDrawable::sNumZombieDrawables = 0;
F32 LLDrawable::sCurPixelAngle = 0;
-LLDynamicArray<LLPointer<LLDrawable>, 32 > LLDrawable::sDeadList;
+std::vector<LLPointer<LLDrawable> > LLDrawable::sDeadList;
#define FORCE_INVISIBLE_AREA 16.f
@@ -196,7 +196,7 @@ void LLDrawable::markDead()
// We're dead. Free up all of our references to other objects
cleanupReferences();
-// sDeadList.put(this);
+// sDeadList.push_back(this);
}
LLVOVolume* LLDrawable::getVOVolume() const
@@ -277,7 +277,7 @@ void LLDrawable::cleanupDeadDrawables()
{
/*
S32 i;
- for (i = 0; i < sDeadList.count(); i++)
+ for (i = 0; i < sDeadList.size(); i++)
{
if (sDeadList[i]->getNumRefs() > 1)
{
@@ -286,7 +286,7 @@ void LLDrawable::cleanupDeadDrawables()
}
}
*/
- sDeadList.reset();
+ sDeadList.clear();
}
S32 LLDrawable::findReferences(LLDrawable *drawablep)
diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h
index b7c5aeb5a8..08fbd7d211 100755
--- a/indra/newview/lldrawable.h
+++ b/indra/newview/lldrawable.h
@@ -38,7 +38,6 @@
#include "llvector4a.h"
#include "llquaternion.h"
#include "xform.h"
-#include "lldarray.h"
#include "llviewerobject.h"
#include "llrect.h"
#include "llappviewer.h" // for gFrameTimeSeconds
@@ -310,7 +309,7 @@ private:
LLVector3 mCurrentScale;
static U32 sNumZombieDrawables;
- static LLDynamicArray<LLPointer<LLDrawable>, 32> sDeadList;
+ static std::vector<LLPointer<LLDrawable> > sDeadList;
} LL_ALIGN_POSTFIX(16);
diff --git a/indra/newview/lldrawpoolsky.cpp b/indra/newview/lldrawpoolsky.cpp
index 7f7d9f65c6..edc368c29e 100755
--- a/indra/newview/lldrawpoolsky.cpp
+++ b/indra/newview/lldrawpoolsky.cpp
@@ -28,8 +28,6 @@
#include "lldrawpoolsky.h"
-#include "imageids.h"
-
#include "llagent.h"
#include "lldrawable.h"
#include "llface.h"
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 6d90667194..fc531a0c74 100755
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -727,7 +727,7 @@ void LLFavoritesBarCtrl::updateButtons()
int first_changed_item_index = 0;
int rightest_point = getRect().mRight - mMoreTextBox->getRect().getWidth();
//lets find first changed button
- while (child_it != childs->end() && first_changed_item_index < mItems.count())
+ while (child_it != childs->end() && first_changed_item_index < mItems.size())
{
LLFavoriteLandmarkButton* button = dynamic_cast<LLFavoriteLandmarkButton*> (*child_it);
if (button)
@@ -749,7 +749,7 @@ void LLFavoritesBarCtrl::updateButtons()
}
// now first_changed_item_index should contains a number of button that need to change
- if (first_changed_item_index <= mItems.count())
+ if (first_changed_item_index <= mItems.size())
{
// Rebuild the buttons only
// child_list_t is a linked list, so safe to erase from the middle if we pre-increment the iterator
@@ -787,7 +787,7 @@ void LLFavoritesBarCtrl::updateButtons()
//last_right_edge is saving coordinates
LLButton* last_new_button = NULL;
int j = first_changed_item_index;
- for (; j < mItems.count(); j++)
+ for (; j < mItems.size(); j++)
{
last_new_button = createButton(mItems[j], button_params, last_right_edge);
if (!last_new_button)
@@ -801,7 +801,7 @@ void LLFavoritesBarCtrl::updateButtons()
}
mFirstDropDownItem = j;
// Chevron button
- if (mFirstDropDownItem < mItems.count())
+ if (mFirstDropDownItem < mItems.size())
{
// if updateButton had been called it means:
//or there are some new favorites, or width had been changed
@@ -963,9 +963,9 @@ void LLFavoritesBarCtrl::updateMenuItems(LLToggleableMenu* menu)
U32 widest_item = 0;
- for (S32 i = mFirstDropDownItem; i < mItems.count(); i++)
+ for (S32 i = mFirstDropDownItem; i < mItems.size(); i++)
{
- LLViewerInventoryItem* item = mItems.get(i);
+ LLViewerInventoryItem* item = mItems.at(i);
const std::string& item_name = item->getName();
LLFavoriteLandmarkMenuItem::Params item_params;
@@ -1221,12 +1221,12 @@ BOOL LLFavoritesBarCtrl::isClipboardPasteable() const
return FALSE;
}
- LLDynamicArray<LLUUID> objects;
+ std::vector<LLUUID> objects;
LLClipboard::instance().pasteFromClipboard(objects);
- S32 count = objects.count();
+ S32 count = objects.size();
for(S32 i = 0; i < count; i++)
{
- const LLUUID &item_id = objects.get(i);
+ const LLUUID &item_id = objects.at(i);
// Can't paste folders
const LLInventoryCategory *cat = gInventory.getCategory(item_id);
@@ -1250,13 +1250,13 @@ void LLFavoritesBarCtrl::pasteFromClipboard() const
if(model && isClipboardPasteable())
{
LLInventoryItem* item = NULL;
- LLDynamicArray<LLUUID> objects;
+ std::vector<LLUUID> objects;
LLClipboard::instance().pasteFromClipboard(objects);
- S32 count = objects.count();
+ S32 count = objects.size();
LLUUID parent_id(mFavoriteFolderId);
for(S32 i = 0; i < count; i++)
{
- item = model->getItem(objects.get(i));
+ item = model->getItem(objects.at(i));
if (item)
{
copy_inventory_item(
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index ddb9d3bc43..c05f27d2ee 100755
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -36,7 +36,6 @@
#include "llsys.h"
#include "llgl.h"
-#include "llsecondlifeurls.h"
#include "llappviewer.h"
#include "llhttpclient.h"
diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp
index e2850f5181..2e1afc68b4 100755
--- a/indra/newview/llfirstuse.cpp
+++ b/indra/newview/llfirstuse.cpp
@@ -96,6 +96,11 @@ void LLFirstUse::newInventory(bool enable)
// firstUseNotification("FirstInventoryOffer", enable, "HintInventory", LLSD(), LLSD().with("target", "inventory_btn").with("direction", "left"));
}
+// first clean starts at 3 AM
+const S32 SANDBOX_FIRST_CLEAN_HOUR = 3;
+// clean every <n> hours
+const S32 SANDBOX_CLEAN_FREQ = 12;
+
// static
void LLFirstUse::useSandbox()
{
diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index 93502daac7..229a55ad23 100755
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -34,7 +34,6 @@
// Viewer includes
#include "llagent.h"
#include "llappviewer.h"
-#include "llsecondlifeurls.h"
#include "llvoiceclient.h"
#include "lluictrlfactory.h"
#include "llviewertexteditor.h"
diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp
index 39b6e465f3..086da158ad 100755
--- a/indra/newview/llfloaterbulkpermission.cpp
+++ b/indra/newview/llfloaterbulkpermission.cpp
@@ -36,7 +36,6 @@
#include "llviewerobject.h"
#include "llviewerobjectlist.h"
#include "llviewerregion.h"
-#include "lscript_rt_interface.h"
#include "llviewercontrol.h"
#include "llviewerinventory.h"
#include "llviewerobject.h"
@@ -75,17 +74,17 @@ void LLFloaterBulkPermission::doApply()
class ModifiableGatherer : public LLSelectedNodeFunctor
{
public:
- ModifiableGatherer(LLDynamicArray<LLUUID>& q) : mQueue(q) {}
+ ModifiableGatherer(std::vector<LLUUID>& q) : mQueue(q) { mQueue.reserve(32); }
virtual bool apply(LLSelectNode* node)
{
if( node->allowOperationOnNode(PERM_MODIFY, GP_OBJECT_MANIPULATE) )
{
- mQueue.put(node->getObject()->getID());
+ mQueue.push_back(node->getObject()->getID());
}
return true;
}
private:
- LLDynamicArray<LLUUID>& mQueue;
+ std::vector<LLUUID>& mQueue;
};
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("queue output");
list->deleteAllItems();
@@ -169,7 +168,7 @@ void LLFloaterBulkPermission::onCommitCopy()
BOOL LLFloaterBulkPermission::start()
{
- // note: number of top-level objects to modify is mObjectIDs.count().
+ // note: number of top-level objects to modify is mObjectIDs.size().
getChild<LLScrollListCtrl>("queue output")->setCommentText(getString("start_text"));
return nextObject();
}
@@ -181,7 +180,7 @@ BOOL LLFloaterBulkPermission::nextObject()
BOOL successful_start = FALSE;
do
{
- count = mObjectIDs.count();
+ count = mObjectIDs.size();
//llinfos << "Objects left to process = " << count << llendl;
mCurrentObjectID.setNull();
if(count > 0)
@@ -189,7 +188,7 @@ BOOL LLFloaterBulkPermission::nextObject()
successful_start = popNext();
//llinfos << (successful_start ? "successful" : "unsuccessful") << llendl;
}
- } while((mObjectIDs.count() > 0) && !successful_start);
+ } while((mObjectIDs.size() > 0) && !successful_start);
if(isDone() && !mDone)
{
@@ -205,12 +204,12 @@ BOOL LLFloaterBulkPermission::popNext()
{
// get the head element from the container, and attempt to get its inventory.
BOOL rv = FALSE;
- S32 count = mObjectIDs.count();
+ S32 count = mObjectIDs.size();
if(mCurrentObjectID.isNull() && (count > 0))
{
- mCurrentObjectID = mObjectIDs.get(0);
+ mCurrentObjectID = mObjectIDs.at(0);
//llinfos << "mCurrentID: " << mCurrentObjectID << llendl;
- mObjectIDs.remove(0);
+ mObjectIDs.erase(mObjectIDs.begin());
LLViewerObject* obj = gObjectList.findObject(mCurrentObjectID);
if(obj)
{
diff --git a/indra/newview/llfloaterbulkpermission.h b/indra/newview/llfloaterbulkpermission.h
index 7dd05df7ee..88532ed124 100755
--- a/indra/newview/llfloaterbulkpermission.h
+++ b/indra/newview/llfloaterbulkpermission.h
@@ -28,11 +28,9 @@
#ifndef LL_LLBULKPERMISSION_H
#define LL_LLBULKPERMISSION_H
-#include "lldarray.h"
#include "llinventory.h"
#include "llviewerobject.h"
#include "llvoinventorylistener.h"
-#include "llmap.h"
#include "lluuid.h"
#include "llfloater.h"
@@ -78,7 +76,7 @@ private:
void onUncheckAll() { doCheckUncheckAll(FALSE); }
// returns true if this is done
- BOOL isDone() const { return (mCurrentObjectID.isNull() || (mObjectIDs.count() == 0)); }
+ BOOL isDone() const { return (mCurrentObjectID.isNull() || (mObjectIDs.size() == 0)); }
//Read the settings and Apply the permissions
void doApply();
@@ -90,7 +88,7 @@ private:
LLButton* mCloseBtn;
// Object Queue
- LLDynamicArray<LLUUID> mObjectIDs;
+ std::vector<LLUUID> mObjectIDs;
LLUUID mCurrentObjectID;
BOOL mDone;
diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp
index 6aebe85e7a..9425f5645e 100755
--- a/indra/newview/llfloatercolorpicker.cpp
+++ b/indra/newview/llfloatercolorpicker.cpp
@@ -162,12 +162,7 @@ void LLFloaterColorPicker::createUI ()
// create palette
for ( S32 each = 0; each < numPaletteColumns * numPaletteRows; ++each )
{
- std::ostringstream codec;
- codec << "ColorPaletteEntry" << std::setfill ( '0' ) << std::setw ( 2 ) << each + 1;
-
- // argh!
- const std::string s ( codec.str () );
- mPalette.push_back ( new LLColor4 ( LLUIColorTable::instance().getColor ( s ) ) );
+ mPalette.push_back(new LLColor4(LLUIColorTable::instance().getColor(llformat("ColorPaletteEntry%02d", each + 1))));
}
}
diff --git a/indra/newview/llfloatercolorpicker.h b/indra/newview/llfloatercolorpicker.h
index bab0617712..d4d22b643a 100755
--- a/indra/newview/llfloatercolorpicker.h
+++ b/indra/newview/llfloatercolorpicker.h
@@ -33,7 +33,6 @@
#include "llpointer.h"
#include "llcolorswatch.h"
#include "llspinctrl.h"
-#include "lltextureentry.h"
class LLButton;
class LLLineEditor;
@@ -121,7 +120,7 @@ class LLFloaterColorPicker
void onClickPipette ( );
static void onTextCommit ( LLUICtrl* ctrl, void* data );
static void onImmediateCheck ( LLUICtrl* ctrl, void* data );
- void onColorSelect( const LLTextureEntry& te );
+ void onColorSelect( const class LLTextureEntry& te );
private:
// draws color selection palette
void drawPalette ();
@@ -171,7 +170,7 @@ class LLFloaterColorPicker
const S32 mPaletteRegionHeight;
// image used to compose color grid
- LLPointer<LLViewerTexture> mRGBImage;
+ LLPointer<class LLViewerTexture> mRGBImage;
// current swatch in use
LLColorSwatchCtrl* mSwatch;
diff --git a/indra/newview/llfloaterevent.cpp b/indra/newview/llfloaterevent.cpp
index a6dafda3e6..3e303e0932 100755
--- a/indra/newview/llfloaterevent.cpp
+++ b/indra/newview/llfloaterevent.cpp
@@ -45,7 +45,6 @@
#include "llmediactrl.h"
#include "llfloaterworldmap.h"
#include "llinventorymodel.h"
-#include "llsecondlifeurls.h"
#include "llslurl.h"
#include "lltextbox.h"
#include "lltexteditor.h"
diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp
index 56051ff684..1452d53265 100755
--- a/indra/newview/llfloatergesture.cpp
+++ b/indra/newview/llfloatergesture.cpp
@@ -400,9 +400,9 @@ bool LLFloaterGesture::isActionEnabled(const LLSD& command)
if(!LLClipboard::instance().hasContents())
return false;
- LLDynamicArray<LLUUID> ids;
+ std::vector<LLUUID> ids;
LLClipboard::instance().pasteFromClipboard(ids);
- for(LLDynamicArray<LLUUID>::iterator it = ids.begin(); it != ids.end(); it++)
+ for(std::vector<LLUUID>::iterator it = ids.begin(); it != ids.end(); it++)
{
LLInventoryItem* item = gInventory.getItem(*it);
@@ -514,7 +514,7 @@ void LLFloaterGesture::onCopyPasteAction(const LLSD& command)
}
else if ("paste" == command_name)
{
- LLDynamicArray<LLUUID> ids;
+ std::vector<LLUUID> ids;
LLClipboard::instance().pasteFromClipboard(ids);
if(ids.empty() || !gInventory.isCategoryComplete(mGestureFolderID))
return;
@@ -522,7 +522,7 @@ void LLFloaterGesture::onCopyPasteAction(const LLSD& command)
llassert(gesture_dir);
LLPointer<GestureCopiedCallback> cb = new GestureCopiedCallback(this);
- for(LLDynamicArray<LLUUID>::iterator it = ids.begin(); it != ids.end(); it++)
+ for(std::vector<LLUUID>::iterator it = ids.begin(); it != ids.end(); it++)
{
LLInventoryItem* item = gInventory.getItem(*it);
if(gesture_dir && item && item->getInventoryType() == LLInventoryType::IT_GESTURE)
diff --git a/indra/newview/llfloatergroups.cpp b/indra/newview/llfloatergroups.cpp
index d84364a68a..dbe7fee108 100755
--- a/indra/newview/llfloatergroups.cpp
+++ b/indra/newview/llfloatergroups.cpp
@@ -171,7 +171,7 @@ void LLPanelGroups::reset()
{
group_list->operateOnAll(LLCtrlListInterface::OP_DELETE);
}
- getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count()));
+ getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.size()));
getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",gMaxAgentGroups));
init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID());
@@ -182,7 +182,7 @@ BOOL LLPanelGroups::postBuild()
{
childSetCommitCallback("group list", onGroupList, this);
- getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count()));
+ getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.size()));
getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",gMaxAgentGroups));
LLScrollListCtrl *list = getChild<LLScrollListCtrl>("group list");
@@ -341,7 +341,7 @@ void LLPanelGroups::onGroupList(LLUICtrl* ctrl, void* userdata)
void init_group_list(LLScrollListCtrl* group_list, const LLUUID& highlight_id, U64 powers_mask)
{
- S32 count = gAgent.mGroups.count();
+ S32 count = gAgent.mGroups.size();
LLUUID id;
if (!group_list) return;
@@ -349,8 +349,8 @@ void init_group_list(LLScrollListCtrl* group_list, const LLUUID& highlight_id, U
for(S32 i = 0; i < count; ++i)
{
- id = gAgent.mGroups.get(i).mID;
- LLGroupData* group_datap = &gAgent.mGroups.get(i);
+ id = gAgent.mGroups.at(i).mID;
+ LLGroupData* group_datap = &gAgent.mGroups.at(i);
if ((powers_mask == GP_ALL_POWERS) || ((group_datap->mPowers & powers_mask) != 0))
{
std::string style = "NORMAL";
diff --git a/indra/newview/llfloaterlandholdings.cpp b/indra/newview/llfloaterlandholdings.cpp
index 98e9b74278..ea94dcd7b6 100755
--- a/indra/newview/llfloaterlandholdings.cpp
+++ b/indra/newview/llfloaterlandholdings.cpp
@@ -72,19 +72,19 @@ BOOL LLFloaterLandHoldings::postBuild()
grant_list->sortByColumnIndex(0, TRUE);
grant_list->setDoubleClickCallback(onGrantList, this);
- S32 count = gAgent.mGroups.count();
+ S32 count = gAgent.mGroups.size();
for(S32 i = 0; i < count; ++i)
{
- LLUUID id(gAgent.mGroups.get(i).mID);
+ LLUUID id(gAgent.mGroups.at(i).mID);
LLSD element;
element["id"] = id;
element["columns"][0]["column"] = "group";
- element["columns"][0]["value"] = gAgent.mGroups.get(i).mName;
+ element["columns"][0]["value"] = gAgent.mGroups.at(i).mName;
element["columns"][0]["font"] = "SANSSERIF";
LLUIString areastr = getString("area_string");
- areastr.setArg("[AREA]", llformat("%d", gAgent.mGroups.get(i).mContribution));
+ areastr.setArg("[AREA]", llformat("%d", gAgent.mGroups.at(i).mContribution));
element["columns"][1]["column"] = "area";
element["columns"][1]["value"] = areastr;
element["columns"][1]["font"] = "SANSSERIF";
diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp
index 29a3e6ac3a..1e9cf62067 100755
--- a/indra/newview/llfloateroutbox.cpp
+++ b/indra/newview/llfloateroutbox.cpp
@@ -281,7 +281,7 @@ void LLFloaterOutbox::setStatusString(const std::string& statusString)
void LLFloaterOutbox::updateFolderCount()
{
- S32 item_count = 0;
+ U32 item_count = 0;
if (mOutboxId.notNull())
{
@@ -289,7 +289,7 @@ void LLFloaterOutbox::updateFolderCount()
LLInventoryModel::item_array_t * items;
gInventory.getDirectDescendentsOf(mOutboxId, cats, items);
- item_count = cats->count() + items->count();
+ item_count = cats->size() + items->size();
}
mOutboxItemCount = item_count;
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 55b03986d0..9cb7d95e61 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -37,7 +37,6 @@
#include "message.h"
#include "llfloaterautoreplacesettings.h"
#include "llagent.h"
-#include "llavatarconstants.h"
#include "llcheckboxctrl.h"
#include "llcolorswatch.h"
#include "llcombobox.h"
@@ -113,6 +112,10 @@
const F32 MAX_USER_FAR_CLIP = 512.f;
const F32 MIN_USER_FAR_CLIP = 64.f;
const F32 BANDWIDTH_UPDATER_TIMEOUT = 0.5f;
+char const* const VISIBILITY_DEFAULT = "default";
+char const* const VISIBILITY_HIDDEN = "hidden";
+char const* const VISIBILITY_VISIBLE = "visible";
+char const* const VISIBILITY_INVISIBLE = "invisible";
//control value for middle mouse as talk2push button
const static std::string MIDDLE_MOUSE_CV = "MiddleMouse";
diff --git a/indra/newview/llfloatertopobjects.h b/indra/newview/llfloatertopobjects.h
index 6edc46cf79..28d2aa58e2 100755
--- a/indra/newview/llfloatertopobjects.h
+++ b/indra/newview/llfloatertopobjects.h
@@ -31,6 +31,22 @@
class LLUICtrl;
+// Bits for simulator performance query flags
+enum LAND_STAT_FLAGS
+{
+ STAT_FILTER_BY_PARCEL = 0x00000001,
+ STAT_FILTER_BY_OWNER = 0x00000002,
+ STAT_FILTER_BY_OBJECT = 0x00000004,
+ STAT_FILTER_BY_PARCEL_NAME = 0x00000008,
+ STAT_REQUEST_LAST_ENTRY = 0x80000000,
+};
+
+enum LAND_STAT_REPORT_TYPE
+{
+ STAT_REPORT_TOP_SCRIPTS = 0,
+ STAT_REPORT_TOP_COLLIDERS
+};
+
class LLFloaterTopObjects : public LLFloater
{
friend class LLFloaterReg;
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index 137b5446cf..3f947ce32c 100755
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -570,9 +570,9 @@ void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id )
buildLandmarkIDLists();
BOOL found = FALSE;
S32 idx;
- for (idx = 0; idx < mLandmarkItemIDList.count(); idx++)
+ for (idx = 0; idx < mLandmarkItemIDList.size(); idx++)
{
- if ( mLandmarkItemIDList.get(idx) == landmark_item_id)
+ if ( mLandmarkItemIDList.at(idx) == landmark_item_id)
{
found = TRUE;
break;
@@ -581,13 +581,13 @@ void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id )
if (found && iface->setCurrentByID( landmark_item_id ) )
{
- LLUUID asset_id = mLandmarkAssetIDList.get( idx );
+ LLUUID asset_id = mLandmarkAssetIDList.at( idx );
std::string name;
LLComboBox* combo = getChild<LLComboBox>( "landmark combo");
if (combo) name = combo->getSimple();
mTrackedStatus = LLTracker::TRACKING_LANDMARK;
- LLTracker::trackLandmark(mLandmarkAssetIDList.get( idx ), // assetID
- mLandmarkItemIDList.get( idx ), // itemID
+ LLTracker::trackLandmark(mLandmarkAssetIDList.at( idx ), // assetID
+ mLandmarkItemIDList.at( idx ), // itemID
name); // name
if( asset_id != sHomeID )
@@ -911,15 +911,15 @@ void LLFloaterWorldMap::buildLandmarkIDLists()
list->operateOnSelection(LLCtrlListInterface::OP_DELETE);
}
- mLandmarkItemIDList.reset();
- mLandmarkAssetIDList.reset();
+ mLandmarkItemIDList.clear();
+ mLandmarkAssetIDList.clear();
// Get all of the current landmarks
- mLandmarkAssetIDList.put( LLUUID::null );
- mLandmarkItemIDList.put( LLUUID::null );
+ mLandmarkAssetIDList.push_back( LLUUID::null );
+ mLandmarkItemIDList.push_back( LLUUID::null );
- mLandmarkAssetIDList.put( sHomeID );
- mLandmarkItemIDList.put( sHomeID );
+ mLandmarkAssetIDList.push_back( sHomeID );
+ mLandmarkItemIDList.push_back( sHomeID );
LLInventoryModel::cat_array_t cats;
LLInventoryModel::item_array_t items;
@@ -932,15 +932,18 @@ void LLFloaterWorldMap::buildLandmarkIDLists()
std::sort(items.begin(), items.end(), LLViewerInventoryItem::comparePointers());
- S32 count = items.count();
+ mLandmarkAssetIDList.reserve(mLandmarkAssetIDList.size() + items.size());
+ mLandmarkItemIDList.reserve(mLandmarkItemIDList.size() + items.size());
+
+ S32 count = items.size();
for(S32 i = 0; i < count; ++i)
{
- LLInventoryItem* item = items.get(i);
+ LLInventoryItem* item = items.at(i);
list->addSimpleElement(item->getName(), ADD_BOTTOM, item->getUUID());
- mLandmarkAssetIDList.put( item->getAssetUUID() );
- mLandmarkItemIDList.put( item->getUUID() );
+ mLandmarkAssetIDList.push_back( item->getAssetUUID() );
+ mLandmarkItemIDList.push_back( item->getUUID() );
}
list->selectFirstItem();
diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h
index e3b83b2579..84ca5a7a71 100755
--- a/indra/newview/llfloaterworldmap.h
+++ b/indra/newview/llfloaterworldmap.h
@@ -32,7 +32,6 @@
#ifndef LL_LLFLOATERWORLDMAP_H
#define LL_LLFLOATERWORLDMAP_H
-#include "lldarray.h"
#include "llfloater.h"
#include "llhudtext.h"
#include "llmapimagetype.h"
@@ -166,8 +165,8 @@ private:
// enable/disable teleport destination coordinates
void enableTeleportCoordsDisplay( bool enabled );
- LLDynamicArray<LLUUID> mLandmarkAssetIDList;
- LLDynamicArray<LLUUID> mLandmarkItemIDList;
+ std::vector<LLUUID> mLandmarkAssetIDList;
+ std::vector<LLUUID> mLandmarkItemIDList;
static const LLUUID sHomeID;
diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp
index 16ed3f990c..1771a8f491 100755
--- a/indra/newview/llfriendcard.cpp
+++ b/indra/newview/llfriendcard.cpp
@@ -67,10 +67,10 @@ inline const std::string get_friend_all_subfolder_name()
void move_from_to_arrays(LLInventoryModel::cat_array_t& from, LLInventoryModel::cat_array_t& to)
{
- while (from.count() > 0)
+ while (from.size() > 0)
{
- to.put(from.get(0));
- from.remove(0);
+ to.push_back(from.at(0));
+ from.erase(from.begin());
}
}
@@ -82,7 +82,7 @@ const LLUUID& get_folder_uuid(const LLUUID& parentFolderUUID, LLInventoryCollect
gInventory.collectDescendentsIf(parentFolderUUID, cats, items,
LLInventoryModel::EXCLUDE_TRASH, matchFunctor);
- S32 cats_count = cats.count();
+ S32 cats_count = cats.size();
if (cats_count > 1)
{
@@ -92,7 +92,7 @@ const LLUUID& get_folder_uuid(const LLUUID& parentFolderUUID, LLInventoryCollect
<< LL_ENDL;
}
- return (cats_count >= 1) ? cats.get(0)->getUUID() : LLUUID::null;
+ return (cats_count >= 1) ? cats.at(0)->getUUID() : LLUUID::null;
}
/**
@@ -207,7 +207,7 @@ bool LLFriendCardsManager::isItemInAnyFriendsList(const LLViewerInventoryItem* i
LLInventoryModel::item_array_t items;
findMatchedFriendCards(item->getCreatorUUID(), items);
- return items.count() > 0;
+ return items.size() > 0;
}
@@ -242,9 +242,9 @@ bool LLFriendCardsManager::isObjDirectDescendentOfCategory(const LLInventoryObje
{
LLUUID creator_id = item->getCreatorUUID();
LLViewerInventoryItem* cur_item = NULL;
- for ( S32 i = items->count() - 1; i >= 0; --i )
+ for ( S32 i = items->size() - 1; i >= 0; --i )
{
- cur_item = items->get(i);
+ cur_item = items->at(i);
if ( creator_id == cur_item->getCreatorUUID() )
{
result = true;
@@ -259,9 +259,9 @@ bool LLFriendCardsManager::isObjDirectDescendentOfCategory(const LLInventoryObje
// Note: UUID's of compared items also may be not equal.
std::string obj_name = obj->getName();
LLViewerInventoryItem* cur_item = NULL;
- for ( S32 i = items->count() - 1; i >= 0; --i )
+ for ( S32 i = items->size() - 1; i >= 0; --i )
{
- cur_item = items->get(i);
+ cur_item = items->at(i);
if ( obj->getType() != cur_item->getType() )
continue;
if ( obj_name == cur_item->getName() )
@@ -279,9 +279,9 @@ bool LLFriendCardsManager::isObjDirectDescendentOfCategory(const LLInventoryObje
// then return true. Note: UUID's of compared items also may be not equal.
std::string obj_name = obj->getName();
LLViewerInventoryCategory* cur_cat = NULL;
- for ( S32 i = cats->count() - 1; i >= 0; --i )
+ for ( S32 i = cats->size() - 1; i >= 0; --i )
{
- cur_cat = cats->get(i);
+ cur_cat = cats->at(i);
if ( obj->getType() != cur_cat->getType() )
continue;
if ( obj_name == cur_cat->getName() )
@@ -381,10 +381,10 @@ void LLFriendCardsManager::findMatchedFriendCards(const LLUUID& avatarID, LLInve
LLInventoryModel::cat_array_t subFolders;
subFolders.push_back(friendFolder);
- while (subFolders.count() > 0)
+ while (subFolders.size() > 0)
{
- LLViewerInventoryCategory* cat = subFolders.get(0);
- subFolders.remove(0);
+ LLViewerInventoryCategory* cat = subFolders.at(0);
+ subFolders.erase(subFolders.begin());
gInventory.collectDescendentsIf(cat->getUUID(), cats, items,
LLInventoryModel::EXCLUDE_TRASH, matchFunctor);
diff --git a/indra/newview/llgiveinventory.cpp b/indra/newview/llgiveinventory.cpp
index 72bea8db10..2ecd9fa7f7 100755
--- a/indra/newview/llgiveinventory.cpp
+++ b/indra/newview/llgiveinventory.cpp
@@ -248,11 +248,11 @@ bool LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent,
items,
LLInventoryModel::EXCLUDE_TRASH,
giveable);
- S32 count = cats.count();
+ S32 count = cats.size();
bool complete = true;
for(S32 i = 0; i < count; ++i)
{
- if (!gInventory.isCategoryComplete(cats.get(i)->getUUID()))
+ if (!gInventory.isCategoryComplete(cats.at(i)->getUUID()))
{
complete = false;
break;
@@ -263,7 +263,7 @@ bool LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent,
LLNotificationsUtil::add("IncompleteInventory");
give_successful = false;
}
- count = items.count() + cats.count();
+ count = items.size() + cats.size();
if (count > MAX_ITEMS)
{
LLNotificationsUtil::add("TooManyItems");
@@ -447,10 +447,10 @@ bool LLGiveInventory::handleCopyProtectedCategory(const LLSD& notification, cons
items,
LLInventoryModel::EXCLUDE_TRASH,
remove);
- S32 count = items.count();
+ S32 count = items.size();
for(S32 i = 0; i < count; ++i)
{
- gInventory.deleteObject(items.get(i)->getUUID());
+ gInventory.deleteObject(items.at(i)->getUUID());
}
gInventory.notifyObservers();
@@ -504,7 +504,7 @@ bool LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent,
// MAX ITEMS is based on (sizeof(uuid)+2) * count must be <
// MTUBYTES or 18 * count < 1200 => count < 1200/18 =>
// 66. I've cut it down a bit from there to give some pad.
- S32 count = items.count() + cats.count();
+ S32 count = items.size() + cats.size();
if (count > MAX_ITEMS)
{
LLNotificationsUtil::add("TooManyItems");
@@ -530,21 +530,21 @@ bool LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent,
memcpy(pos, &(cat->getUUID()), UUID_BYTES); /* Flawfinder: ignore */
pos += UUID_BYTES;
S32 i;
- count = cats.count();
+ count = cats.size();
for(i = 0; i < count; ++i)
{
memcpy(pos, &type, sizeof(U8)); /* Flawfinder: ignore */
pos += sizeof(U8);
- memcpy(pos, &(cats.get(i)->getUUID()), UUID_BYTES); /* Flawfinder: ignore */
+ memcpy(pos, &(cats.at(i)->getUUID()), UUID_BYTES); /* Flawfinder: ignore */
pos += UUID_BYTES;
}
- count = items.count();
+ count = items.size();
for(i = 0; i < count; ++i)
{
- type = (U8)items.get(i)->getType();
+ type = (U8)items.at(i)->getType();
memcpy(pos, &type, sizeof(U8)); /* Flawfinder: ignore */
pos += sizeof(U8);
- memcpy(pos, &(items.get(i)->getUUID()), UUID_BYTES); /* Flawfinder: ignore */
+ memcpy(pos, &(items.at(i)->getUUID()), UUID_BYTES); /* Flawfinder: ignore */
pos += UUID_BYTES;
}
pack_instant_message(
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index a0f2918bd7..0324629c6e 100755
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -210,17 +210,17 @@ void LLGroupActions::leave(const LLUUID& group_id)
if (group_id.isNull())
return;
- S32 count = gAgent.mGroups.count();
+ S32 count = gAgent.mGroups.size();
S32 i;
for (i = 0; i < count; ++i)
{
- if(gAgent.mGroups.get(i).mID == group_id)
+ if(gAgent.mGroups.at(i).mID == group_id)
break;
}
if (i < count)
{
LLSD args;
- args["GROUP"] = gAgent.mGroups.get(i).mName;
+ args["GROUP"] = gAgent.mGroups.at(i).mName;
LLSD payload;
payload["group_id"] = group_id;
LLNotificationsUtil::add("GroupLeaveConfirmMember", args, payload, onLeaveGroup);
diff --git a/indra/newview/llgroupiconctrl.cpp b/indra/newview/llgroupiconctrl.cpp
index 2d0fc26c2a..6abf9ea637 100755
--- a/indra/newview/llgroupiconctrl.cpp
+++ b/indra/newview/llgroupiconctrl.cpp
@@ -30,33 +30,21 @@
#include "llagent.h"
#include "llviewertexture.h"
-/*
-#include "llavatarconstants.h"
-#include "llcallingcard.h" // for LLAvatarTracker
-#include "llavataractions.h"
-#include "llmenugl.h"
-#include "lluictrlfactory.h"
-
-#include "llcachename.h"
-#include "llagentdata.h"
-#include "llfloaterimsession.h"
-*/
static LLDefaultChildRegistry::Register<LLGroupIconCtrl> g_i("group_icon");
LLGroupIconCtrl::Params::Params()
-: group_id("group_id")
-, draw_tooltip("draw_tooltip", true)
-, default_icon_name("default_icon_name")
-{
-}
+: group_id("group_id"),
+ draw_tooltip("draw_tooltip", true),
+ default_icon_name("default_icon_name")
+{}
LLGroupIconCtrl::LLGroupIconCtrl(const LLGroupIconCtrl::Params& p)
-: LLIconCtrl(p)
-, mGroupId(LLUUID::null)
-, mDrawTooltip(p.draw_tooltip)
-, mDefaultIconName(p.default_icon_name)
+: LLIconCtrl(p),
+ mGroupId(LLUUID::null),
+ mDrawTooltip(p.draw_tooltip),
+ mDefaultIconName(p.default_icon_name)
{
mPriority = LLViewerFetchedTexture::BOOST_ICON;
diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp
index aba3d74d87..b1b7a87ae8 100755
--- a/indra/newview/llgrouplist.cpp
+++ b/indra/newview/llgrouplist.cpp
@@ -163,7 +163,7 @@ static bool findInsensitive(std::string haystack, const std::string& needle_uppe
void LLGroupList::refresh()
{
const LLUUID& highlight_id = gAgent.getGroupID();
- S32 count = gAgent.mGroups.count();
+ S32 count = gAgent.mGroups.size();
LLUUID id;
bool have_filter = !mNameFilter.empty();
@@ -171,8 +171,8 @@ void LLGroupList::refresh()
for(S32 i = 0; i < count; ++i)
{
- id = gAgent.mGroups.get(i).mID;
- const LLGroupData& group_data = gAgent.mGroups.get(i);
+ id = gAgent.mGroups.at(i).mID;
+ const LLGroupData& group_data = gAgent.mGroups.at(i);
if (have_filter && !findInsensitive(group_data.mName, mNameFilter))
continue;
addNewItem(id, group_data.mName, group_data.mInsigniaID, ADD_BOTTOM);
diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h
index d8c1ab7ef5..d107fceb49 100755
--- a/indra/newview/llgroupmgr.h
+++ b/indra/newview/llgroupmgr.h
@@ -35,6 +35,17 @@
class LLMessageSystem;
+
+enum LLGroupChange
+{
+ GC_PROPERTIES,
+ GC_MEMBER_DATA,
+ GC_ROLE_DATA,
+ GC_ROLE_MEMBER_DATA,
+ GC_TITLES,
+ GC_ALL
+};
+
class LLGroupMgrObserver
{
public:
diff --git a/indra/newview/llhudicon.h b/indra/newview/llhudicon.h
index 87455ec3f4..e00a985ddc 100755
--- a/indra/newview/llhudicon.h
+++ b/indra/newview/llhudicon.h
@@ -38,7 +38,6 @@
#include "llfontgl.h"
#include <set>
#include <vector>
-#include "lldarray.h"
// Renders a 2D icon billboard floating at the location specified.
class LLViewerTexture;
diff --git a/indra/newview/llhudmanager.cpp b/indra/newview/llhudmanager.cpp
index 8f14b53db0..8ad432fbad 100755
--- a/indra/newview/llhudmanager.cpp
+++ b/indra/newview/llhudmanager.cpp
@@ -60,7 +60,7 @@ void LLHUDManager::updateEffects()
{
LLFastTimer ftm(FTM_HUD_EFFECTS);
S32 i;
- for (i = 0; i < mHUDEffects.count(); i++)
+ for (i = 0; i < mHUDEffects.size(); i++)
{
LLHUDEffect *hep = mHUDEffects[i];
if (hep->isDead())
@@ -74,7 +74,7 @@ void LLHUDManager::updateEffects()
void LLHUDManager::sendEffects()
{
S32 i;
- for (i = 0; i < mHUDEffects.count(); i++)
+ for (i = 0; i < mHUDEffects.size(); i++)
{
LLHUDEffect *hep = mHUDEffects[i];
if (hep->isDead())
@@ -105,18 +105,18 @@ void LLHUDManager::sendEffects()
//static
void LLHUDManager::shutdownClass()
{
- getInstance()->mHUDEffects.reset();
+ getInstance()->mHUDEffects.clear();
}
void LLHUDManager::cleanupEffects()
{
S32 i = 0;
- while (i < mHUDEffects.count())
+ while (i < mHUDEffects.size())
{
if (mHUDEffects[i]->isDead())
{
- mHUDEffects.remove(i);
+ mHUDEffects.erase(mHUDEffects.begin() + i);
}
else
{
@@ -140,7 +140,7 @@ LLHUDEffect *LLHUDManager::createViewerEffect(const U8 type, BOOL send_to_sim, B
hep->setNeedsSendToSim(send_to_sim);
hep->setOriginatedHere(originated_here);
- mHUDEffects.put(hep);
+ mHUDEffects.push_back(hep);
return hep;
}
@@ -159,20 +159,20 @@ void LLHUDManager::processViewerEffect(LLMessageSystem *mesgsys, void **user_dat
effectp = NULL;
LLHUDEffect::getIDType(mesgsys, k, effect_id, effect_type);
S32 i;
- for (i = 0; i < LLHUDManager::getInstance()->mHUDEffects.count(); i++)
+ for (i = 0; i < LLHUDManager::getInstance()->mHUDEffects.size(); i++)
{
LLHUDEffect *cur_effectp = LLHUDManager::getInstance()->mHUDEffects[i];
if (!cur_effectp)
{
llwarns << "Null effect in effect manager, skipping" << llendl;
- LLHUDManager::getInstance()->mHUDEffects.remove(i);
+ LLHUDManager::getInstance()->mHUDEffects.erase(LLHUDManager::getInstance()->mHUDEffects.begin() + i);
i--;
continue;
}
if (cur_effectp->isDead())
{
// llwarns << "Dead effect in effect manager, removing" << llendl;
- LLHUDManager::getInstance()->mHUDEffects.remove(i);
+ LLHUDManager::getInstance()->mHUDEffects.erase(LLHUDManager::getInstance()->mHUDEffects.begin() + i);
i--;
continue;
}
diff --git a/indra/newview/llhudmanager.h b/indra/newview/llhudmanager.h
index effea8f034..9c5d49decd 100755
--- a/indra/newview/llhudmanager.h
+++ b/indra/newview/llhudmanager.h
@@ -30,7 +30,6 @@
// Responsible for managing all HUD elements.
#include "llhudobject.h"
-#include "lldarray.h"
class LLHUDEffect;
class LLMessageSystem;
@@ -55,7 +54,7 @@ public:
static LLColor4 sChildColor;
protected:
- LLDynamicArray<LLPointer<LLHUDEffect>, 32> mHUDEffects;
+ std::vector<LLPointer<LLHUDEffect> > mHUDEffects;
};
#endif // LL_LLHUDMANAGER_H
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 7e18d37fe1..89ea5ff73a 100755
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -2397,7 +2397,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload
llinfos << "Corrected session name is " << correct_session_name << llendl;
break;
default:
- llwarning("Received an empty session name from a server and failed to generate a new proper session name", 0);
+ LL_WARNS() << "Received an empty session name from a server and failed to generate a new proper session name" << LL_ENDL;
break;
}
}
@@ -2782,8 +2782,8 @@ LLUUID LLIMMgr::addSession(
EInstantMessage dialog,
const LLUUID& other_participant_id, bool voice)
{
- LLDynamicArray<LLUUID> ids;
- ids.put(other_participant_id);
+ std::vector<LLUUID> ids;
+ ids.push_back(other_participant_id);
LLUUID session_id = addSession(name, dialog, other_participant_id, ids, voice);
return session_id;
}
@@ -2794,17 +2794,17 @@ LLUUID LLIMMgr::addSession(
const std::string& name,
EInstantMessage dialog,
const LLUUID& other_participant_id,
- const LLDynamicArray<LLUUID>& ids, bool voice,
+ const std::vector<LLUUID>& ids, bool voice,
const LLUUID& floater_id)
{
- if (0 == ids.getLength())
+ if (ids.empty())
{
return LLUUID::null;
}
if (name.empty())
{
- llwarning("Session name cannot be null!", 0);
+ LL_WARNS() << "Session name cannot be null!" << LL_ENDL;
return LLUUID::null;
}
@@ -3245,9 +3245,9 @@ bool LLIMMgr::isNonFriendSessionNotified(const LLUUID& session_id)
void LLIMMgr::noteOfflineUsers(
const LLUUID& session_id,
- const LLDynamicArray<LLUUID>& ids)
+ const std::vector<LLUUID>& ids)
{
- S32 count = ids.count();
+ S32 count = ids.size();
if(count == 0)
{
const std::string& only_user = LLTrans::getString("only_user_message");
@@ -3260,11 +3260,11 @@ void LLIMMgr::noteOfflineUsers(
LLIMModel& im_model = LLIMModel::instance();
for(S32 i = 0; i < count; ++i)
{
- info = at.getBuddyInfo(ids.get(i));
+ info = at.getBuddyInfo(ids.at(i));
LLAvatarName av_name;
if (info
&& !info->isOnline()
- && LLAvatarNameCache::get(ids.get(i), &av_name))
+ && LLAvatarNameCache::get(ids.at(i), &av_name))
{
LLUIString offline = LLTrans::getString("offline_message");
// Use display name only because this user is your friend
@@ -3276,7 +3276,7 @@ void LLIMMgr::noteOfflineUsers(
}
void LLIMMgr::noteMutedUsers(const LLUUID& session_id,
- const LLDynamicArray<LLUUID>& ids)
+ const std::vector<LLUUID>& ids)
{
// Don't do this if we don't have a mute list.
LLMuteList *ml = LLMuteList::getInstance();
@@ -3285,14 +3285,14 @@ void LLIMMgr::noteMutedUsers(const LLUUID& session_id,
return;
}
- S32 count = ids.count();
+ S32 count = ids.size();
if(count > 0)
{
LLIMModel* im_model = LLIMModel::getInstance();
for(S32 i = 0; i < count; ++i)
{
- if( ml->isMuted(ids.get(i)) )
+ if( ml->isMuted(ids.at(i)) )
{
LLUIString muted = LLTrans::getString("muted_message");
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index 2d036cbc2f..382b0e0a77 100755
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -33,7 +33,6 @@
#include "lllogchat.h"
#include "llvoicechannel.h"
-#include "lldarray.h"
class LLAvatarName;
class LLFriendObserver;
@@ -354,7 +353,7 @@ public:
LLUUID addSession(const std::string& name,
EInstantMessage dialog,
const LLUUID& other_participant_id,
- const LLDynamicArray<LLUUID>& ids, bool voice = false,
+ const std::vector<LLUUID>& ids, bool voice = false,
const LLUUID& floater_id = LLUUID::null);
/**
@@ -457,8 +456,8 @@ private:
// prints a simple message if they are not online. Used to help
// reduce 'hello' messages to the linden employees unlucky enough
// to have their calling card in the default inventory.
- void noteOfflineUsers(const LLUUID& session_id, const LLDynamicArray<LLUUID>& ids);
- void noteMutedUsers(const LLUUID& session_id, const LLDynamicArray<LLUUID>& ids);
+ void noteOfflineUsers(const LLUUID& session_id, const std::vector<LLUUID>& ids);
+ void noteMutedUsers(const LLUUID& session_id, const std::vector<LLUUID>& ids);
void processIMTypingCore(const LLIMInfo* im_info, BOOL typing);
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index c8ee8135a6..6915ba4557 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -328,7 +328,7 @@ void LLInvFVBridge::removeBatch(std::vector<LLFolderViewModelItem*>& batch)
if (cat)
{
gInventory.collectDescendents( cat->getUUID(), descendent_categories, descendent_items, FALSE );
- for (j=0; j<descendent_items.count(); j++)
+ for (j=0; j<descendent_items.size(); j++)
{
if(LLAssetType::AT_GESTURE == descendent_items[j]->getType())
{
@@ -490,12 +490,12 @@ BOOL LLInvFVBridge::isClipboardPasteable() const
}
// In normal mode, we need to check each element of the clipboard to know if we can paste or not
- LLDynamicArray<LLUUID> objects;
+ std::vector<LLUUID> objects;
LLClipboard::instance().pasteFromClipboard(objects);
- S32 count = objects.count();
+ S32 count = objects.size();
for(S32 i = 0; i < count; i++)
{
- const LLUUID &item_id = objects.get(i);
+ const LLUUID &item_id = objects.at(i);
// Folders are pastable if all items in there are copyable
const LLInventoryCategory *cat = model->getCategory(item_id);
@@ -530,12 +530,12 @@ BOOL LLInvFVBridge::isClipboardPasteableAsLink() const
return FALSE;
}
- LLDynamicArray<LLUUID> objects;
+ std::vector<LLUUID> objects;
LLClipboard::instance().pasteFromClipboard(objects);
- S32 count = objects.count();
+ S32 count = objects.size();
for(S32 i = 0; i < count; i++)
{
- const LLInventoryItem *item = model->getItem(objects.get(i));
+ const LLInventoryItem *item = model->getItem(objects.at(i));
if (item)
{
if (!LLAssetType::lookupCanLink(item->getActualType()))
@@ -543,7 +543,7 @@ BOOL LLInvFVBridge::isClipboardPasteableAsLink() const
return FALSE;
}
}
- const LLViewerInventoryCategory *cat = model->getCategory(objects.get(i));
+ const LLViewerInventoryCategory *cat = model->getCategory(objects.at(i));
if (cat && LLFolderType::lookupIsProtectedType(cat->getPreferredType()))
{
return FALSE;
@@ -861,7 +861,7 @@ BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
}
*id = obj->getUUID();
- //object_ids.put(obj->getUUID());
+ //object_ids.push_back(obj->getUUID());
if (*type == DAD_CATEGORY)
{
@@ -2048,15 +2048,15 @@ BOOL LLFolderBridge::isClipboardPasteable() const
return FALSE;
}
- LLDynamicArray<LLUUID> objects;
+ std::vector<LLUUID> objects;
LLClipboard::instance().pasteFromClipboard(objects);
const LLViewerInventoryCategory *current_cat = getCategory();
// Search for the direct descendent of current Friends subfolder among all pasted items,
// and return false if is found.
- for(S32 i = objects.count() - 1; i >= 0; --i)
+ for(S32 i = objects.size() - 1; i >= 0; --i)
{
- const LLUUID &obj_id = objects.get(i);
+ const LLUUID &obj_id = objects.at(i);
if ( LLFriendCardsManager::instance().isObjDirectDescendentOfCategory(model->getObject(obj_id), current_cat) )
{
return FALSE;
@@ -2086,12 +2086,12 @@ BOOL LLFolderBridge::isClipboardPasteableAsLink() const
{
const BOOL is_in_friend_folder = LLFriendCardsManager::instance().isCategoryInFriendFolder( current_cat );
const LLUUID &current_cat_id = current_cat->getUUID();
- LLDynamicArray<LLUUID> objects;
+ std::vector<LLUUID> objects;
LLClipboard::instance().pasteFromClipboard(objects);
- S32 count = objects.count();
+ S32 count = objects.size();
for(S32 i = 0; i < count; i++)
{
- const LLUUID &obj_id = objects.get(i);
+ const LLUUID &obj_id = objects.at(i);
const LLInventoryCategory *cat = model->getCategory(obj_id);
if (cat)
{
@@ -2165,9 +2165,9 @@ int get_folder_levels(LLInventoryCategory* inv_cat)
int max_child_levels = 0;
- for (S32 i=0; i < cats->count(); ++i)
+ for (S32 i=0; i < cats->size(); ++i)
{
- LLInventoryCategory* category = cats->get(i);
+ LLInventoryCategory* category = cats->at(i);
max_child_levels = llmax(max_child_levels, get_folder_levels(category));
}
@@ -2277,7 +2277,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
if (is_movable)
{
model->collectDescendents(cat_id, descendent_categories, descendent_items, FALSE);
- for (S32 i=0; i < descendent_categories.count(); ++i)
+ for (S32 i=0; i < descendent_categories.size(); ++i)
{
LLInventoryCategory* category = descendent_categories[i];
if(LLFolderType::lookupIsProtectedType(category->getPreferredType()))
@@ -2290,7 +2290,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
}
if (is_movable && move_is_into_trash)
{
- for (S32 i=0; i < descendent_items.count(); ++i)
+ for (S32 i=0; i < descendent_items.size(); ++i)
{
LLInventoryItem* item = descendent_items[i];
if (get_is_item_worn(item->getUUID()))
@@ -2302,7 +2302,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
}
if (is_movable && move_is_into_landmarks)
{
- for (S32 i=0; i < descendent_items.count(); ++i)
+ for (S32 i=0; i < descendent_items.size(); ++i)
{
LLViewerInventoryItem* item = descendent_items[i];
@@ -2326,7 +2326,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
}
else
{
- int dragged_folder_count = descendent_categories.count();
+ int dragged_folder_count = descendent_categories.size();
int existing_item_count = 0;
int existing_folder_count = 0;
@@ -2365,8 +2365,8 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
model->collectDescendents(master_folder->getUUID(), existing_categories, existing_items, FALSE);
- existing_folder_count += existing_categories.count();
- existing_item_count += existing_items.count();
+ existing_folder_count += existing_categories.size();
+ existing_item_count += existing_items.size();
}
else
{
@@ -2376,7 +2376,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
}
const int nested_folder_count = existing_folder_count + dragged_folder_count;
- const int nested_item_count = existing_item_count + descendent_items.count();
+ const int nested_item_count = existing_item_count + descendent_items.size();
if (nested_folder_count > gSavedSettings.getU32("InventoryOutboxMaxFolderCount"))
{
@@ -2391,7 +2391,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
if (is_movable == TRUE)
{
- for (S32 i=0; i < descendent_items.count(); ++i)
+ for (S32 i=0; i < descendent_items.size(); ++i)
{
LLInventoryItem* item = descendent_items[i];
if (!can_move_to_outbox(item, tooltip_msg))
@@ -2447,7 +2447,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
// Look for any gestures and deactivate them
if (move_is_into_trash)
{
- for (S32 i=0; i < descendent_items.count(); i++)
+ for (S32 i=0; i < descendent_items.size(); i++)
{
LLInventoryItem* item = descendent_items[i];
if (item->getType() == LLAssetType::AT_GESTURE
@@ -2711,13 +2711,13 @@ void LLRightClickInventoryFetchDescendentsObserver::execute(bool clear_observer)
S32 item_count(0);
if( item_array )
{
- item_count = item_array->count();
+ item_count = item_array->size();
}
S32 cat_count(0);
if( cat_array )
{
- cat_count = cat_array->count();
+ cat_count = cat_array->size();
}
// Move to next if current folder empty
@@ -2735,7 +2735,7 @@ void LLRightClickInventoryFetchDescendentsObserver::execute(bool clear_observer)
{
for (S32 i = 0; i < item_count; ++i)
{
- ids.push_back(item_array->get(i)->getUUID());
+ ids.push_back(item_array->at(i)->getUUID());
}
outfit = new LLRightClickInventoryFetchObserver(ids);
}
@@ -2744,7 +2744,7 @@ void LLRightClickInventoryFetchDescendentsObserver::execute(bool clear_observer)
{
for (S32 i = 0; i < cat_count; ++i)
{
- ids.push_back(cat_array->get(i)->getUUID());
+ ids.push_back(cat_array->at(i)->getUUID());
}
categories = new LLRightClickInventoryFetchDescendentsObserver(ids);
}
@@ -3153,7 +3153,7 @@ void LLFolderBridge::pasteFromClipboard()
const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id);
- LLDynamicArray<LLUUID> objects;
+ std::vector<LLUUID> objects;
LLClipboard::instance().pasteFromClipboard(objects);
if (move_is_into_outbox)
@@ -3166,7 +3166,7 @@ void LLFolderBridge::pasteFromClipboard()
BOOL can_list = TRUE;
- for (LLDynamicArray<LLUUID>::const_iterator iter = objects.begin();
+ for (std::vector<LLUUID>::const_iterator iter = objects.begin();
(iter != objects.end()) && (can_list == TRUE);
++iter)
{
@@ -3197,7 +3197,7 @@ void LLFolderBridge::pasteFromClipboard()
const LLUUID parent_id(mUUID);
- for (LLDynamicArray<LLUUID>::const_iterator iter = objects.begin();
+ for (std::vector<LLUUID>::const_iterator iter = objects.begin();
iter != objects.end();
++iter)
{
@@ -3289,9 +3289,9 @@ void LLFolderBridge::pasteLinkFromClipboard()
const LLUUID parent_id(mUUID);
- LLDynamicArray<LLUUID> objects;
+ std::vector<LLUUID> objects;
LLClipboard::instance().pasteFromClipboard(objects);
- for (LLDynamicArray<LLUUID>::const_iterator iter = objects.begin();
+ for (std::vector<LLUUID>::const_iterator iter = objects.begin();
iter != objects.end();
++iter)
{
@@ -3352,7 +3352,7 @@ BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInv
item_array,
LLInventoryModel::EXCLUDE_TRASH,
is_type);
- return ((item_array.count() > 0) ? TRUE : FALSE );
+ return ((item_array.size() > 0) ? TRUE : FALSE );
}
void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items, menuentry_vec_t& disabled_items)
@@ -4044,7 +4044,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
gInventory.collectDescendents(master_folder->getUUID(), existing_categories, existing_items, FALSE);
- existing_item_count += existing_items.count();
+ existing_item_count += existing_items.size();
}
if (existing_item_count > gSavedSettings.getU32("InventoryOutboxMaxItemCount"))
@@ -4341,8 +4341,8 @@ bool check_category(LLInventoryModel* model,
LLInventoryModel::item_array_t descendent_items;
model->collectDescendents(cat_id, descendent_categories, descendent_items, TRUE);
- S32 num_descendent_categories = descendent_categories.count();
- S32 num_descendent_items = descendent_items.count();
+ S32 num_descendent_categories = descendent_categories.size();
+ S32 num_descendent_items = descendent_items.size();
if (num_descendent_categories + num_descendent_items == 0)
{
diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h
index b183a2052d..1aa230df99 100755
--- a/indra/newview/llinventoryitemslist.h
+++ b/indra/newview/llinventoryitemslist.h
@@ -29,8 +29,6 @@
#ifndef LL_LLINVENTORYITEMSLIST_H
#define LL_LLINVENTORYITEMSLIST_H
-#include "lldarray.h"
-
// newview
#include "llflatlistview.h"
@@ -46,7 +44,7 @@ public:
virtual ~LLInventoryItemsList();
- void refreshList(const LLDynamicArray<LLPointer<LLViewerInventoryItem> > item_array);
+ void refreshList(const std::vector<LLPointer<LLViewerInventoryItem> > item_array);
boost::signals2::connection setRefreshCompleteCallback(const commit_signal_t::slot_type& cb);
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 935fe2b4d0..81c72fd320 100755
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -112,7 +112,7 @@ bool LLCanCache::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
S32 descendents_actual = 0;
if(cats && items)
{
- descendents_actual = cats->count() + items->count();
+ descendents_actual = cats->size() + items->size();
}
if(descendents_server == descendents_actual)
{
@@ -389,12 +389,12 @@ const LLUUID LLInventoryModel::findCategoryUUIDForType(LLFolderType::EType prefe
cats = get_ptr_in_map(mParentChildCategoryTree, root_id);
if(cats)
{
- S32 count = cats->count();
+ S32 count = cats->size();
for(S32 i = 0; i < count; ++i)
{
- if(cats->get(i)->getPreferredType() == preferred_type)
+ if(cats->at(i)->getPreferredType() == preferred_type)
{
- rv = cats->get(i)->getUUID();
+ rv = cats->at(i)->getUUID();
break;
}
}
@@ -426,12 +426,12 @@ const LLUUID LLInventoryModel::findLibraryCategoryUUIDForType(LLFolderType::ETyp
cats = get_ptr_in_map(mParentChildCategoryTree, root_id);
if(cats)
{
- S32 count = cats->count();
+ S32 count = cats->size();
for(S32 i = 0; i < count; ++i)
{
- if(cats->get(i)->getPreferredType() == preferred_type)
+ if(cats->at(i)->getPreferredType() == preferred_type)
{
- rv = cats->get(i)->getUUID();
+ rv = cats->at(i)->getUUID();
break;
}
}
@@ -631,13 +631,13 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
cat_array_t* cat_array = get_ptr_in_map(mParentChildCategoryTree, id);
if(cat_array)
{
- S32 count = cat_array->count();
+ S32 count = cat_array->size();
for(S32 i = 0; i < count; ++i)
{
- LLViewerInventoryCategory* cat = cat_array->get(i);
+ LLViewerInventoryCategory* cat = cat_array->at(i);
if(add(cat,NULL))
{
- cats.put(cat);
+ cats.push_back(cat);
}
collectDescendentsIf(cat->getUUID(), cats, items, include_trash, add);
}
@@ -651,10 +651,10 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
// Note: if making it fully recursive, need more checking against infinite loops.
if (follow_folder_links && item_array)
{
- S32 count = item_array->count();
+ S32 count = item_array->size();
for(S32 i = 0; i < count; ++i)
{
- item = item_array->get(i);
+ item = item_array->at(i);
if (item && item->getActualType() == LLAssetType::AT_LINK_FOLDER)
{
LLViewerInventoryCategory *linked_cat = item->getLinkedCategory();
@@ -668,7 +668,7 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
// BAP should this be added here? May not
// matter if it's only being used in current
// outfit traversal.
- cats.put(LLPointer<LLViewerInventoryCategory>(linked_cat));
+ cats.push_back(LLPointer<LLViewerInventoryCategory>(linked_cat));
}
collectDescendentsIf(linked_cat->getUUID(), cats, items, include_trash, add, FALSE);
}
@@ -679,13 +679,13 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
// Move onto items
if(item_array)
{
- S32 count = item_array->count();
+ S32 count = item_array->size();
for(S32 i = 0; i < count; ++i)
{
- item = item_array->get(i);
+ item = item_array->at(i);
if(add(NULL, item))
{
- items.put(item);
+ items.push_back(item);
}
}
}
@@ -793,7 +793,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item)
}
#endif
- LLViewerInventoryItem* old_item = getItem(item->getUUID());
+ LLPointer<LLViewerInventoryItem> old_item = getItem(item->getUUID());
LLPointer<LLViewerInventoryItem> new_item;
if(old_item)
{
@@ -809,12 +809,12 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item)
item_array = get_ptr_in_map(mParentChildItemTree, old_parent_id);
if(item_array)
{
- item_array->removeObj(old_item);
+ vector_replace_with_last(*item_array, old_item);
}
item_array = get_ptr_in_map(mParentChildItemTree, new_parent_id);
if(item_array)
{
- item_array->put(old_item);
+ item_array->push_back(old_item);
}
mask |= LLInventoryObserver::STRUCTURE;
}
@@ -840,7 +840,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item)
{
// *FIX: bit of a hack to call update server from here...
new_item->updateServer(TRUE);
- item_array->put(new_item);
+ item_array->push_back(new_item);
}
else
{
@@ -868,7 +868,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item)
item_array_t* item_array = get_ptr_in_map(mParentChildItemTree, parent_id);
if(item_array)
{
- item_array->put(new_item);
+ item_array->push_back(new_item);
}
else
{
@@ -883,7 +883,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item)
// *FIX: bit of a hack to call update server from
// here...
new_item->updateServer(TRUE);
- item_array->put(new_item);
+ item_array->push_back(new_item);
}
else
{
@@ -965,7 +965,7 @@ void LLInventoryModel::updateCategory(const LLViewerInventoryCategory* cat)
return;
}
- LLViewerInventoryCategory* old_cat = getCategory(cat->getUUID());
+ LLPointer<LLViewerInventoryCategory> old_cat = getCategory(cat->getUUID());
if(old_cat)
{
// We already have an old category, modify it's values
@@ -979,12 +979,12 @@ void LLInventoryModel::updateCategory(const LLViewerInventoryCategory* cat)
cat_array = getUnlockedCatArray(old_parent_id);
if(cat_array)
{
- cat_array->removeObj(old_cat);
+ vector_replace_with_last(*cat_array, old_cat);
}
cat_array = getUnlockedCatArray(new_parent_id);
if(cat_array)
{
- cat_array->put(old_cat);
+ cat_array->push_back(old_cat);
}
mask |= LLInventoryObserver::STRUCTURE;
mask |= LLInventoryObserver::INTERNAL;
@@ -1008,7 +1008,7 @@ void LLInventoryModel::updateCategory(const LLViewerInventoryCategory* cat)
cat_array = getUnlockedCatArray(cat->getParentUUID());
if(cat_array)
{
- cat_array->put(new_cat);
+ cat_array->push_back(new_cat);
}
// make space in the tree for this category's children.
@@ -1037,27 +1037,27 @@ void LLInventoryModel::moveObject(const LLUUID& object_id, const LLUUID& cat_id)
<< cat_id << llendl;
return;
}
- LLViewerInventoryCategory* cat = getCategory(object_id);
+ LLPointer<LLViewerInventoryCategory> cat = getCategory(object_id);
if(cat && (cat->getParentUUID() != cat_id))
{
cat_array_t* cat_array;
cat_array = getUnlockedCatArray(cat->getParentUUID());
- if(cat_array) cat_array->removeObj(cat);
+ if(cat_array) vector_replace_with_last(*cat_array, cat);
cat_array = getUnlockedCatArray(cat_id);
cat->setParent(cat_id);
- if(cat_array) cat_array->put(cat);
+ if(cat_array) cat_array->push_back(cat);
addChangedMask(LLInventoryObserver::STRUCTURE, object_id);
return;
}
- LLViewerInventoryItem* item = getItem(object_id);
+ LLPointer<LLViewerInventoryItem> item = getItem(object_id);
if(item && (item->getParentUUID() != cat_id))
{
item_array_t* item_array;
item_array = getUnlockedItemArray(item->getParentUUID());
- if(item_array) item_array->removeObj(item);
+ if(item_array) vector_replace_with_last(*item_array, item);
item_array = getUnlockedItemArray(cat_id);
item->setParent(cat_id);
- if(item_array) item_array->put(item);
+ if(item_array) item_array->push_back(item);
addChangedMask(LLInventoryObserver::STRUCTURE, object_id);
return;
}
@@ -1143,14 +1143,14 @@ void LLInventoryModel::deleteObject(const LLUUID& id)
item_array_t* item_list = getUnlockedItemArray(parent_id);
if(item_list)
{
- LLViewerInventoryItem* item = (LLViewerInventoryItem*)((LLInventoryObject*)obj);
- item_list->removeObj(item);
+ LLPointer<LLViewerInventoryItem> item = (LLViewerInventoryItem*)((LLInventoryObject*)obj);
+ vector_replace_with_last(*item_list, item);
}
cat_array_t* cat_list = getUnlockedCatArray(parent_id);
if(cat_list)
{
- LLViewerInventoryCategory* cat = (LLViewerInventoryCategory*)((LLInventoryObject*)obj);
- cat_list->removeObj(cat);
+ LLPointer<LLViewerInventoryCategory> cat = (LLViewerInventoryCategory*)((LLInventoryObject*)obj);
+ vector_replace_with_last(*cat_list, cat);
}
item_list = getUnlockedItemArray(id);
if(item_list)
@@ -1282,7 +1282,7 @@ void LLInventoryModel::purgeDescendentsOf(const LLUUID& id)
categories,
items,
INCLUDE_TRASH);
- S32 count = items.count();
+ S32 count = items.size();
item_map_t::iterator item_map_end = mItemMap.end();
cat_map_t::iterator cat_map_end = mCategoryMap.end();
@@ -1290,7 +1290,7 @@ void LLInventoryModel::purgeDescendentsOf(const LLUUID& id)
for(S32 i = 0; i < count; ++i)
{
- uu_id = items.get(i)->getUUID();
+ uu_id = items.at(i)->getUUID();
// This check prevents the deletion of a previously deleted item.
// This is necessary because deletion is not done in a hierarchical
@@ -1302,10 +1302,10 @@ void LLInventoryModel::purgeDescendentsOf(const LLUUID& id)
}
}
- count = categories.count();
+ count = categories.size();
for(S32 i = 0; i < count; ++i)
{
- uu_id = categories.get(i)->getUUID();
+ uu_id = categories.at(i)->getUUID();
if (mCategoryMap.find(uu_id) != cat_map_end)
{
deleteObject(uu_id);
@@ -1481,11 +1481,11 @@ bool LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id) const
//item_array_t* items = get_ptr_in_map(mParentChildItemTree, folder_id);
//if(categories)
//{
- // known_descendents += categories->count();
+ // known_descendents += categories->size();
//}
//if(items)
//{
- // known_descendents += items->count();
+ // known_descendents += items->size();
//}
return cat->fetch();
}
@@ -1499,7 +1499,7 @@ void LLInventoryModel::cache(
LLViewerInventoryCategory* root_cat = getCategory(parent_folder_id);
if(!root_cat) return;
cat_array_t categories;
- categories.put(root_cat);
+ categories.push_back(root_cat);
item_array_t items;
LLCanCache can_cache(this);
@@ -1612,7 +1612,7 @@ void LLInventoryModel::accountForUpdate(const LLCategoryUpdate& update) const
S32 descendents_actual = 0;
if(cats && items)
{
- descendents_actual = cats->count() + items->count();
+ descendents_actual = cats->size() + items->size();
}
if(descendents_server == descendents_actual)
{
@@ -1727,12 +1727,12 @@ LLInventoryModel::EHasChildren LLInventoryModel::categoryHasChildren(
// Shouldn't have to run this, but who knows.
parent_cat_map_t::const_iterator cat_it = mParentChildCategoryTree.find(cat->getUUID());
- if (cat_it != mParentChildCategoryTree.end() && cat_it->second->count() > 0)
+ if (cat_it != mParentChildCategoryTree.end() && cat_it->second->size() > 0)
{
return CHILDREN_YES;
}
parent_item_map_t::const_iterator item_it = mParentChildItemTree.find(cat->getUUID());
- if (item_it != mParentChildItemTree.end() && item_it->second->count() > 0)
+ if (item_it != mParentChildItemTree.end() && item_it->second->size() > 0)
{
return CHILDREN_YES;
}
@@ -1752,7 +1752,7 @@ bool LLInventoryModel::isCategoryComplete(const LLUUID& cat_id) const
S32 descendents_actual = 0;
if(cats && items)
{
- descendents_actual = cats->count() + items->count();
+ descendents_actual = cats->size() + items->size();
}
if(descendents_server == descendents_actual)
{
@@ -1850,7 +1850,7 @@ bool LLInventoryModel::loadSkeleton(
// found to generate a set of categories we should add. We
// will go through each category loaded and if the version
// does not match, invalidate the version.
- S32 count = categories.count();
+ S32 count = categories.size();
cat_set_t::iterator not_cached = temp_cats.end();
std::set<LLUUID> cached_ids;
for(S32 i = 0; i < count; ++i)
@@ -2060,7 +2060,7 @@ void LLInventoryModel::buildParentChildMap()
for(cat_map_t::iterator cit = mCategoryMap.begin(); cit != mCategoryMap.end(); ++cit)
{
LLViewerInventoryCategory* cat = cit->second;
- cats.put(cat);
+ cats.push_back(cat);
if (mParentChildCategoryTree.count(cat->getUUID()) == 0)
{
llassert_always(mCategoryLock[cat->getUUID()] == false);
@@ -2088,16 +2088,16 @@ void LLInventoryModel::buildParentChildMap()
// Now we have a structure with all of the categories that we can
// iterate over and insert into the correct place in the child
// category tree.
- S32 count = cats.count();
+ S32 count = cats.size();
S32 i;
S32 lost = 0;
for(i = 0; i < count; ++i)
{
- LLViewerInventoryCategory* cat = cats.get(i);
+ LLViewerInventoryCategory* cat = cats.at(i);
catsp = getUnlockedCatArray(cat->getParentUUID());
if(catsp)
{
- catsp->put(cat);
+ catsp->push_back(cat);
}
else
{
@@ -2130,7 +2130,7 @@ void LLInventoryModel::buildParentChildMap()
catsp = getUnlockedCatArray(cat->getParentUUID());
if(catsp)
{
- catsp->put(cat);
+ catsp->push_back(cat);
}
else
{
@@ -2157,20 +2157,20 @@ void LLInventoryModel::buildParentChildMap()
for(item_map_t::iterator iit = mItemMap.begin(); iit != mItemMap.end(); ++iit)
{
item = (*iit).second;
- items.put(item);
+ items.push_back(item);
}
}
- count = items.count();
+ count = items.size();
lost = 0;
uuid_vec_t lost_item_ids;
for(i = 0; i < count; ++i)
{
LLPointer<LLViewerInventoryItem> item;
- item = items.get(i);
+ item = items.at(i);
itemsp = getUnlockedItemArray(item->getParentUUID());
if(itemsp)
{
- itemsp->put(item);
+ itemsp->push_back(item);
}
else
{
@@ -2187,7 +2187,7 @@ void LLInventoryModel::buildParentChildMap()
itemsp = getUnlockedItemArray(item->getParentUUID());
if(itemsp)
{
- itemsp->put(item);
+ itemsp->push_back(item);
}
else
{
@@ -2355,7 +2355,7 @@ bool LLInventoryModel::loadFromFile(const std::string& filename,
LLPointer<LLViewerInventoryCategory> inv_cat = new LLViewerInventoryCategory(LLUUID::null);
if(inv_cat->importFileLocal(file))
{
- categories.put(inv_cat);
+ categories.push_back(inv_cat);
}
else
{
@@ -2383,7 +2383,7 @@ bool LLInventoryModel::loadFromFile(const std::string& filename,
}
else
{
- items.put(inv_item);
+ items.push_back(inv_item);
}
}
else
@@ -2423,7 +2423,7 @@ bool LLInventoryModel::saveToFile(const std::string& filename,
}
fprintf(file, "\tinv_cache_version\t%d\n",sCurrentInvCacheVersion);
- S32 count = categories.count();
+ S32 count = categories.size();
S32 i;
for(i = 0; i < count; ++i)
{
@@ -2434,7 +2434,7 @@ bool LLInventoryModel::saveToFile(const std::string& filename,
}
}
- count = items.count();
+ count = items.size();
for(i = 0; i < count; ++i)
{
items[i]->exportFile(file);
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index 964adf5e50..69dba495d7 100755
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -29,7 +29,6 @@
#include "llassettype.h"
#include "llfoldertype.h"
-#include "lldarray.h"
#include "llframetimer.h"
#include "llcurl.h"
#include "lluuid.h"
@@ -75,8 +74,8 @@ public:
CHILDREN_MAYBE
};
- typedef LLDynamicArray<LLPointer<LLViewerInventoryCategory> > cat_array_t;
- typedef LLDynamicArray<LLPointer<LLViewerInventoryItem> > item_array_t;
+ typedef std::vector<LLPointer<LLViewerInventoryCategory> > cat_array_t;
+ typedef std::vector<LLPointer<LLViewerInventoryItem> > item_array_t;
typedef std::set<LLUUID> changed_items_t;
class fetchInventoryResponder : public LLCurl::Responder
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 9db175ec2e..1083a6b37d 100755
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -398,7 +398,7 @@ BOOL LLInventoryFetchDescendentsObserver::isCategoryComplete(const LLViewerInven
// from memory.
return TRUE;
}
- const S32 current_num_known_descendents = cats->count() + items->count();
+ const S32 current_num_known_descendents = cats->size() + items->size();
// Got the number of descendents that we were expecting, so we're done.
if (current_num_known_descendents == expected_num_descendents)
@@ -724,7 +724,7 @@ void LLInventoryCategoriesObserver::changed(U32 mask)
continue;
}
- const S32 current_num_known_descendents = cats->count() + items->count();
+ const S32 current_num_known_descendents = cats->size() + items->size();
LLCategoryData& cat_data = (*iter).second;
@@ -791,7 +791,7 @@ bool LLInventoryCategoriesObserver::addCategory(const LLUUID& cat_id, callback_t
}
else
{
- current_num_known_descendents = cats->count() + items->count();
+ current_num_known_descendents = cats->size() + items->size();
}
}
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 4fdb05bc82..8190887ba6 100755
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -1024,7 +1024,7 @@ bool LLInventoryPanel::beginIMSession()
std::string name;
- LLDynamicArray<LLUUID> members;
+ std::vector<LLUUID> members;
EInstantMessage type = IM_SESSION_CONFERENCE_START;
std::set<LLFolderViewItem*>::const_iterator iter;
@@ -1052,7 +1052,7 @@ bool LLInventoryPanel::beginIMSession()
item_array,
LLInventoryModel::EXCLUDE_TRASH,
is_buddy);
- S32 count = item_array.count();
+ S32 count = item_array.size();
if(count > 0)
{
//*TODO by what to replace that?
@@ -1063,10 +1063,10 @@ bool LLInventoryPanel::beginIMSession()
LLUUID id;
for(S32 i = 0; i < count; ++i)
{
- id = item_array.get(i)->getCreatorUUID();
+ id = item_array.at(i)->getCreatorUUID();
if(at.isBuddyOnline(id))
{
- members.put(id);
+ members.push_back(id);
}
}
}
@@ -1086,7 +1086,7 @@ bool LLInventoryPanel::beginIMSession()
if(at.isBuddyOnline(id))
{
- members.put(id);
+ members.push_back(id);
}
}
} //if IT_CALLINGCARD
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index 00a90325ad..8b50a43a84 100755
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -29,7 +29,6 @@
#define LL_LLINVENTORYPANEL_H
#include "llassetstorage.h"
-#include "lldarray.h"
#include "llfolderviewitem.h"
#include "llfolderviewmodelinventory.h"
#include "llfloater.h"
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index 2d7454b636..60272749ff 100755
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -292,7 +292,7 @@ void LLLogChat::saveHistory(const std::string& filename,
if (tmp_filename.empty())
{
std::string warn = "Chat history filename [" + filename + "] is empty!";
- llwarning(warn, 666);
+ LL_WARNS() << warn << LL_ENDL;
llassert(tmp_filename.size());
return;
}
@@ -662,7 +662,7 @@ void LLChatLogFormatter::format(const LLSD& im, std::ostream& ostr) const
{
if (!im.isMap())
{
- llwarning("invalid LLSD type of an instant message", 0);
+ LL_WARNS() << "invalid LLSD type of an instant message" << LL_ENDL;
return;
}
diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp
index a7d6cb5eac..edb2d5e024 100755
--- a/indra/newview/llmanip.cpp
+++ b/indra/newview/llmanip.cpp
@@ -226,11 +226,11 @@ BOOL LLManip::handleHover(S32 x, S32 y, MASK mask)
setMouseCapture( FALSE );
}
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLManip (active)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLManip (active)" << llendl;
}
else
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLManip (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLManip (inactive)" << llendl;
}
gViewerWindow->setCursor(UI_CURSOR_ARROW);
return TRUE;
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index 9b05c75617..e2be3331ed 100755
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -519,12 +519,12 @@ BOOL LLManipRotate::handleHover(S32 x, S32 y, MASK mask)
drag(x, y);
}
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipRotate (active)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLManipRotate (active)" << llendl;
}
else
{
highlightManipulators(x, y);
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipRotate (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLManipRotate (inactive)" << llendl;
}
gViewerWindow->setCursor(UI_CURSOR_TOOLROTATE);
diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp
index 15788d6ffd..b4348f2a0e 100755
--- a/indra/newview/llmanipscale.cpp
+++ b/indra/newview/llmanipscale.cpp
@@ -413,7 +413,7 @@ BOOL LLManipScale::handleHover(S32 x, S32 y, MASK mask)
{
drag( x, y );
}
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipScale (active)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLManipScale (active)" << llendl;
}
else
{
@@ -543,7 +543,7 @@ void LLManipScale::highlightManipulators(S32 x, S32 y)
}
}
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipScale (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLManipScale (inactive)" << llendl;
}
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index 01337cfaed..cfea8a3330 100755
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -412,7 +412,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
// Bail out if mouse not down.
if( !hasMouseCapture() )
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipTranslate (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (inactive)" << llendl;
// Always show cursor
// gViewerWindow->setCursor(UI_CURSOR_ARROW);
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
@@ -448,7 +448,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
// rotation above.
if( x == mLastHoverMouseX && y == mLastHoverMouseY && !rotated)
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipTranslate (mouse unmoved)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (mouse unmoved)" << llendl;
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
return TRUE;
}
@@ -461,7 +461,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
{
if (abs(mMouseDownX - x) < MOUSE_DRAG_SLOP && abs(mMouseDownY - y) < MOUSE_DRAG_SLOP )
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipTranslate (mouse inside slop)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (mouse inside slop)" << llendl;
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
return TRUE;
}
@@ -478,7 +478,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
// When we make the copy, we don't want to do any other processing.
// If so, the object will also be moved, and the copy will be offset.
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipTranslate (made copy)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (made copy)" << llendl;
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
}
}
@@ -531,7 +531,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
if (relative_move.magVecSquared() > max_drag_distance * max_drag_distance)
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipTranslate (too far)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (too far)" << llendl;
gViewerWindow->setCursor(UI_CURSOR_NOLOCKED);
return TRUE;
}
@@ -776,7 +776,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
gAgentCamera.clearFocusObject();
dialog_refresh_all(); // ??? is this necessary?
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipTranslate (active)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (active)" << llendl;
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
return TRUE;
}
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp
index 7f396b7b7e..3417651ddb 100755
--- a/indra/newview/llnamelistctrl.cpp
+++ b/indra/newview/llnamelistctrl.cpp
@@ -125,7 +125,7 @@ BOOL LLNameListCtrl::handleDragAndDrop(
}
handled = TRUE;
- lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLNameListCtrl " << getName() << llendl;
+ LL_DEBUGS("UserInput") << "dragAndDrop handled by LLNameListCtrl " << getName() << llendl;
return handled;
}
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 679b1bdcda..b6a9aae213 100755
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -29,7 +29,6 @@
#include "llagent.h"
#include "llavataractions.h"
-#include "llavatarconstants.h" // AVATAR_ONLINE
#include "llcallingcard.h"
#include "llcombobox.h"
#include "lldateutil.h" // ageFromDate()
diff --git a/indra/newview/llpanelcontents.h b/indra/newview/llpanelcontents.h
index 62ccb64a4c..ad62e13bc2 100755
--- a/indra/newview/llpanelcontents.h
+++ b/indra/newview/llpanelcontents.h
@@ -31,7 +31,6 @@
#include "llpanel.h"
#include "llinventory.h"
#include "lluuid.h"
-#include "llmap.h"
#include "llviewerobject.h"
#include "llvoinventorylistener.h"
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index a499fa1d87..5bdd88dd50 100755
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -1071,7 +1071,7 @@ void LLPanelEditWearable::saveChanges(bool force_save_as)
LLAppearanceMgr::instance().findCOFItemLinks(mWearablePtr->getItemID());
if (links.size()>0)
{
- link_item = links.get(0).get();
+ link_item = links.at(0).get();
if (link_item && link_item->getIsLinkType())
{
description = link_item->getActualDescription();
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 7ef427fa3e..df37a188fa 100755
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -1323,7 +1323,7 @@ void LLPanelFace::updateUI()
// to avoid getting overwritten with the default on some UI state changes.
//
if (!material->getSpecularID().isNull())
- {
+ {
getChild<LLColorSwatchCtrl>("shinycolorswatch")->setOriginal(material->getSpecularLightColor());
getChild<LLColorSwatchCtrl>("shinycolorswatch")->set(material->getSpecularLightColor(),TRUE);
}
@@ -1334,9 +1334,9 @@ void LLPanelFace::updateUI()
if ( ((channel_to_edit == LLRender::NORMAL_MAP) && material->getNormalID().isNull())
||((channel_to_edit == LLRender::SPECULAR_MAP) && material->getSpecularID().isNull()))
- {
+ {
channel_to_edit = LLRender::DIFFUSE_MAP;
- }
+ }
LLSelectMgr::getInstance()->setTextureChannel(channel_to_edit);
@@ -1345,15 +1345,15 @@ void LLPanelFace::updateUI()
texture_ctrl->setImageAssetID(material->getNormalID());
if (!material->getNormalID().isNull())
- {
+ {
material->getNormalOffset(offset_x,offset_y);
material->getNormalRepeat(repeat_x,repeat_y);
if (identical_planar_texgen)
- {
+ {
repeat_x *= 2.0f;
repeat_y *= 2.0f;
- }
+ }
rot = material->getNormalRotation();
getChild<LLUICtrl>("bumpyScaleU")->setValue(repeat_x);
@@ -1398,7 +1398,7 @@ void LLPanelFace::updateUI()
if(mColorSwatch)
{
mColorSwatch->setEnabled( FALSE );
- mColorSwatch->setFallbackImageName("locked_image.j2c" );
+ mColorSwatch->setFallbackImage(LLUI::getUIImage("locked_image.j2c") );
mColorSwatch->setValid(FALSE);
}
getChildView("color trans")->setEnabled(FALSE);
diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp
index c927aeacb3..524305e3fe 100755
--- a/indra/newview/llpanelgrouplandmoney.cpp
+++ b/indra/newview/llpanelgrouplandmoney.cpp
@@ -131,7 +131,7 @@ public:
- static LLMap<LLUUID, LLGroupMoneyTabEventHandler*> sInstanceIDs;
+ static std::map<LLUUID, LLGroupMoneyTabEventHandler*> sInstanceIDs;
static std::map<LLPanel*, LLGroupMoneyTabEventHandler*> sTabsToHandlers;
protected:
LLGroupMoneyTabEventHandlerImpl* mImplementationp;
@@ -534,7 +534,7 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg)
//static
-LLMap<LLUUID, LLPanelGroupLandMoney*> LLPanelGroupLandMoney::sGroupIDs;
+std::map<LLUUID, LLPanelGroupLandMoney*> LLPanelGroupLandMoney::sGroupIDs;
LLPanelGroupLandMoney::LLPanelGroupLandMoney() :
LLPanelGroupTab()
@@ -547,13 +547,13 @@ LLPanelGroupLandMoney::LLPanelGroupLandMoney() :
//will then only be working for the last panel for a given group id :(
//FIXME - add to setGroupID()
- //LLPanelGroupLandMoney::sGroupIDs.addData(group_id, this);
+ //LLPanelGroupLandMoney::sGroupIDs.insert(group_id, this);
}
LLPanelGroupLandMoney::~LLPanelGroupLandMoney()
{
delete mImplementationp;
- LLPanelGroupLandMoney::sGroupIDs.removeData(mGroupID);
+ LLPanelGroupLandMoney::sGroupIDs.erase(mGroupID);
}
void LLPanelGroupLandMoney::activate()
@@ -821,15 +821,15 @@ void LLPanelGroupLandMoney::processPlacesReply(LLMessageSystem* msg, void**)
LLUUID group_id;
msg->getUUID("AgentData", "QueryID", group_id);
- LLPanelGroupLandMoney* selfp = sGroupIDs.getIfThere(group_id);
- if(!selfp)
+ group_id_map_t::iterator found_it = sGroupIDs.find(group_id);
+ if(found_it == sGroupIDs.end())
{
llinfos << "Group Panel Land L$ " << group_id << " no longer in existence."
<< llendl;
return;
}
- selfp->mImplementationp->processGroupLand(msg);
+ found_it->second->mImplementationp->processGroupLand(msg);
}
@@ -885,7 +885,7 @@ void LLGroupMoneyTabEventHandlerImpl::updateButtons()
//** LLGroupMoneyTabEventHandler Functions **
//*******************************************
-LLMap<LLUUID, LLGroupMoneyTabEventHandler*> LLGroupMoneyTabEventHandler::sInstanceIDs;
+std::map<LLUUID, LLGroupMoneyTabEventHandler*> LLGroupMoneyTabEventHandler::sInstanceIDs;
std::map<LLPanel*, LLGroupMoneyTabEventHandler*> LLGroupMoneyTabEventHandler::sTabsToHandlers;
LLGroupMoneyTabEventHandler::LLGroupMoneyTabEventHandler(LLButton* earlier_buttonp,
@@ -922,13 +922,13 @@ LLGroupMoneyTabEventHandler::LLGroupMoneyTabEventHandler(LLButton* earlier_butto
tab_containerp->setCommitCallback(boost::bind(&LLGroupMoneyTabEventHandler::onClickTab, this));
}
- sInstanceIDs.addData(mImplementationp->mPanelID, this);
+ sInstanceIDs.insert(std::make_pair(mImplementationp->mPanelID, this));
sTabsToHandlers[panelp] = this;
}
LLGroupMoneyTabEventHandler::~LLGroupMoneyTabEventHandler()
{
- sInstanceIDs.removeData(mImplementationp->mPanelID);
+ sInstanceIDs.erase(mImplementationp->mPanelID);
sTabsToHandlers.erase(mImplementationp->mTabPanelp);
delete mImplementationp;
@@ -1122,10 +1122,10 @@ void LLPanelGroupLandMoney::processGroupAccountDetailsReply(LLMessageSystem* msg
LLUUID request_id;
msg->getUUIDFast(_PREHASH_MoneyData, _PREHASH_RequestID, request_id );
- LLGroupMoneyTabEventHandler* selfp = LLGroupMoneyTabEventHandler::sInstanceIDs.getIfThere(request_id);
+ LLGroupMoneyTabEventHandler* selfp = get_ptr_in_map(LLGroupMoneyTabEventHandler::sInstanceIDs, request_id);
if (!selfp)
{
- llwarns << "GroupAccountDetails recieved for non-existent group panel." << llendl;
+ llwarns << "GroupAccountDetails received for non-existent group panel." << llendl;
return;
}
@@ -1302,7 +1302,7 @@ void LLPanelGroupLandMoney::processGroupAccountTransactionsReply(LLMessageSystem
LLGroupMoneyTabEventHandler* self;
- self = LLGroupMoneyTabEventHandler::sInstanceIDs.getIfThere(request_id);
+ self = get_ptr_in_map(LLGroupMoneyTabEventHandler::sInstanceIDs, request_id);
if (!self)
{
llwarns << "GroupAccountTransactions recieved for non-existent group panel." << llendl;
@@ -1482,7 +1482,7 @@ void LLPanelGroupLandMoney::processGroupAccountSummaryReply(LLMessageSystem* msg
LLGroupMoneyTabEventHandler* self;
- self = LLGroupMoneyTabEventHandler::sInstanceIDs.getIfThere(request_id);
+ self = get_ptr_in_map(LLGroupMoneyTabEventHandler::sInstanceIDs, request_id);
if (!self)
{
llwarns << "GroupAccountSummary recieved for non-existent group L$ planning tab." << llendl;
@@ -1494,9 +1494,9 @@ void LLPanelGroupLandMoney::processGroupAccountSummaryReply(LLMessageSystem* msg
void LLPanelGroupLandMoney::setGroupID(const LLUUID& id)
{
- LLPanelGroupLandMoney::sGroupIDs.removeData(mGroupID);
+ LLPanelGroupLandMoney::sGroupIDs.erase(mGroupID);
LLPanelGroupTab::setGroupID(id);
- LLPanelGroupLandMoney::sGroupIDs.addData(mGroupID, this);
+ LLPanelGroupLandMoney::sGroupIDs.insert(std::make_pair(mGroupID, this));
bool can_view = gAgent.isInGroup(mGroupID);
diff --git a/indra/newview/llpanelgrouplandmoney.h b/indra/newview/llpanelgrouplandmoney.h
index ac3518ee19..3cec6065e7 100755
--- a/indra/newview/llpanelgrouplandmoney.h
+++ b/indra/newview/llpanelgrouplandmoney.h
@@ -28,7 +28,7 @@
#define LL_PANEL_GROUP_LAND_MONEY_H
#include "llpanelgroup.h"
-#include "llmap.h"
+#include <map>
#include "lluuid.h"
class LLPanelGroupLandMoney : public LLPanelGroupTab
@@ -47,7 +47,8 @@ public:
static void processPlacesReply(LLMessageSystem* msg, void**);
- static LLMap<LLUUID, LLPanelGroupLandMoney*> sGroupIDs;
+ typedef std::map<LLUUID, LLPanelGroupLandMoney*> group_id_map_t;
+ static group_id_map_t sGroupIDs;
static void processGroupAccountDetailsReply(LLMessageSystem* msg, void** data);
static void processGroupAccountTransactionsReply(LLMessageSystem* msg, void** data);
diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp
index 5c9b968ac9..79815e7be5 100755
--- a/indra/newview/llpanellandmarkinfo.cpp
+++ b/indra/newview/llpanellandmarkinfo.cpp
@@ -446,9 +446,9 @@ void LLPanelLandmarkInfo::populateFoldersList()
typedef std::vector<folder_pair_t> folder_vec_t;
folder_vec_t folders;
// Sort the folders by their full name.
- for (S32 i = 0; i < cats.count(); i++)
+ for (S32 i = 0; i < cats.size(); i++)
{
- const LLViewerInventoryCategory* cat = cats.get(i);
+ const LLViewerInventoryCategory* cat = cats.at(i);
std::string cat_full_name = getFullFolderName(cat);
folders.push_back(folder_pair_t(cat->getUUID(), cat_full_name));
}
@@ -487,6 +487,6 @@ static void collectLandmarkFolders(LLInventoryModel::cat_array_t& cats)
}
else
{
- cats.put(favorites_cat);
+ cats.push_back(favorites_cat);
}
}
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index bcb90bcb56..c96173f550 100755
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -33,7 +33,6 @@
#include "llfloaterreg.h"
#include "llfontgl.h"
#include "llmd5.h"
-#include "llsecondlifeurls.h"
#include "v4color.h"
#include "llappviewer.h"
@@ -545,13 +544,13 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential,
LLStringUtil::trim(username);
std::string password = sInstance->getChild<LLUICtrl>("password_edit")->getValue().asString();
- LL_INFOS2("Credentials", "Authentication") << "retrieving username:" << username << LL_ENDL;
+ LL_INFOS("Credentials", "Authentication") << "retrieving username:" << username << LL_ENDL;
// determine if the username is a first/last form or not.
size_t separator_index = username.find_first_of(' ');
if (separator_index == username.npos
&& !LLGridManager::getInstance()->isSystemGrid())
{
- LL_INFOS2("Credentials", "Authentication") << "account: " << username << LL_ENDL;
+ LL_INFOS("Credentials", "Authentication") << "account: " << username << LL_ENDL;
// single username, so this is a 'clear' identifier
identifier["type"] = CRED_IDENTIFIER_TYPE_ACCOUNT;
identifier["account_name"] = username;
@@ -586,7 +585,7 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential,
if (last.find_first_of(' ') == last.npos)
{
- LL_INFOS2("Credentials", "Authentication") << "agent: " << username << LL_ENDL;
+ LL_INFOS("Credentials", "Authentication") << "agent: " << username << LL_ENDL;
// traditional firstname / lastname
identifier["type"] = CRED_IDENTIFIER_TYPE_AGENT;
identifier["first_name"] = first;
diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp
index a9af56f750..4a3840c498 100755
--- a/indra/newview/llpanelme.cpp
+++ b/indra/newview/llpanelme.cpp
@@ -30,7 +30,6 @@
// Viewer includes
#include "llpanelprofile.h"
-#include "llavatarconstants.h"
#include "llagent.h"
#include "llagentcamera.h"
#include "llagentwearables.h"
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index d7130820ab..94cb90b993 100755
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -1753,7 +1753,7 @@ void LLPanelObjectInventory::createViewsForCategory(LLInventoryObject::object_li
LLUIColor item_color = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE);
// Find all in the first pass
- LLDynamicArray<obj_folder_pair*> child_categories;
+ std::vector<obj_folder_pair*> child_categories;
LLTaskInvFVBridge* bridge;
LLFolderViewItem* view;
@@ -1780,7 +1780,7 @@ void LLPanelObjectInventory::createViewsForCategory(LLInventoryObject::object_li
p.font_color = item_color;
p.font_highlight_color = item_color;
view = LLUICtrlFactory::create<LLFolderViewFolder>(p);
- child_categories.put(new obj_folder_pair(obj,
+ child_categories.push_back(new obj_folder_pair(obj,
(LLFolderViewFolder*)view));
}
else
@@ -1802,7 +1802,7 @@ void LLPanelObjectInventory::createViewsForCategory(LLInventoryObject::object_li
}
// now, for each category, do the second pass
- for(S32 i = 0; i < child_categories.count(); i++)
+ for(S32 i = 0; i < child_categories.size(); i++)
{
createViewsForCategory(inventory, child_categories[i]->first,
child_categories[i]->second );
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index cfbc8f1a94..f2ef2ec003 100755
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -30,7 +30,6 @@
#include "llagent.h"
#include "llagentpicksinfo.h"
-#include "llavatarconstants.h"
#include "llcommandhandler.h"
#include "lldispatcher.h"
#include "llflatlistview.h"
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index 0756faf5c0..018efbbc5c 100755
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -416,7 +416,7 @@ BOOL LLTeleportHistoryPanel::postBuild()
// All accordion tabs are collapsed initially
setAccordionCollapsedByUser(tab, true);
- mItemContainers.put(tab);
+ mItemContainers.push_back(tab);
LLFlatListView* fl = getFlatListViewFromTab(tab);
if (fl)
@@ -432,14 +432,14 @@ BOOL LLTeleportHistoryPanel::postBuild()
// Open first 2 accordion tabs
if (mItemContainers.size() > 1)
{
- LLAccordionCtrlTab* tab = mItemContainers.get(mItemContainers.size() - 1);
+ LLAccordionCtrlTab* tab = mItemContainers.at(mItemContainers.size() - 1);
tab->setDisplayChildren(true);
setAccordionCollapsedByUser(tab, false);
}
if (mItemContainers.size() > 2)
{
- LLAccordionCtrlTab* tab = mItemContainers.get(mItemContainers.size() - 2);
+ LLAccordionCtrlTab* tab = mItemContainers.at(mItemContainers.size() - 2);
tab->setDisplayChildren(true);
setAccordionCollapsedByUser(tab, false);
}
@@ -683,7 +683,7 @@ void LLTeleportHistoryPanel::refresh()
tab_idx = mItemContainers.size() - 1 - tab_idx;
if (tab_idx >= 0)
{
- LLAccordionCtrlTab* tab = mItemContainers.get(tab_idx);
+ LLAccordionCtrlTab* tab = mItemContainers.at(tab_idx);
tab->setVisible(true);
// Expand all accordion tabs when filtering
@@ -730,7 +730,7 @@ void LLTeleportHistoryPanel::refresh()
for (S32 n = mItemContainers.size() - 1; n >= 0; --n)
{
- LLAccordionCtrlTab* tab = mItemContainers.get(n);
+ LLAccordionCtrlTab* tab = mItemContainers.at(n);
LLFlatListView* fv = getFlatListViewFromTab(tab);
if (fv)
{
@@ -792,7 +792,7 @@ void LLTeleportHistoryPanel::replaceItem(S32 removed_index)
// to point to the right item in LLTeleportHistoryStorage
for (S32 tab_idx = mItemContainers.size() - 1; tab_idx >= 0; --tab_idx)
{
- LLAccordionCtrlTab* tab = mItemContainers.get(tab_idx);
+ LLAccordionCtrlTab* tab = mItemContainers.at(tab_idx);
if (!tab->getVisible())
continue;
@@ -846,7 +846,7 @@ void LLTeleportHistoryPanel::showTeleportHistory()
for (S32 n = mItemContainers.size() - 1; n >= 0; --n)
{
- LLAccordionCtrlTab* tab = mItemContainers.get(n);
+ LLAccordionCtrlTab* tab = mItemContainers.at(n);
if (tab)
{
tab->setVisible(false);
@@ -873,7 +873,7 @@ void LLTeleportHistoryPanel::handleItemSelect(LLFlatListView* selected)
for (S32 n = 0; n < tabs_cnt; n++)
{
- LLAccordionCtrlTab* tab = mItemContainers.get(n);
+ LLAccordionCtrlTab* tab = mItemContainers.at(n);
if (!tab->getVisible())
continue;
@@ -958,7 +958,7 @@ void LLTeleportHistoryPanel::onExpandAllFolders()
for (S32 n = 0; n < tabs_cnt; n++)
{
- mItemContainers.get(n)->setDisplayChildren(true);
+ mItemContainers.at(n)->setDisplayChildren(true);
}
mHistoryAccordion->arrange();
}
@@ -969,7 +969,7 @@ void LLTeleportHistoryPanel::onCollapseAllFolders()
for (S32 n = 0; n < tabs_cnt; n++)
{
- mItemContainers.get(n)->setDisplayChildren(false);
+ mItemContainers.at(n)->setDisplayChildren(false);
}
mHistoryAccordion->arrange();
@@ -1024,7 +1024,7 @@ bool LLTeleportHistoryPanel::isActionEnabled(const LLSD& userdata) const
for (S32 n = 0; n < tabs_cnt; n++)
{
- LLAccordionCtrlTab* tab = mItemContainers.get(n);
+ LLAccordionCtrlTab* tab = mItemContainers.at(n);
if (!tab->getVisible())
continue;
diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h
index 47b607a2f4..b88861c5c6 100755
--- a/indra/newview/llpanelteleporthistory.h
+++ b/indra/newview/llpanelteleporthistory.h
@@ -112,7 +112,7 @@ private:
bool mDirty;
S32 mCurrentItem;
- typedef LLDynamicArray<LLAccordionCtrlTab*> item_containers_t;
+ typedef std::vector<LLAccordionCtrlTab*> item_containers_t;
item_containers_t mItemContainers;
ContextMenu mContextMenu;
diff --git a/indra/newview/llphysicsshapebuilderutil.h b/indra/newview/llphysicsshapebuilderutil.h
index 7dedfb05e2..bd5b7d799c 100755
--- a/indra/newview/llphysicsshapebuilderutil.h
+++ b/indra/newview/llphysicsshapebuilderutil.h
@@ -41,6 +41,8 @@
#define SHAPE_BUILDER_IMPLICIT_THRESHOLD_TWIST 0.09f
#define SHAPE_BUILDER_IMPLICIT_THRESHOLD_SHEAR 0.05f
+const F32 COLLISION_TOLERANCE = 0.1f;
+
const F32 SHAPE_BUILDER_ENTRY_SNAP_SCALE_BIN_SIZE = 0.15f;
const F32 SHAPE_BUILDER_ENTRY_SNAP_PARAMETER_BIN_SIZE = 0.010f;
const F32 SHAPE_BUILDER_CONVEXIFICATION_SIZE = 2.f * COLLISION_TOLERANCE;
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index 04934b13f1..3675d8694d 100755
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -25,7 +25,6 @@
*/
#include "llviewerprecompiledheaders.h"
-#include "stdenums.h"
#include "llpreview.h"
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index bda603262d..36877696f5 100755
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -546,10 +546,10 @@ void LLPreviewGesture::addAnimations()
// Copy into something we can sort
std::vector<LLInventoryItem*> animations;
- S32 count = items.count();
+ S32 count = items.size();
for(i = 0; i < count; ++i)
{
- animations.push_back( items.get(i) );
+ animations.push_back( items.at(i) );
}
// Do the sort
@@ -592,10 +592,10 @@ void LLPreviewGesture::addSounds()
std::vector<LLInventoryItem*> sounds;
S32 i;
- S32 count = items.count();
+ S32 count = items.size();
for(i = 0; i < count; ++i)
{
- sounds.push_back( items.get(i) );
+ sounds.push_back( items.at(i) );
}
// Do the sort
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 516ecedbc8..bfc779c057 100755
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -1069,15 +1069,15 @@ struct LLEntryAndEdCore
void LLScriptEdCore::deleteBridges()
{
- S32 count = mBridges.count();
+ S32 count = mBridges.size();
LLEntryAndEdCore* eandc;
for(S32 i = 0; i < count; i++)
{
- eandc = mBridges.get(i);
+ eandc = mBridges.at(i);
delete eandc;
mBridges[i] = NULL;
}
- mBridges.reset();
+ mBridges.clear();
}
// virtual
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index 7563cecd9d..a799f3c167 100755
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -27,7 +27,6 @@
#ifndef LL_LLPREVIEWSCRIPT_H
#define LL_LLPREVIEWSCRIPT_H
-#include "lldarray.h"
#include "llpreview.h"
#include "lltabcontainer.h"
#include "llinventory.h"
@@ -138,7 +137,7 @@ private:
BOOL mForceClose;
LLPanel* mCodePanel;
LLScrollListCtrl* mErrorList;
- LLDynamicArray<LLEntryAndEdCore*> mBridges;
+ std::vector<LLEntryAndEdCore*> mBridges;
LLHandle<LLFloater> mLiveHelpHandle;
LLKeywordToken* mLastHelpToken;
LLFrameTimer mLiveHelpTimer;
diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp
index 0e0da6bdc7..b5edeb4a0e 100755
--- a/indra/newview/llscriptfloater.cpp
+++ b/indra/newview/llscriptfloater.cpp
@@ -234,7 +234,7 @@ void LLScriptFloater::onMouseDown()
// Remove new message icon
if (NULL == chicletp)
{
- llerror("Dock chiclet for LLScriptFloater doesn't exist", 0);
+ LL_ERRS() << "Dock chiclet for LLScriptFloater doesn't exist" << LL_ENDL;
}
else
{
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index b47c2de768..06ad834f35 100755
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -104,6 +104,9 @@ const F32 SILHOUETTE_UPDATE_THRESHOLD_SQUARED = 0.02f;
const S32 MAX_ACTION_QUEUE_SIZE = 20;
const S32 MAX_SILS_PER_FRAME = 50;
const S32 MAX_OBJECTS_PER_PACKET = 254;
+// For linked sets
+const S32 MAX_CHILDREN_PER_TASK = 255;
+const S32 MAX_CHILDREN_PER_PHYSICAL_TASK = 32;
//
// Globals
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index d4b736640c..a68328167a 100755
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -56,6 +56,33 @@ class LLColor4;
class LLVector3;
class LLSelectNode;
+const U8 UPD_NONE = 0x00;
+const U8 UPD_POSITION = 0x01;
+const U8 UPD_ROTATION = 0x02;
+const U8 UPD_SCALE = 0x04;
+const U8 UPD_LINKED_SETS = 0x08;
+const U8 UPD_UNIFORM = 0x10; // used with UPD_SCALE
+
+// This is used by the DeRezObject message to determine where to put
+// derezed tasks.
+enum EDeRezDestination
+{
+ DRD_SAVE_INTO_AGENT_INVENTORY = 0,
+ DRD_ACQUIRE_TO_AGENT_INVENTORY = 1, // try to leave copy in world
+ DRD_SAVE_INTO_TASK_INVENTORY = 2,
+ DRD_ATTACHMENT = 3,
+ DRD_TAKE_INTO_AGENT_INVENTORY = 4, // delete from world
+ DRD_FORCE_TO_GOD_INVENTORY = 5, // force take copy
+ DRD_TRASH = 6,
+ DRD_ATTACHMENT_TO_INV = 7,
+ DRD_ATTACHMENT_EXISTS = 8,
+ DRD_RETURN_TO_OWNER = 9, // back to owner's inventory
+ DRD_RETURN_TO_LAST_OWNER = 10, // deeded object back to last owner's inventory
+
+ DRD_COUNT = 11
+};
+
+
const S32 SELECT_ALL_TES = -1;
const S32 SELECT_MAX_TES = 32;
diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp
index dacea187c3..75e6b4f1a5 100755
--- a/indra/newview/llspeakers.cpp
+++ b/indra/newview/llspeakers.cpp
@@ -1038,7 +1038,7 @@ void LLLocalSpeakerMgr::updateSpeakerList()
if (speakerp->mStatus == LLSpeaker::STATUS_TEXT_ONLY)
{
LLVOAvatar* avatarp = (LLVOAvatar*)gObjectList.findObject(speaker_id);
- if (!avatarp || dist_vec_squared(avatarp->getPositionAgent(), gAgent.getPositionAgent()) > CHAT_NORMAL_RADIUS_SQUARED)
+ if (!avatarp || dist_vec_squared(avatarp->getPositionAgent(), gAgent.getPositionAgent()) > CHAT_NORMAL_RADIUS * CHAT_NORMAL_RADIUS)
{
setSpeakerNotInChannel(speakerp);
}
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 536c030637..e0b96e43a6 100755
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -82,7 +82,6 @@
#include "llvfs.h"
#include "llxorcipher.h" // saved password, MAC address
#include "llwindow.h"
-#include "imageids.h"
#include "message.h"
#include "v3math.h"
@@ -241,6 +240,7 @@ static LLVector3 gAgentStartLookAt(1.0f, 0.f, 0.f);
static std::string gAgentStartLocation = "safe";
static bool mLoginStatePastUI = false;
+const S32 DEFAULT_MAX_AGENT_GROUPS = 25;
boost::scoped_ptr<LLEventPump> LLStartUp::sStateWatcher(new LLEventStream("StartupState"));
boost::scoped_ptr<LLStartupListener> LLStartUp::sListener(new LLStartupListener());
@@ -1431,8 +1431,8 @@ bool idle_startup()
LL_DEBUGS("AppInit") << "Initializing camera..." << LL_ENDL;
gFrameTime = totalTime();
- F32 last_time = gFrameTimeSeconds;
- gFrameTimeSeconds = (S64)(gFrameTime - gStartTime)/SEC_TO_MICROSEC;
+ LLUnit<F32, LLUnits::Seconds> last_time = gFrameTimeSeconds;
+ gFrameTimeSeconds = (gFrameTime - gStartTime);
gFrameIntervalSeconds = gFrameTimeSeconds - last_time;
if (gFrameIntervalSeconds < 0.f)
@@ -1933,6 +1933,7 @@ bool idle_startup()
LL_DEBUGS("AppInit") << "Initialization complete" << LL_ENDL;
+ LL_DEBUGS("SceneLoadTiming", "Start") << "Scene Load Started " << LL_ENDL;
gRenderStartTime.reset();
gForegroundTime.reset();
diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h
index 760e38890b..e39810713a 100755
--- a/indra/newview/llstartup.h
+++ b/indra/newview/llstartup.h
@@ -45,6 +45,18 @@ bool login_alert_done(const LLSD& notification, const LLSD& response);
extern std::string SCREEN_HOME_FILENAME;
extern std::string SCREEN_LAST_FILENAME;
+// start location constants
+enum EStartLocation
+{
+ START_LOCATION_ID_LAST,
+ START_LOCATION_ID_HOME,
+ START_LOCATION_ID_DIRECT,
+ START_LOCATION_ID_PARCEL,
+ START_LOCATION_ID_TELEHUB,
+ START_LOCATION_ID_URL,
+ START_LOCATION_ID_COUNT
+};
+
typedef enum {
STATE_FIRST, // Initial startup
STATE_BROWSER_INIT, // Initialize web browser for login screen
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index b385d5cdfa..c1d15947de 100755
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -72,7 +72,6 @@
#include "lltrans.h"
// library includes
-#include "imageids.h"
#include "llfloaterreg.h"
#include "llfontgl.h"
#include "llrect.h"
diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp
index 93c7f54101..88eec48703 100755
--- a/indra/newview/llsurface.cpp
+++ b/indra/newview/llsurface.cpp
@@ -34,7 +34,7 @@
#include "llpatchvertexarray.h"
#include "patch_dct.h"
#include "patch_code.h"
-#include "bitpack.h"
+#include "llbitpack.h"
#include "llviewerobjectlist.h"
#include "llregionhandle.h"
#include "llagent.h"
diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp
index a9ba2bce9c..af51f9c7de 100755
--- a/indra/newview/llsurfacepatch.cpp
+++ b/indra/newview/llsurfacepatch.cpp
@@ -33,7 +33,6 @@
#include "llsurface.h"
#include "pipeline.h"
#include "llagent.h"
-#include "timing.h"
#include "llsky.h"
#include "llviewercamera.h"
@@ -44,11 +43,11 @@
#include "noise.h"
extern bool gShiftFrame;
-extern U64 gFrameTime;
+extern LLUnitImplicit<U64, LLUnits::Microseconds> gFrameTime;
extern LLPipeline gPipeline;
-LLSurfacePatch::LLSurfacePatch() :
- mHasReceivedData(FALSE),
+LLSurfacePatch::LLSurfacePatch()
+: mHasReceivedData(FALSE),
mSTexUpdate(FALSE),
mDirty(FALSE),
mDirtyZStats(TRUE),
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 3276b2b9e1..c09fe180f1 100755
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -354,7 +354,7 @@ BOOL LLFloaterTexturePicker::handleDragAndDrop(
}
handled = TRUE;
- lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLFloaterTexturePicker " << getName() << llendl;
+ LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFloaterTexturePicker " << getName() << llendl;
return handled;
}
@@ -666,10 +666,10 @@ const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, BOOL co
LLInventoryModel::INCLUDE_TRASH,
asset_id_matches);
- if (items.count())
+ if (items.size())
{
// search for copyable version first
- for (S32 i = 0; i < items.count(); i++)
+ for (S32 i = 0; i < items.size(); i++)
{
LLInventoryItem* itemp = items[i];
LLPermissions item_permissions = itemp->getPermissions();
@@ -1436,7 +1436,7 @@ BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask,
}
handled = TRUE;
- lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLTextureCtrl " << getName() << llendl;
+ LL_DEBUGS("UserInput") << "dragAndDrop handled by LLTextureCtrl " << getName() << llendl;
return handled;
}
diff --git a/indra/newview/lltoastgroupnotifypanel.h b/indra/newview/lltoastgroupnotifypanel.h
index dfdc6ae559..431fd32da2 100755
--- a/indra/newview/lltoastgroupnotifypanel.h
+++ b/indra/newview/lltoastgroupnotifypanel.h
@@ -29,7 +29,6 @@
#include "llfontgl.h"
#include "lltoastpanel.h"
-#include "lldarray.h"
#include "lltimer.h"
#include "llviewermessage.h"
#include "llnotificationptr.h"
diff --git a/indra/newview/lltool.cpp b/indra/newview/lltool.cpp
index 2d8ce95347..f4499f2da8 100755
--- a/indra/newview/lltool.cpp
+++ b/indra/newview/lltool.cpp
@@ -103,7 +103,7 @@ BOOL LLTool::handleMouseUp(S32 x, S32 y, MASK mask)
BOOL LLTool::handleHover(S32 x, S32 y, MASK mask)
{
gViewerWindow->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by a tool" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by a tool" << llendl;
// by default, do nothing, say we handled it
return TRUE;
}
diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp
index 08d82ea9cb..96b742aebc 100755
--- a/indra/newview/lltoolbrush.cpp
+++ b/indra/newview/lltoolbrush.cpp
@@ -401,7 +401,7 @@ BOOL LLToolBrushLand::handleMouseDown(S32 x, S32 y, MASK mask)
BOOL LLToolBrushLand::handleHover( S32 x, S32 y, MASK mask )
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolBrushLand ("
+ LL_DEBUGS("UserInput") << "hover handled by LLToolBrushLand ("
<< (hasMouseCapture() ? "active":"inactive")
<< ")" << llendl;
mMouseX = x;
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index a4dce9efe8..ca28397d52 100755
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -255,7 +255,7 @@ void LLCategoryDropDescendentsObserver::done()
LLInventoryModel::EXCLUDE_TRASH);
}
- S32 count = items.count();
+ S32 count = items.size();
if (count)
{
std::set<LLUUID> unique_ids;
@@ -407,16 +407,16 @@ void LLToolDragAndDrop::beginDrag(EDragAndDropType type,
items,
LLInventoryModel::EXCLUDE_TRASH,
is_not_preferred);
- S32 count = cats.count();
+ S32 count = cats.size();
S32 i;
for(i = 0; i < count; ++i)
{
- folder_ids.push_back(cats.get(i)->getUUID());
+ folder_ids.push_back(cats.at(i)->getUUID());
}
- count = items.count();
+ count = items.size();
for(i = 0; i < count; ++i)
{
- item_ids.push_back(items.get(i)->getUUID());
+ item_ids.push_back(items.at(i)->getUUID());
}
if (!folder_ids.empty() || !item_ids.empty())
{
@@ -478,7 +478,7 @@ void LLToolDragAndDrop::beginMultiDrag(
items,
LLInventoryModel::EXCLUDE_TRASH,
is_not_preferred);
- S32 cat_count = cats.count();
+ S32 cat_count = cats.size();
for(S32 i = 0; i < cat_count; ++i)
{
cat_ids.insert(cat->getUUID());
@@ -597,7 +597,7 @@ BOOL LLToolDragAndDrop::handleHover( S32 x, S32 y, MASK mask )
ECursorType cursor = acceptanceToCursor(acceptance);
gViewerWindow->getWindow()->setCursor( cursor );
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolDragAndDrop" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolDragAndDrop" << llendl;
return TRUE;
}
@@ -2245,7 +2245,7 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory(
items,
LLInventoryModel::EXCLUDE_TRASH,
droppable);
- cats.put(cat);
+ cats.push_back(cat);
if (droppable.countNoCopy() > 0)
{
llwarns << "*** Need to confirm this step" << llendl;
@@ -2487,7 +2487,7 @@ EAcceptance LLToolDragAndDrop::dad3dCategoryOnLand(
items,
LLInventoryModel::EXCLUDE_TRASH,
droppable);
- if(items.count() > 0)
+ if(items.size() > 0)
{
rv = ACCEPT_YES_SINGLE;
}
@@ -2514,14 +2514,14 @@ EAcceptance LLToolDragAndDrop::dad3dAssetOnLand(
LLViewerInventoryItem::item_array_t items;
LLViewerInventoryItem::item_array_t copyable_items;
locateMultipleInventory(items, cats);
- if(!items.count()) return ACCEPT_NO;
+ if(!items.size()) return ACCEPT_NO;
EAcceptance rv = ACCEPT_NO;
- for (S32 i = 0; i < items.count(); i++)
+ for (S32 i = 0; i < items.size(); i++)
{
LLInventoryItem* item = items[i];
if(item->getPermissions().allowCopyBy(gAgent.getID()))
{
- copyable_items.put(item);
+ copyable_items.push_back(item);
rv = ACCEPT_YES_SINGLE;
}
}
@@ -2593,21 +2593,21 @@ LLInventoryObject* LLToolDragAndDrop::locateInventory(
LLInventoryObject* LLToolDragAndDrop::locateMultipleInventory(LLViewerInventoryCategory::cat_array_t& cats,
LLViewerInventoryItem::item_array_t& items)
{
- if(mCargoIDs.count() == 0) return NULL;
+ if(mCargoIDs.size() == 0) return NULL;
if((mSource == SOURCE_AGENT) || (mSource == SOURCE_LIBRARY))
{
// The object should be in user inventory.
- for (S32 i = 0; i < mCargoIDs.count(); i++)
+ for (S32 i = 0; i < mCargoIDs.size(); i++)
{
LLInventoryItem* item = gInventory.getItem(mCargoIDs[i]);
if (item)
{
- items.put(item);
+ items.push_back(item);
}
LLInventoryCategory* category = gInventory.getCategory(mCargoIDs[i]);
if (category)
{
- cats.put(category);
+ cats.push_back(category);
}
}
}
@@ -2621,23 +2621,23 @@ LLInventoryObject* LLToolDragAndDrop::locateMultipleInventory(LLViewerInventoryC
|| (mCargoType == DAD_ROOT_CATEGORY))
{
// The object should be in user inventory.
- for (S32 i = 0; i < mCargoIDs.count(); i++)
+ for (S32 i = 0; i < mCargoIDs.size(); i++)
{
LLInventoryCategory* category = (LLInventoryCategory*)obj->getInventoryObject(mCargoIDs[i]);
if (category)
{
- cats.put(category);
+ cats.push_back(category);
}
}
}
else
{
- for (S32 i = 0; i < mCargoIDs.count(); i++)
+ for (S32 i = 0; i < mCargoIDs.size(); i++)
{
LLInventoryItem* item = (LLInventoryItem*)obj->getInventoryObject(mCargoIDs[i]);
if (item)
{
- items.put(item);
+ items.push_back(item);
}
}
}
@@ -2649,11 +2649,11 @@ LLInventoryObject* LLToolDragAndDrop::locateMultipleInventory(LLViewerInventoryC
card = (LLPreviewNotecard*)LLPreview::find(mSourceID);
if(card)
{
- items.put((LLInventoryItem*)card->getDragItem());
+ items.push_back((LLInventoryItem*)card->getDragItem());
}
}
- if(items.count()) return items[0];
- if(cats.count()) return cats[0];
+ if(items.size()) return items[0];
+ if(cats.size()) return cats[0];
return NULL;
}
*/
diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h
index f17300a76a..99b794ce58 100755
--- a/indra/newview/lltooldraganddrop.h
+++ b/indra/newview/lltooldraganddrop.h
@@ -31,9 +31,7 @@
#include "lltool.h"
#include "llview.h"
#include "lluuid.h"
-#include "stdenums.h"
#include "llassetstorage.h"
-#include "lldarray.h"
#include "llpermissions.h"
#include "llwindow.h"
#include "llviewerinventory.h"
diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp
index 857b0f0714..a320d37084 100755
--- a/indra/newview/lltoolfocus.cpp
+++ b/indra/newview/lltoolfocus.cpp
@@ -334,7 +334,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
{
if (!mValidClickPoint)
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolFocus [invalid point]" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolFocus [invalid point]" << llendl;
gViewerWindow->setCursor(UI_CURSOR_NO);
gViewerWindow->showCursor();
return TRUE;
@@ -361,7 +361,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
gViewerWindow->moveCursorToCenter();
}
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolFocus [active]" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolFocus [active]" << llendl;
}
else if ( gCameraBtnPan ||
mask == MASK_PAN ||
@@ -389,7 +389,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
gViewerWindow->moveCursorToCenter();
}
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPan" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolPan" << llendl;
}
else if (gCameraBtnZoom)
{
@@ -421,7 +421,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
gViewerWindow->moveCursorToCenter();
}
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolZoom" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolZoom" << llendl;
}
}
diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp
index 9907da0f0e..a9216568c2 100755
--- a/indra/newview/lltoolgrab.cpp
+++ b/indra/newview/lltoolgrab.cpp
@@ -707,7 +707,7 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask)
// HACK to avoid assert: error checking system makes sure that the cursor is set during every handleHover. This is actually a no-op since the cursor is hidden.
gViewerWindow->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolGrab (active) [cursor hidden]" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (active) [cursor hidden]" << llendl;
}
@@ -871,7 +871,7 @@ void LLToolGrab::handleHoverNonPhysical(S32 x, S32 y, MASK mask)
void LLToolGrab::handleHoverInactive(S32 x, S32 y, MASK mask)
{
// JC - TODO - change cursor based on gGrabBtnVertical, gGrabBtnSpin
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolGrab (inactive-not over editable object)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (inactive-not over editable object)" << llendl;
gViewerWindow->setCursor(UI_CURSOR_TOOLGRAB);
}
@@ -881,7 +881,7 @@ void LLToolGrab::handleHoverFailed(S32 x, S32 y, MASK mask)
if( GRAB_NOOBJECT == mMode )
{
gViewerWindow->setCursor(UI_CURSOR_NO);
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolGrab (not on object)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (not on object)" << llendl;
}
else
{
@@ -894,13 +894,13 @@ void LLToolGrab::handleHoverFailed(S32 x, S32 y, MASK mask)
{
case GRAB_LOCKED:
gViewerWindow->setCursor(UI_CURSOR_GRABLOCKED);
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolGrab (grab failed, no move permission)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (grab failed, no move permission)" << llendl;
break;
// Non physical now handled by handleHoverActive - CRO
// case GRAB_NONPHYSICAL:
// gViewerWindow->setCursor(UI_CURSOR_ARROW);
-// lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolGrab (grab failed, nonphysical)" << llendl;
+// LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (grab failed, nonphysical)" << llendl;
// break;
default:
llassert(0);
@@ -909,7 +909,7 @@ void LLToolGrab::handleHoverFailed(S32 x, S32 y, MASK mask)
else
{
gViewerWindow->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolGrab (grab failed but within slop)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (grab failed but within slop)" << llendl;
}
}
}
diff --git a/indra/newview/lltoolgun.cpp b/indra/newview/lltoolgun.cpp
index c1735adc9c..17795af65d 100755
--- a/indra/newview/lltoolgun.cpp
+++ b/indra/newview/lltoolgun.cpp
@@ -116,11 +116,11 @@ BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask)
gViewerWindow->hideCursor();
}
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolGun (mouselook)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolGun (mouselook)" << llendl;
}
else
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolGun (not mouselook)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolGun (not mouselook)" << llendl;
}
// HACK to avoid assert: error checking system makes sure that the cursor is set during every handleHover. This is actually a no-op since the cursor is hidden.
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index c912d81a03..fe520b26df 100755
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -558,7 +558,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
// could disable it here.
show_highlight = true;
// cursor set by media object
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << llendl;
}
else if (!mMouseOutsideSlop
&& mMouseButtonDown
@@ -595,7 +595,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
show_highlight = true;
ECursorType cursor = cursorFromObject(click_action_object);
gViewerWindow->setCursor(cursor);
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << llendl;
}
else if ((object && !object->isAvatar() && object->flagUsePhysics())
@@ -603,19 +603,19 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
{
show_highlight = true;
gViewerWindow->setCursor(UI_CURSOR_TOOLGRAB);
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << llendl;
}
else if ( (object && object->flagHandleTouch())
|| (parent && parent->flagHandleTouch()))
{
show_highlight = true;
gViewerWindow->setCursor(UI_CURSOR_HAND);
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << llendl;
}
else
{
gViewerWindow->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << llendl;
}
}
diff --git a/indra/newview/lltoolplacer.cpp b/indra/newview/lltoolplacer.cpp
index b7718847ae..3b1b40a7f0 100755
--- a/indra/newview/lltoolplacer.cpp
+++ b/indra/newview/lltoolplacer.cpp
@@ -518,7 +518,7 @@ BOOL LLToolPlacer::placeObject(S32 x, S32 y, MASK mask)
BOOL LLToolPlacer::handleHover(S32 x, S32 y, MASK mask)
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPlacer" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolPlacer" << llendl;
gViewerWindow->setCursor(UI_CURSOR_TOOLCREATE);
return TRUE;
}
diff --git a/indra/newview/lltoolselectland.cpp b/indra/newview/lltoolselectland.cpp
index a48388c591..d44ac53db0 100755
--- a/indra/newview/lltoolselectland.cpp
+++ b/indra/newview/lltoolselectland.cpp
@@ -168,13 +168,13 @@ BOOL LLToolSelectLand::handleHover(S32 x, S32 y, MASK mask)
roundXY(mWestSouthBottom);
roundXY(mEastNorthTop);
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolSelectLand (active, land)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolSelectLand (active, land)" << llendl;
gViewerWindow->setCursor(UI_CURSOR_ARROW);
}
else
{
mDragEndValid = FALSE;
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolSelectLand (active, no land)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolSelectLand (active, no land)" << llendl;
gViewerWindow->setCursor(UI_CURSOR_NO);
}
@@ -183,13 +183,13 @@ BOOL LLToolSelectLand::handleHover(S32 x, S32 y, MASK mask)
}
else
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolSelectLand (active, in slop)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolSelectLand (active, in slop)" << llendl;
gViewerWindow->setCursor(UI_CURSOR_ARROW);
}
}
else
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolSelectLand (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolSelectLand (inactive)" << llendl;
gViewerWindow->setCursor(UI_CURSOR_ARROW);
}
diff --git a/indra/newview/lltoolselectrect.cpp b/indra/newview/lltoolselectrect.cpp
index a3f4e5a18c..271a417fb9 100755
--- a/indra/newview/lltoolselectrect.cpp
+++ b/indra/newview/lltoolselectrect.cpp
@@ -32,7 +32,6 @@
// Library includes
#include "llgl.h"
#include "llrender.h"
-#include "lldarray.h"
// Viewer includes
#include "llviewercontrol.h"
@@ -145,11 +144,11 @@ BOOL LLToolSelectRect::handleHover(S32 x, S32 y, MASK mask)
return LLToolSelect::handleHover(x, y, mask);
}
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolSelectRect (active)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolSelectRect (active)" << llendl;
}
else
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolSelectRect (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolSelectRect (inactive)" << llendl;
}
gViewerWindow->setCursor(UI_CURSOR_ARROW);
diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp
index cbd16e873d..34cbd25fd8 100755
--- a/indra/newview/lltracker.cpp
+++ b/indra/newview/lltracker.cpp
@@ -28,7 +28,6 @@
// library includes
#include "llcoord.h"
-#include "lldarray.h"
#include "llfontgl.h"
#include "llgl.h"
#include "llrender.h"
diff --git a/indra/newview/lltracker.h b/indra/newview/lltracker.h
index 8e916af315..e62a7d8407 100755
--- a/indra/newview/lltracker.h
+++ b/indra/newview/lltracker.h
@@ -33,7 +33,6 @@
#ifndef LL_LLTRACKER_H
#define LL_LLTRACKER_H
-#include "lldarray.h"
#include "llpointer.h"
#include "llstring.h"
#include "lluuid.h"
@@ -138,8 +137,8 @@ protected:
std::string mTrackedLandmarkName;
LLUUID mTrackedLandmarkAssetID;
LLUUID mTrackedLandmarkItemID;
- LLDynamicArray<LLUUID> mLandmarkAssetIDList;
- LLDynamicArray<LLUUID> mLandmarkItemIDList;
+ std::vector<LLUUID> mLandmarkAssetIDList;
+ std::vector<LLUUID> mLandmarkItemIDList;
BOOL mHasReachedLandmark;
BOOL mHasLandmarkPosition;
BOOL mLandmarkHasBeenVisited;
diff --git a/indra/newview/llviewerassettype.h b/indra/newview/llviewerassettype.h
index ec8b822917..9ad8ea7eeb 100755
--- a/indra/newview/llviewerassettype.h
+++ b/indra/newview/llviewerassettype.h
@@ -29,6 +29,7 @@
#include <string>
#include "llassettype.h"
+#include "llui.h" //EDragAndDropType
// This class is similar to llassettype, but contains methods
// only used by the viewer.
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 78a0ed3ffa..557403b914 100755
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -98,6 +98,11 @@ BOOL gWindowResized = FALSE;
BOOL gSnapshot = FALSE;
BOOL gShaderProfileFrame = FALSE;
+// This is how long the sim will try to teleport you before giving up.
+const F32 TELEPORT_EXPIRY = 15.0f;
+// Additional time (in seconds) to wait per attachment
+const F32 TELEPORT_EXPIRY_PER_ATTACHMENT = 3.f;
+
U32 gRecentFrameCount = 0; // number of 'recent' frames
LLFrameTimer gRecentFPSTime;
LLFrameTimer gRecentMemoryTime;
diff --git a/indra/newview/llviewergesture.h b/indra/newview/llviewergesture.h
index 8dba10226b..8b621850ea 100755
--- a/indra/newview/llviewergesture.h
+++ b/indra/newview/llviewergesture.h
@@ -30,7 +30,6 @@
#include "llanimationstates.h"
#include "lluuid.h"
#include "llstring.h"
-#include "lldarray.h"
#include "llgesture.h"
class LLMessageSystem;
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index ab19a12014..a10eda947d 100755
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -49,7 +49,7 @@ class LLViewerInventoryCategory;
class LLViewerInventoryItem : public LLInventoryItem, public boost::signals2::trackable
{
public:
- typedef LLDynamicArray<LLPointer<LLViewerInventoryItem> > item_array_t;
+ typedef std::vector<LLPointer<LLViewerInventoryItem> > item_array_t;
protected:
~LLViewerInventoryItem( void ); // ref counted
@@ -181,7 +181,7 @@ public:
class LLViewerInventoryCategory : public LLInventoryCategory
{
public:
- typedef LLDynamicArray<LLPointer<LLViewerInventoryCategory> > cat_array_t;
+ typedef std::vector<LLPointer<LLViewerInventoryCategory> > cat_array_t;
protected:
~LLViewerInventoryCategory();
diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp
index 3a04bbed4f..0e99e161c4 100755
--- a/indra/newview/llviewerjointattachment.cpp
+++ b/indra/newview/llviewerjointattachment.cpp
@@ -28,7 +28,6 @@
#include "llviewerjointattachment.h"
-#include "llagentconstants.h"
#include "llviewercontrol.h"
#include "lldrawable.h"
#include "llgl.h"
@@ -46,6 +45,7 @@
#include "llglheaders.h"
extern LLPipeline gPipeline;
+const F32 MAX_ATTACHMENT_DIST = 3.5f; // meters?
//-----------------------------------------------------------------------------
// LLViewerJointAttachment()
diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp
index 64454a03d1..6cf39d319b 100755
--- a/indra/newview/llviewerjointmesh.cpp
+++ b/indra/newview/llviewerjointmesh.cpp
@@ -29,7 +29,6 @@
//-----------------------------------------------------------------------------
#include "llviewerprecompiledheaders.h"
-#include "imageids.h"
#include "llfasttimer.h"
#include "llrender.h"
@@ -116,7 +115,7 @@ void LLViewerJointMesh::uploadJointMatrices()
BOOL hardware_skinning = (poolp && poolp->getVertexShaderLevel() > 0) ? TRUE : FALSE;
//calculate joint matrices
- for (joint_num = 0; joint_num < reference_mesh->mJointRenderData.count(); joint_num++)
+ for (joint_num = 0; joint_num < reference_mesh->mJointRenderData.size(); joint_num++)
{
LLMatrix4 joint_mat = *reference_mesh->mJointRenderData[joint_num]->mWorldMatrix;
@@ -132,7 +131,7 @@ void LLViewerJointMesh::uploadJointMatrices()
S32 j = 0;
//upload joint pivots
- for (joint_num = 0; joint_num < reference_mesh->mJointRenderData.count(); joint_num++)
+ for (joint_num = 0; joint_num < reference_mesh->mJointRenderData.size(); joint_num++)
{
LLSkinJoint *sj = reference_mesh->mJointRenderData[joint_num]->mSkinJoint;
if (sj)
@@ -172,7 +171,7 @@ void LLViewerJointMesh::uploadJointMatrices()
GLfloat mat[45*4];
memset(mat, 0, sizeof(GLfloat)*45*4);
- for (joint_num = 0; joint_num < reference_mesh->mJointRenderData.count(); joint_num++)
+ for (joint_num = 0; joint_num < reference_mesh->mJointRenderData.size(); joint_num++)
{
gJointMatUnaligned[joint_num].transpose();
@@ -193,7 +192,7 @@ void LLViewerJointMesh::uploadJointMatrices()
else
{
//load gJointMatUnaligned into gJointMatAligned
- for (joint_num = 0; joint_num < reference_mesh->mJointRenderData.count(); ++joint_num)
+ for (joint_num = 0; joint_num < reference_mesh->mJointRenderData.size(); ++joint_num)
{
gJointMatAligned[joint_num].loadu(gJointMatUnaligned[joint_num]);
}
diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp
index 49ac2735ca..e05df2389e 100755
--- a/indra/newview/llviewerkeyboard.cpp
+++ b/indra/newview/llviewerkeyboard.cpp
@@ -676,7 +676,7 @@ BOOL LLViewerKeyboard::handleKey(KEY translated_key, MASK translated_mask, BOOL
return FALSE;
}
- lldebugst(LLERR_USER_INPUT) << "keydown -" << translated_key << "-" << llendl;
+ LL_DEBUGS("UserInput") << "keydown -" << translated_key << "-" << llendl;
// skip skipped keys
if(mKeysSkippedByUI.find(translated_key) != mKeysSkippedByUI.end())
{
@@ -729,7 +729,7 @@ BOOL LLViewerKeyboard::bindKey(const S32 mode, const KEY key, const MASK mask, c
if (!function)
{
- llerrs << "Can't bind key to function " << function_name << ", no function with this name found" << llendl;
+ LL_ERRS() << "Can't bind key to function " << function_name << ", no function with this name found" << LL_ENDL;
return FALSE;
}
@@ -742,13 +742,13 @@ BOOL LLViewerKeyboard::bindKey(const S32 mode, const KEY key, const MASK mask, c
if (index >= MAX_KEY_BINDINGS)
{
- llerrs << "LLKeyboard::bindKey() - too many keys for mode " << mode << llendl;
+ LL_ERRS() << "LLKeyboard::bindKey() - too many keys for mode " << mode << LL_ENDL;
return FALSE;
}
if (mode >= MODE_COUNT)
{
- llerror("LLKeyboard::bindKey() - unknown mode passed", mode);
+ LL_ERRS() << "LLKeyboard::bindKey() - unknown mode passed" << mode << LL_ENDL;
return FALSE;
}
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 9f67aad297..427fd89afb 100755
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -123,6 +123,7 @@
#include "lltoolgrab.h"
#include "llwindow.h"
#include "llpathfindingmanager.h"
+#include "llstartup.h"
#include "boost/unordered_map.hpp"
using namespace LLAvatarAppearanceDefines;
@@ -4159,13 +4160,16 @@ static bool get_derezzable_objects(
EDeRezDestination dest,
std::string& error,
LLViewerRegion*& first_region,
- LLDynamicArray<LLViewerObjectPtr>* derez_objectsp,
+ std::vector<LLViewerObjectPtr>* derez_objectsp,
bool only_check = false)
{
bool found = false;
LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
-
+
+ if (derez_objectsp)
+ derez_objectsp->reserve(selection->getRootObjectCount());
+
// Check conditions that we can't deal with, building a list of
// everything that we'll actually be derezzing.
for (LLObjectSelection::valid_root_iterator iter = selection->valid_root_begin();
@@ -4244,7 +4248,7 @@ static bool get_derezzable_objects(
break;
if (derez_objectsp)
- derez_objectsp->put(object);
+ derez_objectsp->push_back(object);
}
}
@@ -4264,9 +4268,9 @@ static void derez_objects(
const LLUUID& dest_id,
LLViewerRegion*& first_region,
std::string& error,
- LLDynamicArray<LLViewerObjectPtr>* objectsp)
+ std::vector<LLViewerObjectPtr>* objectsp)
{
- LLDynamicArray<LLViewerObjectPtr> derez_objects;
+ std::vector<LLViewerObjectPtr> derez_objects;
if (!objectsp) // if objects to derez not specified
{
@@ -4293,13 +4297,13 @@ static void derez_objects(
// satisfy anybody.
const S32 MAX_ROOTS_PER_PACKET = 250;
const S32 MAX_PACKET_COUNT = 254;
- F32 packets = ceil((F32)objectsp->count() / (F32)MAX_ROOTS_PER_PACKET);
+ F32 packets = ceil((F32)objectsp->size() / (F32)MAX_ROOTS_PER_PACKET);
if(packets > (F32)MAX_PACKET_COUNT)
{
error = "AcquireErrorTooManyObjects";
}
- if(error.empty() && objectsp->count() > 0)
+ if(error.empty() && objectsp->size() > 0)
{
U8 d = (U8)dest;
LLUUID tid;
@@ -4324,11 +4328,11 @@ static void derez_objects(
msg->addU8Fast(_PREHASH_PacketCount, packet_count);
msg->addU8Fast(_PREHASH_PacketNumber, packet_number);
objects_in_packet = 0;
- while((object_index < objectsp->count())
+ while((object_index < objectsp->size())
&& (objects_in_packet++ < MAX_ROOTS_PER_PACKET))
{
- LLViewerObject* object = objectsp->get(object_index++);
+ LLViewerObject* object = objectsp->at(object_index++);
msg->nextBlockFast(_PREHASH_ObjectData);
msg->addU32Fast(_PREHASH_ObjectLocalID, object->getLocalID());
// VEFFECT: DerezObject
@@ -4408,7 +4412,7 @@ private:
LLObjectSelectionHandle mObjectSelection;
- LLDynamicArray<LLViewerObjectPtr> mReturnableObjects;
+ std::vector<LLViewerObjectPtr> mReturnableObjects;
std::string mError;
LLViewerRegion* mFirstRegion;
};
@@ -5280,7 +5284,7 @@ public:
};
LLObjectSelectionHandle mObjectSelection;
- LLDynamicArray<LLViewerObjectPtr> mReturnableObjects;
+ std::vector<LLViewerObjectPtr> mReturnableObjects;
std::string mError;
LLViewerRegion *mFirstRegion;
};
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 970f6913cb..864418ad95 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -149,6 +149,11 @@ LLFrameTimer gThrottleTimer;
const U32 OFFER_THROTTLE_MAX_COUNT=5; //number of items per time period
const F32 OFFER_THROTTLE_TIME=10.f; //time period in seconds
+// Agent Update Flags (U8)
+const U8 AU_FLAGS_NONE = 0x00;
+const U8 AU_FLAGS_HIDETITLE = 0x01;
+const U8 AU_FLAGS_CLIENT_AUTOPILOT = 0x02;
+
//script permissions
const std::string SCRIPT_QUESTIONS[SCRIPT_PERMISSION_EOF] =
{
@@ -665,7 +670,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response)
S32 max_groups = gMaxAgentGroups;
if(gAgent.isInGroup(group_id)) ++max_groups;
- if(gAgent.mGroups.count() < max_groups)
+ if(gAgent.mGroups.size() < max_groups)
{
accept_invite = true;
}
@@ -3799,15 +3804,15 @@ public:
is_card);
}
LLSD args;
- if ( land_items.count() > 0 )
+ if ( land_items.size() > 0 )
{ // Show notification that they can now teleport to landmarks. Use a random landmark from the inventory
- S32 random_land = ll_rand( land_items.count() - 1 );
+ S32 random_land = ll_rand( land_items.size() - 1 );
args["NAME"] = land_items[random_land]->getName();
LLNotificationsUtil::add("TeleportToLandmark",args);
}
- if ( card_items.count() > 0 )
+ if ( card_items.size() > 0 )
{ // Show notification that they can now contact people. Use a random calling card from the inventory
- S32 random_card = ll_rand( card_items.count() - 1 );
+ S32 random_card = ll_rand( card_items.size() - 1 );
args["NAME"] = card_items[random_card]->getName();
LLNotificationsUtil::add("TeleportToPerson",args);
}
@@ -6803,7 +6808,7 @@ bool handle_lure_callback(const LLSD& notification, const LLSD& response)
void handle_lure(const LLUUID& invitee)
{
- LLDynamicArray<LLUUID> ids;
+ std::vector<LLUUID> ids;
ids.push_back(invitee);
handle_lure(ids);
}
@@ -6819,7 +6824,7 @@ void handle_lure(const uuid_vec_t& ids)
edit_args["REGION"] = gAgent.getRegion()->getName();
LLSD payload;
- for (LLDynamicArray<LLUUID>::const_iterator it = ids.begin();
+ for (std::vector<LLUUID>::const_iterator it = ids.begin();
it != ids.end();
++it)
{
diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h
index 3237f3fbdd..d8f5c71f8d 100755
--- a/indra/newview/llviewermessage.h
+++ b/indra/newview/llviewermessage.h
@@ -33,7 +33,6 @@
#include "lltransactiontypes.h"
#include "lluuid.h"
#include "message.h"
-#include "stdenums.h"
#include "llnotifications.h"
#include "llextendedstatus.h"
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index e834febad5..51328dc802 100755
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -29,7 +29,6 @@
#include "llviewerobject.h"
#include "llaudioengine.h"
-#include "imageids.h"
#include "indra_constants.h"
#include "llmath.h"
#include "llflexibleobject.h"
@@ -53,7 +52,6 @@
#include "llxfermanager.h"
#include "message.h"
#include "object_flags.h"
-#include "timing.h"
#include "llaudiosourcevo.h"
#include "llagent.h"
@@ -126,6 +124,15 @@ F64 LLViewerObject::sPhaseOutUpdateInterpolationTime = 2.0; // For motion inte
std::map<std::string, U32> LLViewerObject::sObjectDataMap;
+// The maximum size of an object extra parameters binary (packed) block
+#define MAX_OBJECT_PARAMS_SIZE 1024
+
+// At 45 Hz collisions seem stable and objects seem
+// to settle down at a reasonable rate.
+// JC 3/18/2003
+
+const F32 PHYSICS_TIMESTEP = 1.f / 45.f;
+
static LLFastTimer::DeclareTimer FTM_CREATE_OBJECT("Create Object");
// static
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 8299c84663..4072ab524e 100755
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -29,7 +29,6 @@
#include "llviewerobjectlist.h"
#include "message.h"
-#include "timing.h"
#include "llfasttimer.h"
#include "llrender.h"
#include "llwindow.h" // decBusyCount()
@@ -997,14 +996,14 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
// update global timer
F32 last_time = gFrameTimeSeconds;
- U64 time = totalTime(); // this will become the new gFrameTime when the update is done
+ LLUnit<U64, LLUnits::Microseconds> time = totalTime(); // this will become the new gFrameTime when the update is done
// Time _can_ go backwards, for example if the user changes the system clock.
// It doesn't cause any fatal problems (just some oddness with stats), so we shouldn't assert here.
// llassert(time > gFrameTime);
- F64 time_diff = U64_to_F64(time - gFrameTime)/(F64)SEC_TO_MICROSEC;
+ LLUnit<F64, LLUnits::Seconds> time_diff = time - gFrameTime;
gFrameTime = time;
- F64 time_since_start = U64_to_F64(gFrameTime - gStartTime)/(F64)SEC_TO_MICROSEC;
- gFrameTimeSeconds = (F32)time_since_start;
+ LLUnit<F64, LLUnits::Seconds> time_since_start = gFrameTime - gStartTime;
+ gFrameTimeSeconds = time_since_start;
gFrameIntervalSeconds = gFrameTimeSeconds - last_time;
if (gFrameIntervalSeconds < 0.f)
@@ -1102,7 +1101,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
/*
// Debugging code for viewing orphans, and orphaned parents
LLUUID id;
- for (i = 0; i < mOrphanParents.count(); i++)
+ for (i = 0; i < mOrphanParents.size(); i++)
{
id = sIndexAndLocalIDToUUID[mOrphanParents[i]];
LLViewerObject *objectp = findObject(id);
@@ -1119,7 +1118,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
}
LLColor4 text_color;
- for (i = 0; i < mOrphanChildren.count(); i++)
+ for (i = 0; i < mOrphanChildren.size(); i++)
{
OrphanInfo oi = mOrphanChildren[i];
LLViewerObject *objectp = findObject(oi.mChildInfo);
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 4cdb568d17..b25d042d28 100755
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -36,7 +36,6 @@
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llparcel.h"
-#include "llsecondlifeurls.h"
#include "message.h"
#include "llfloaterreg.h"
@@ -591,13 +590,13 @@ void LLViewerParcelMgr::deselectLand()
void LLViewerParcelMgr::addObserver(LLParcelObserver* observer)
{
- mObservers.put(observer);
+ mObservers.push_back(observer);
}
void LLViewerParcelMgr::removeObserver(LLParcelObserver* observer)
{
- mObservers.removeObj(observer);
+ vector_replace_with_last(mObservers, observer);
}
@@ -606,16 +605,16 @@ void LLViewerParcelMgr::removeObserver(LLParcelObserver* observer)
// from the list.
void LLViewerParcelMgr::notifyObservers()
{
- LLDynamicArray<LLParcelObserver*> observers;
- S32 count = mObservers.count();
+ std::vector<LLParcelObserver*> observers;
+ S32 count = mObservers.size();
S32 i;
for(i = 0; i < count; ++i)
{
- observers.put(mObservers.get(i));
+ observers.push_back(mObservers.at(i));
}
for(i = 0; i < count; ++i)
{
- observers.get(i)->changed();
+ observers.at(i)->changed();
}
}
diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h
index 6183b7e90e..e2c8dc0ff2 100755
--- a/indra/newview/llviewerparcelmgr.h
+++ b/indra/newview/llviewerparcelmgr.h
@@ -28,7 +28,6 @@
#define LL_LLVIEWERPARCELMGR_H
#include "v3dmath.h"
-#include "lldarray.h"
#include "llframetimer.h"
#include "llsingleton.h"
#include "llparcelselection.h"
@@ -334,7 +333,7 @@ private:
LLVector3d mHoverWestSouth;
LLVector3d mHoverEastNorth;
- LLDynamicArray<LLParcelObserver*> mObservers;
+ std::vector<LLParcelObserver*> mObservers;
BOOL mTeleportInProgress;
teleport_finished_signal_t mTeleportFinishedSignal;
diff --git a/indra/newview/llviewerparceloverlay.cpp b/indra/newview/llviewerparceloverlay.cpp
index a1c12c5cd6..e29eef2dda 100755
--- a/indra/newview/llviewerparceloverlay.cpp
+++ b/indra/newview/llviewerparceloverlay.cpp
@@ -432,9 +432,12 @@ void LLViewerParcelOverlay::updatePropertyLines()
const LLColor4U auction_coloru = LLUIColorTable::instance().getColor("PropertyColorAuction").get();
// Build into dynamic arrays, then copy into static arrays.
- LLDynamicArray<LLVector3, 256> new_vertex_array;
- LLDynamicArray<LLColor4U, 256> new_color_array;
- LLDynamicArray<LLVector2, 256> new_coord_array;
+ std::vector<LLVector3> new_vertex_array;
+ new_vertex_array.reserve(256);
+ std::vector<LLColor4U> new_color_array;
+ new_color_array.reserve(256);
+ std::vector<LLVector2> new_coord_array;
+ new_coord_array.reserve(256);
U8 overlay = 0;
BOOL add_edge = FALSE;
@@ -599,7 +602,7 @@ void LLViewerParcelOverlay::updatePropertyLines()
// Now copy into static arrays for faster rendering.
// Attempt to recycle old arrays if possible to avoid memory
// shuffling.
- S32 new_vertex_count = new_vertex_array.count();
+ S32 new_vertex_count = new_vertex_array.size();
if (!(mVertexArray && mColorArray && new_vertex_count == mVertexCount))
{
@@ -623,7 +626,7 @@ void LLViewerParcelOverlay::updatePropertyLines()
F32* vertex = mVertexArray;
for (i = 0; i < mVertexCount; i++)
{
- const LLVector3& point = new_vertex_array.get(i);
+ const LLVector3& point = new_vertex_array.at(i);
*vertex = point.mV[VX];
vertex++;
*vertex = point.mV[VY];
@@ -635,7 +638,7 @@ void LLViewerParcelOverlay::updatePropertyLines()
U8* colorp = mColorArray;
for (i = 0; i < mVertexCount; i++)
{
- const LLColor4U& color = new_color_array.get(i);
+ const LLColor4U& color = new_color_array.at(i);
*colorp = color.mV[VRED];
colorp++;
*colorp = color.mV[VGREEN];
@@ -652,9 +655,9 @@ void LLViewerParcelOverlay::updatePropertyLines()
void LLViewerParcelOverlay::addPropertyLine(
- LLDynamicArray<LLVector3, 256>& vertex_array,
- LLDynamicArray<LLColor4U, 256>& color_array,
- LLDynamicArray<LLVector2, 256>& coord_array,
+ std::vector<LLVector3>& vertex_array,
+ std::vector<LLColor4U>& color_array,
+ std::vector<LLVector2>& coord_array,
const F32 start_x, const F32 start_y,
const U32 edge,
const LLColor4U& color)
@@ -662,6 +665,10 @@ void LLViewerParcelOverlay::addPropertyLine(
LLColor4U underwater( color );
underwater.mV[VALPHA] /= 2;
+ vertex_array.reserve(16);
+ color_array.reserve(16);
+ coord_array.reserve(16);
+
LLSurface& land = mRegion->getLand();
F32 dx;
@@ -716,11 +723,11 @@ void LLViewerParcelOverlay::addPropertyLine(
// First part, only one vertex
outside_z = land.resolveHeightRegion( outside_x, outside_y );
- if (outside_z > 20.f) color_array.put( color );
- else color_array.put( underwater );
+ if (outside_z > 20.f) color_array.push_back( color );
+ else color_array.push_back( underwater );
- vertex_array.put( LLVector3(outside_x, outside_y, outside_z) );
- coord_array.put( LLVector2(outside_x - start_x, 0.f) );
+ vertex_array.push_back( LLVector3(outside_x, outside_y, outside_z) );
+ coord_array.push_back( LLVector2(outside_x - start_x, 0.f) );
inside_x += dx * LINE_WIDTH;
inside_y += dy * LINE_WIDTH;
@@ -732,17 +739,17 @@ void LLViewerParcelOverlay::addPropertyLine(
inside_z = land.resolveHeightRegion( inside_x, inside_y );
outside_z = land.resolveHeightRegion( outside_x, outside_y );
- if (inside_z > 20.f) color_array.put( color );
- else color_array.put( underwater );
+ if (inside_z > 20.f) color_array.push_back( color );
+ else color_array.push_back( underwater );
- if (outside_z > 20.f) color_array.put( color );
- else color_array.put( underwater );
+ if (outside_z > 20.f) color_array.push_back( color );
+ else color_array.push_back( underwater );
- vertex_array.put( LLVector3(inside_x, inside_y, inside_z) );
- vertex_array.put( LLVector3(outside_x, outside_y, outside_z) );
+ vertex_array.push_back( LLVector3(inside_x, inside_y, inside_z) );
+ vertex_array.push_back( LLVector3(outside_x, outside_y, outside_z) );
- coord_array.put( LLVector2(outside_x - start_x, 1.f) );
- coord_array.put( LLVector2(outside_x - start_x, 0.f) );
+ coord_array.push_back( LLVector2(outside_x - start_x, 1.f) );
+ coord_array.push_back( LLVector2(outside_x - start_x, 0.f) );
inside_x += dx * (dx - LINE_WIDTH);
inside_y += dy * (dy - LINE_WIDTH);
@@ -758,17 +765,17 @@ void LLViewerParcelOverlay::addPropertyLine(
inside_z = land.resolveHeightRegion( inside_x, inside_y );
outside_z = land.resolveHeightRegion( outside_x, outside_y );
- if (inside_z > 20.f) color_array.put( color );
- else color_array.put( underwater );
+ if (inside_z > 20.f) color_array.push_back( color );
+ else color_array.push_back( underwater );
- if (outside_z > 20.f) color_array.put( color );
- else color_array.put( underwater );
+ if (outside_z > 20.f) color_array.push_back( color );
+ else color_array.push_back( underwater );
- vertex_array.put( LLVector3(inside_x, inside_y, inside_z) );
- vertex_array.put( LLVector3(outside_x, outside_y, outside_z) );
+ vertex_array.push_back( LLVector3(inside_x, inside_y, inside_z) );
+ vertex_array.push_back( LLVector3(outside_x, outside_y, outside_z) );
- coord_array.put( LLVector2(outside_x - start_x, 1.f) );
- coord_array.put( LLVector2(outside_x - start_x, 0.f) );
+ coord_array.push_back( LLVector2(outside_x - start_x, 1.f) );
+ coord_array.push_back( LLVector2(outside_x - start_x, 0.f) );
inside_x += dx;
inside_y += dy;
@@ -787,17 +794,17 @@ void LLViewerParcelOverlay::addPropertyLine(
inside_z = land.resolveHeightRegion( inside_x, inside_y );
outside_z = land.resolveHeightRegion( outside_x, outside_y );
- if (inside_z > 20.f) color_array.put( color );
- else color_array.put( underwater );
+ if (inside_z > 20.f) color_array.push_back( color );
+ else color_array.push_back( underwater );
- if (outside_z > 20.f) color_array.put( color );
- else color_array.put( underwater );
+ if (outside_z > 20.f) color_array.push_back( color );
+ else color_array.push_back( underwater );
- vertex_array.put( LLVector3(inside_x, inside_y, inside_z) );
- vertex_array.put( LLVector3(outside_x, outside_y, outside_z) );
+ vertex_array.push_back( LLVector3(inside_x, inside_y, inside_z) );
+ vertex_array.push_back( LLVector3(outside_x, outside_y, outside_z) );
- coord_array.put( LLVector2(outside_x - start_x, 1.f) );
- coord_array.put( LLVector2(outside_x - start_x, 0.f) );
+ coord_array.push_back( LLVector2(outside_x - start_x, 1.f) );
+ coord_array.push_back( LLVector2(outside_x - start_x, 0.f) );
inside_x += dx * LINE_WIDTH;
inside_y += dy * LINE_WIDTH;
@@ -808,11 +815,11 @@ void LLViewerParcelOverlay::addPropertyLine(
// Last edge is not drawn to the edge
outside_z = land.resolveHeightRegion( outside_x, outside_y );
- if (outside_z > 20.f) color_array.put( color );
- else color_array.put( underwater );
+ if (outside_z > 20.f) color_array.push_back( color );
+ else color_array.push_back( underwater );
- vertex_array.put( LLVector3(outside_x, outside_y, outside_z) );
- coord_array.put( LLVector2(outside_x - start_x, 0.f) );
+ vertex_array.push_back( LLVector3(outside_x, outside_y, outside_z) );
+ coord_array.push_back( LLVector2(outside_x - start_x, 0.f) );
}
diff --git a/indra/newview/llviewerparceloverlay.h b/indra/newview/llviewerparceloverlay.h
index 7445d5bf1d..14a2af5354 100755
--- a/indra/newview/llviewerparceloverlay.h
+++ b/indra/newview/llviewerparceloverlay.h
@@ -31,7 +31,6 @@
// One of these structures per region.
#include "llbbox.h"
-#include "lldarray.h"
#include "llframetimer.h"
#include "lluuid.h"
#include "llviewertexture.h"
@@ -88,9 +87,9 @@ private:
U8 ownership(S32 row, S32 col) const
{ return 0x7 & mOwnership[row * mParcelGridsPerEdge + col]; }
- void addPropertyLine(LLDynamicArray<LLVector3, 256>& vertex_array,
- LLDynamicArray<LLColor4U, 256>& color_array,
- LLDynamicArray<LLVector2, 256>& coord_array,
+ void addPropertyLine(std::vector<LLVector3>& vertex_array,
+ std::vector<LLColor4U>& color_array,
+ std::vector<LLVector2>& coord_array,
const F32 start_x, const F32 start_y,
const U32 edge,
const LLColor4U& color);
diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h
index 5df456dab6..999d9092bd 100755
--- a/indra/newview/llviewerprecompiledheaders.h
+++ b/indra/newview/llviewerprecompiledheaders.h
@@ -51,8 +51,6 @@
#endif
// Library headers from llcommon project:
-#include "bitpack.h"
-#include "imageids.h"
#include "indra_constants.h"
#include "llinitparam.h"
#include "llallocator.h"
@@ -74,9 +72,7 @@
#include "llstring.h"
#include "llsys.h"
#include "lltimer.h"
-#include "stdenums.h"
#include "stdtypes.h"
-#include "timing.h"
#include "u64.h"
// Library includes from llmath project
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index cd8466d948..f2e6f65bba 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -85,6 +85,7 @@ const S32 MAX_SEED_CAP_ATTEMPTS_BEFORE_LOGIN = 3;
const F32 CAP_REQUEST_TIMEOUT = 18;
// Even though we gave up on login, keep trying for caps after we are logged in:
const S32 MAX_CAP_REQUEST_ATTEMPTS = 30;
+const U32 DEFAULT_MAX_REGION_WIDE_PRIM_COUNT = 15000;
BOOL LLViewerRegion::sVOCacheCullingEnabled = FALSE;
S32 LLViewerRegion::sLastCameraUpdated = 0;
@@ -230,7 +231,7 @@ public:
void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content)
{
- LL_WARNS2("AppInit", "Capabilities") << "[status:" << statusNum << ":] " << content << LL_ENDL;
+ LL_WARNS("AppInit", "Capabilities") << "[status:" << statusNum << ":] " << content << LL_ENDL;
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
if (regionp)
{
@@ -243,12 +244,12 @@ public:
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
if(!regionp) //region was removed
{
- LL_WARNS2("AppInit", "Capabilities") << "Received results for region that no longer exists!" << LL_ENDL;
+ LL_WARNS("AppInit", "Capabilities") << "Received results for region that no longer exists!" << LL_ENDL;
return ;
}
if( mID != regionp->getHttpResponderID() ) // region is no longer referring to this responder
{
- LL_WARNS2("AppInit", "Capabilities") << "Received results for a stale http responder!" << LL_ENDL;
+ LL_WARNS("AppInit", "Capabilities") << "Received results for a stale http responder!" << LL_ENDL;
return ;
}
@@ -257,8 +258,7 @@ public:
{
regionp->setCapability(iter->first, iter->second);
- LL_DEBUGS2("AppInit", "Capabilities") << "got capability for "
- << iter->first << LL_ENDL;
+ LL_DEBUGS("AppInit", "Capabilities") << "got capability for " << iter->first << LL_ENDL;
/* HACK we're waiting for the ServerReleaseNotes */
if (iter->first == "ServerReleaseNotes" && regionp->getReleaseNotesRequested())
@@ -1618,10 +1618,10 @@ public:
S32 target_index = input["body"]["Index"][0]["Prey"].asInteger();
S32 you_index = input["body"]["Index"][0]["You" ].asInteger();
- LLDynamicArray<U32>* avatar_locs = &region->mMapAvatars;
- LLDynamicArray<LLUUID>* avatar_ids = &region->mMapAvatarIDs;
- avatar_locs->reset();
- avatar_ids->reset();
+ std::vector<U32>* avatar_locs = &region->mMapAvatars;
+ std::vector<LLUUID>* avatar_ids = &region->mMapAvatarIDs;
+ avatar_locs->clear();
+ avatar_ids->clear();
//llinfos << "coarse locations agent[0] " << input["body"]["AgentData"][0]["AgentID"].asUUID() << llendl;
//llinfos << "my agent id = " << gAgent.getID() << llendl;
@@ -1661,13 +1661,13 @@ public:
pos |= y;
pos <<= 8;
pos |= z;
- avatar_locs->put(pos);
+ avatar_locs->push_back(pos);
//llinfos << "next pos: " << x << "," << y << "," << z << ": " << pos << llendl;
if(has_agent_data) // for backwards compatibility with old message format
{
LLUUID agent_id(agents_it->get("AgentID").asUUID());
//llinfos << "next agent: " << agent_id.asString() << llendl;
- avatar_ids->put(agent_id);
+ avatar_ids->push_back(agent_id);
}
}
if (has_agent_data)
@@ -1688,8 +1688,8 @@ LLHTTPRegistration<CoarseLocationUpdate>
void LLViewerRegion::updateCoarseLocations(LLMessageSystem* msg)
{
//llinfos << "CoarseLocationUpdate" << llendl;
- mMapAvatars.reset();
- mMapAvatarIDs.reset(); // only matters in a rare case but it's good to be safe.
+ mMapAvatars.clear();
+ mMapAvatarIDs.clear(); // only matters in a rare case but it's good to be safe.
U8 x_pos = 0;
U8 y_pos = 0;
@@ -1738,10 +1738,10 @@ void LLViewerRegion::updateCoarseLocations(LLMessageSystem* msg)
pos |= y_pos;
pos <<= 8;
pos |= z_pos;
- mMapAvatars.put(pos);
+ mMapAvatars.push_back(pos);
if(has_agent_data)
{
- mMapAvatarIDs.put(agent_id);
+ mMapAvatarIDs.push_back(agent_id);
}
}
}
@@ -2470,7 +2470,7 @@ void LLViewerRegion::failedSeedCapability()
std::string url = getCapability("Seed");
if ( url.empty() )
{
- LL_WARNS2("AppInit", "Capabilities") << "Failed to get seed capabilities, and can not determine url for retries!" << LL_ENDL;
+ LL_WARNS("AppInit", "Capabilities") << "Failed to get seed capabilities, and can not determine url for retries!" << LL_ENDL;
return;
}
// After a few attempts, continue login. We will keep trying once in-world:
@@ -2496,7 +2496,7 @@ void LLViewerRegion::failedSeedCapability()
else
{
// *TODO: Give a user pop-up about this error?
- LL_WARNS2("AppInit", "Capabilities") << "Failed to get seed capabilities from '" << url << "' after " << mImpl->mSeedCapAttempts << " attempts. Giving up!" << LL_ENDL;
+ LL_WARNS("AppInit", "Capabilities") << "Failed to get seed capabilities from '" << url << "' after " << mImpl->mSeedCapAttempts << " attempts. Giving up!" << LL_ENDL;
}
}
@@ -2512,7 +2512,7 @@ public:
void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content)
{
- LL_WARNS2("AppInit", "SimulatorFeatures") << "[status:" << statusNum << "]: " << content << LL_ENDL;
+ LL_WARNS("AppInit", "SimulatorFeatures") << "[status:" << statusNum << "]: " << content << LL_ENDL;
retry();
}
@@ -2521,7 +2521,7 @@ public:
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
if(!regionp) //region is removed or responder is not created.
{
- LL_WARNS2("AppInit", "SimulatorFeatures") << "Received results for region that no longer exists!" << LL_ENDL;
+ LL_WARNS("AppInit", "SimulatorFeatures") << "Received results for region that no longer exists!" << LL_ENDL;
return ;
}
@@ -2534,7 +2534,7 @@ private:
if (mAttempt < mMaxAttempts)
{
mAttempt++;
- LL_WARNS2("AppInit", "SimulatorFeatures") << "Re-trying '" << mRetryURL << "'. Retry #" << mAttempt << LL_ENDL;
+ LL_WARNS("AppInit", "SimulatorFeatures") << "Re-trying '" << mRetryURL << "'. Retry #" << mAttempt << LL_ENDL;
LLHTTPClient::get(mRetryURL, new SimulatorFeaturesReceived(*this), LLSD(), CAP_REQUEST_TIMEOUT);
}
}
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index 2ac934d19c..24d3dfae92 100755
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -32,7 +32,6 @@
#include <string>
#include <boost/signals2.hpp>
-#include "lldarray.h"
#include "llwind.h"
#include "v3dmath.h"
#include "llstring.h"
@@ -407,8 +406,8 @@ public:
// messaging system in which the previous message only sends and parses the
// positions stored in the first array so they're maintained separately until
// we stop supporting the old CoarseLocationUpdate message.
- LLDynamicArray<U32> mMapAvatars;
- LLDynamicArray<LLUUID> mMapAvatarIDs;
+ std::vector<U32> mMapAvatars;
+ std::vector<LLUUID> mMapAvatarIDs;
static BOOL sVOCacheCullingEnabled; //vo cache culling enabled or not.
static S32 sLastCameraUpdated;
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 69a6c00a8f..94be8e2a83 100755
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -92,6 +92,9 @@ LLTrace::CountStatHandle<> FPS("FPS", "Frames rendered"),
LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Kilotriangles> >
TRIANGLES_DRAWN("trianglesdrawnstat");
+LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Kilotriangles> >
+ TRIANGLES_DRAWN_PER_FRAME("trianglesdrawnperframestat");
+
LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Kibibytes> >
ACTIVE_MESSAGE_DATA_RECEIVED("activemessagedatareceived", "Message system data received on all active regions"),
LAYERS_NETWORK_DATA_RECEIVED("layersdatareceived", "Network data received for layer data (terrain)"),
@@ -213,38 +216,37 @@ void LLViewerStats::resetStats()
LLViewerStats::instance().mRecording.reset();
}
-void LLViewerStats::updateFrameStats(const F64 time_diff)
+void LLViewerStats::updateFrameStats(const LLUnit<F64, LLUnits::Seconds> time_diff)
{
- LLUnit<F64, LLUnits::Seconds> time_diff_seconds(time_diff);
if (getRecording().getLastValue(LLStatViewer::PACKETS_LOST_PERCENT) > 5.0)
{
- add(LLStatViewer::LOSS_5_PERCENT_TIME, time_diff_seconds);
+ add(LLStatViewer::LOSS_5_PERCENT_TIME, time_diff);
}
F32 sim_fps = getRecording().getLastValue(LLStatViewer::SIM_FPS);
if (0.f < sim_fps && sim_fps < 20.f)
{
- add(LLStatViewer::SIM_20_FPS_TIME, time_diff_seconds);
+ add(LLStatViewer::SIM_20_FPS_TIME, time_diff);
}
F32 sim_physics_fps = getRecording().getLastValue(LLStatViewer::SIM_PHYSICS_FPS);
if (0.f < sim_physics_fps && sim_physics_fps < 20.f)
{
- add(LLStatViewer::SIM_PHYSICS_20_FPS_TIME, time_diff_seconds);
+ add(LLStatViewer::SIM_PHYSICS_20_FPS_TIME, time_diff);
}
if (time_diff >= 0.5)
{
- record(LLStatViewer::FPS_2_TIME, time_diff_seconds);
+ record(LLStatViewer::FPS_2_TIME, time_diff);
}
if (time_diff >= 0.125)
{
- record(LLStatViewer::FPS_8_TIME, time_diff_seconds);
+ record(LLStatViewer::FPS_8_TIME, time_diff);
}
if (time_diff >= 0.1)
{
- record(LLStatViewer::FPS_10_TIME, time_diff_seconds);
+ record(LLStatViewer::FPS_10_TIME, time_diff);
}
if (gFrameCount && mLastTimeDiff > 0.0)
@@ -331,6 +333,8 @@ void update_statistics()
LLTrace::Recording& last_frame_recording = LLTrace::get_frame_recording().getLastRecording();
+ record(LLStatViewer::TRIANGLES_DRAWN_PER_FRAME, last_frame_recording.getSum(LLStatViewer::TRIANGLES_DRAWN));
+
sample(LLStatViewer::ENABLE_VBO, (F64)gSavedSettings.getBOOL("RenderVBOEnable"));
sample(LLStatViewer::LIGHTING_DETAIL, (F64)gPipeline.getLightingDetail());
sample(LLStatViewer::DRAW_DISTANCE, (F64)gSavedSettings.getF32("RenderFarClip"));
diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h
index ee1a73de9f..9fed558e03 100755
--- a/indra/newview/llviewerstats.h
+++ b/indra/newview/llviewerstats.h
@@ -27,11 +27,56 @@
#ifndef LL_LLVIEWERSTATS_H
#define LL_LLVIEWERSTATS_H
-#include "llstatenums.h"
#include "lltextureinfo.h"
#include "lltracerecording.h"
#include "lltrace.h"
+
+enum ESimStatID
+{
+ LL_SIM_STAT_TIME_DILATION = 0,
+ LL_SIM_STAT_FPS = 1,
+ LL_SIM_STAT_PHYSFPS = 2,
+ LL_SIM_STAT_AGENTUPS = 3,
+ LL_SIM_STAT_FRAMEMS = 4,
+ LL_SIM_STAT_NETMS = 5,
+ LL_SIM_STAT_SIMOTHERMS = 6,
+ LL_SIM_STAT_SIMPHYSICSMS = 7,
+ LL_SIM_STAT_AGENTMS = 8,
+ LL_SIM_STAT_IMAGESMS = 9,
+ LL_SIM_STAT_SCRIPTMS = 10,
+ LL_SIM_STAT_NUMTASKS = 11,
+ LL_SIM_STAT_NUMTASKSACTIVE = 12,
+ LL_SIM_STAT_NUMAGENTMAIN = 13,
+ LL_SIM_STAT_NUMAGENTCHILD = 14,
+ LL_SIM_STAT_NUMSCRIPTSACTIVE = 15,
+ LL_SIM_STAT_LSLIPS = 16,
+ LL_SIM_STAT_INPPS = 17,
+ LL_SIM_STAT_OUTPPS = 18,
+ LL_SIM_STAT_PENDING_DOWNLOADS = 19,
+ LL_SIM_STAT_PENDING_UPLOADS = 20,
+ LL_SIM_STAT_VIRTUAL_SIZE_KB = 21,
+ LL_SIM_STAT_RESIDENT_SIZE_KB = 22,
+ LL_SIM_STAT_PENDING_LOCAL_UPLOADS = 23,
+ LL_SIM_STAT_TOTAL_UNACKED_BYTES = 24,
+ LL_SIM_STAT_PHYSICS_PINNED_TASKS = 25,
+ LL_SIM_STAT_PHYSICS_LOD_TASKS = 26,
+ LL_SIM_STAT_SIMPHYSICSSTEPMS = 27,
+ LL_SIM_STAT_SIMPHYSICSSHAPEMS = 28,
+ LL_SIM_STAT_SIMPHYSICSOTHERMS = 29,
+ LL_SIM_STAT_SIMPHYSICSMEMORY = 30,
+ LL_SIM_STAT_SCRIPT_EPS = 31,
+ LL_SIM_STAT_SIMSPARETIME = 32,
+ LL_SIM_STAT_SIMSLEEPTIME = 33,
+ LL_SIM_STAT_IOPUMPTIME = 34,
+ LL_SIM_STAT_PCTSCRIPTSRUN = 35,
+ LL_SIM_STAT_REGION_IDLE = 36, // dataserver only
+ LL_SIM_STAT_REGION_IDLE_POSSIBLE = 37, // dataserver only
+ LL_SIM_STAT_SIMAISTEPTIMEMS = 38,
+ LL_SIM_STAT_SKIPPEDAISILSTEPS_PS = 39,
+ LL_SIM_STAT_PCTSTEPPEDCHARACTERS = 40
+};
+
namespace LLStatViewer
{
@@ -207,7 +252,7 @@ public:
LLViewerStats();
~LLViewerStats();
- void updateFrameStats(const F64 time_diff);
+ void updateFrameStats(const LLUnit<F64, LLUnits::Seconds> time_diff);
void addToMessage(LLSD &body);
@@ -323,7 +368,7 @@ public:
private:
LLTrace::Recording mRecording;
- F64 mLastTimeDiff; // used for time stat updates
+ LLUnit<F64, LLUnits::Seconds> mLastTimeDiff; // used for time stat updates
};
static const F32 SEND_STATS_PERIOD = 300.0f;
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index 8036a4e258..16b51c457a 100755
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -920,7 +920,7 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask,
}
handled = TRUE;
- lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLViewerTextEditor " << getName() << llendl;
+ LL_DEBUGS("UserInput") << "dragAndDrop handled by LLViewerTextEditor " << getName() << llendl;
return handled;
}
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 2872c277b1..ed74bc744a 100755
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -29,7 +29,6 @@
#include "llviewertexture.h"
// Library includes
-#include "imageids.h"
#include "llmath.h"
#include "llerror.h"
#include "llgl.h"
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index dfd7ac983d..9b89ee2ec9 100755
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -30,7 +30,6 @@
#include "llviewertexturelist.h"
-#include "imageids.h"
#include "llgl.h" // fot gathering stats from GL
#include "llimagegl.h"
#include "llimagebmp.h"
@@ -285,18 +284,18 @@ void LLViewerTextureList::shutdown()
void LLViewerTextureList::dump()
{
- llinfos << "LLViewerTextureList::dump()" << llendl;
+ LL_INFOS() << "LLViewerTextureList::dump()" << LL_ENDL;
for (image_priority_list_t::iterator it = mImageList.begin(); it != mImageList.end(); ++it)
{
LLViewerFetchedTexture* image = *it;
- llinfos << "priority " << image->getDecodePriority()
+ LL_INFOS() << "priority " << image->getDecodePriority()
<< " boost " << image->getBoostLevel()
<< " size " << image->getWidth() << "x" << image->getHeight()
<< " discard " << image->getDiscardLevel()
<< " desired " << image->getDesiredDiscardLevel()
<< " http://asset.siva.lindenlab.com/" << image->getID() << ".texture"
- << llendl;
+ << LL_ENDL;
}
}
@@ -337,7 +336,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string&
std::string full_path = gDirUtilp->findSkinnedFilename("textures", filename);
if (full_path.empty())
{
- llwarns << "Failed to find local image file: " << filename << llendl;
+ llwarns << "Failed to find local image file: " << filename << LL_ENDL;
return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
}
@@ -378,7 +377,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string&
LLViewerFetchedTexture *texture = imagep.get();
if (texture->getUrl().empty())
{
- llwarns << "Requested texture " << new_id << " already exists but does not have a URL" << llendl;
+ llwarns << "Requested texture " << new_id << " already exists but does not have a URL" << LL_ENDL;
}
else if (texture->getUrl() != url)
{
@@ -386,7 +385,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string&
// e.g. could be two avatars wearing the same outfit.
LL_DEBUGS("Avatar") << "Requested texture " << new_id
<< " already exists with a different url, requested: " << url
- << " current: " << texture->getUrl() << llendl;
+ << " current: " << texture->getUrl() << LL_ENDL;
}
}
@@ -401,7 +400,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string&
imagep = new LLViewerLODTexture(url, f_type, new_id, usemipmaps);
break ;
default:
- llerrs << "Invalid texture type " << texture_type << llendl ;
+ LL_ERRS() << "Invalid texture type " << texture_type << LL_ENDL ;
}
if (internal_format && primary_format)
@@ -458,18 +457,18 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,
if (request_from_host.isOk() &&
!texture->getTargetHost().isOk())
{
- llwarns << "Requested texture " << image_id << " already exists but does not have a host" << llendl;
+ llwarns << "Requested texture " << image_id << " already exists but does not have a host" << LL_ENDL;
}
else if (request_from_host.isOk() &&
texture->getTargetHost().isOk() &&
request_from_host != texture->getTargetHost())
{
llwarns << "Requested texture " << image_id << " already exists with a different target host, requested: "
- << request_from_host << " current: " << texture->getTargetHost() << llendl;
+ << request_from_host << " current: " << texture->getTargetHost() << LL_ENDL;
}
if (f_type != FTT_DEFAULT && imagep->getFTType() != f_type)
{
- llwarns << "FTType mismatch: requested " << f_type << " image has " << imagep->getFTType() << llendl;
+ llwarns << "FTType mismatch: requested " << f_type << " image has " << imagep->getFTType() << LL_ENDL;
}
}
@@ -505,7 +504,7 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id,
imagep = new LLViewerLODTexture(image_id, f_type, request_from_host, usemipmaps);
break ;
default:
- llerrs << "Invalid texture type " << texture_type << llendl ;
+ LL_ERRS() << "Invalid texture type " << texture_type << LL_ENDL ;
}
if (internal_format && primary_format)
@@ -555,11 +554,11 @@ void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image)
llassert(image);
if (image->isInImageList())
{
- llerrs << "LLViewerTextureList::addImageToList - Image already in list" << llendl;
+ LL_ERRS() << "LLViewerTextureList::addImageToList - Image already in list" << LL_ENDL;
}
if((mImageList.insert(image)).second != true)
{
- llerrs << "Error happens when insert image to mImageList!" << llendl ;
+ LL_ERRS() << "Error happens when insert image to mImageList!" << LL_ENDL ;
}
image->setInImageList(TRUE) ;
@@ -572,20 +571,20 @@ void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image)
llassert(image);
if (!image->isInImageList())
{
- llinfos << "RefCount: " << image->getNumRefs() << llendl ;
+ LL_INFOS() << "RefCount: " << image->getNumRefs() << LL_ENDL ;
uuid_map_t::iterator iter = mUUIDMap.find(image->getID());
if(iter == mUUIDMap.end() || iter->second != image)
{
- llinfos << "Image is not in mUUIDMap!" << llendl ;
+ LL_INFOS() << "Image is not in mUUIDMap!" << LL_ENDL ;
}
- llerrs << "LLViewerTextureList::removeImageFromList - Image not in list" << llendl;
+ LL_ERRS() << "LLViewerTextureList::removeImageFromList - Image not in list" << LL_ENDL;
}
S32 count = mImageList.erase(image) ;
if(count != 1)
{
- llinfos << image->getID() << llendl ;
- llerrs << "Error happens when remove image from mImageList: " << count << llendl ;
+ LL_INFOS() << image->getID() << LL_ENDL ;
+ LL_ERRS() << "Error happens when remove image from mImageList: " << count << LL_ENDL ;
}
image->setInImageList(FALSE) ;
@@ -595,7 +594,7 @@ void LLViewerTextureList::addImage(LLViewerFetchedTexture *new_image)
{
if (!new_image)
{
- llwarning("No image to add to image list", 0);
+ LL_WARNS() << "No image to add to image list" << LL_ENDL;
return;
}
LLUUID image_id = new_image->getID();
@@ -603,7 +602,7 @@ void LLViewerTextureList::addImage(LLViewerFetchedTexture *new_image)
LLViewerFetchedTexture *image = findImage(image_id);
if (image)
{
- llwarns << "Image with ID " << image_id << " already in list" << llendl;
+ LL_WARNS() << "Image with ID " << image_id << " already in list" << LL_ENDL;
}
sNumImages++;
@@ -901,7 +900,7 @@ void LLViewerTextureList::setDebugFetching(LLViewerFetchedTexture* tex, S32 debu
<< " host " << target_host
<< " boost " << imagep->getBoostLevel()
<< " imageid " << imagep->getID()
- << llendl;
+ << LL_ENDL;
imagep->dump();
}
return type_from_host;
@@ -1175,13 +1174,13 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename,
if (compressedImage.isNull())
{
image->setLastError("Couldn't convert the image to jpeg2000.");
- llinfos << "Couldn't convert to j2c, file : " << filename << llendl;
+ LL_INFOS() << "Couldn't convert to j2c, file : " << filename << LL_ENDL;
return FALSE;
}
if (!compressedImage->save(out_filename))
{
image->setLastError("Couldn't create the jpeg2000 image for upload.");
- llinfos << "Couldn't create output file : " << out_filename << llendl;
+ LL_INFOS() << "Couldn't create output file : " << out_filename << LL_ENDL;
return FALSE;
}
// Test to see if the encode and save worked
@@ -1189,7 +1188,7 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename,
if (!integrity_test->loadAndValidate( out_filename ))
{
image->setLastError("The created jpeg2000 image is corrupt.");
- llinfos << "Image file : " << out_filename << " is corrupt" << llendl;
+ LL_INFOS() << "Image file : " << out_filename << " is corrupt" << LL_ENDL;
return FALSE;
}
return TRUE;
@@ -1214,13 +1213,13 @@ LLPointer<LLImageJ2C> LLViewerTextureList::convertToUploadFile(LLPointer<LLImage
// Read the blocks and precincts size settings
S32 block_size = gSavedSettings.getS32("Jpeg2000BlocksSize");
S32 precinct_size = gSavedSettings.getS32("Jpeg2000PrecinctsSize");
- llinfos << "Advanced JPEG2000 Compression: precinct = " << precinct_size << ", block = " << block_size << llendl;
+ LL_INFOS() << "Advanced JPEG2000 Compression: precinct = " << precinct_size << ", block = " << block_size << LL_ENDL;
compressedImage->initEncode(*raw_image, block_size, precinct_size, 0);
}
if (!compressedImage->encode(raw_image, 0.0f))
{
- llinfos << "convertToUploadFile : encode returns with error!!" << llendl;
+ LL_INFOS() << "convertToUploadFile : encode returns with error!!" << LL_ENDL;
// Clear up the pointer so we don't leak that one
compressedImage = NULL;
}
@@ -1276,11 +1275,11 @@ S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended)
max_texmem = 128;
}
- llwarns << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << llendl;
+ llwarns << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << LL_ENDL;
}
S32 system_ram = (S32)BYTES_TO_MEGA_BYTES(gSysMemory.getPhysicalMemoryClamped()); // In MB
- //llinfos << "*** DETECTED " << system_ram << " MB of system memory." << llendl;
+ //LL_INFOS() << "*** DETECTED " << system_ram << " MB of system memory." << LL_ENDL;
if (get_recommended)
max_texmem = llmin(max_texmem, (S32)(system_ram/2));
else
@@ -1344,8 +1343,8 @@ void LLViewerTextureList::updateMaxResidentTexMem(S32 mem)
mMaxTotalTextureMemInMegaBytes = system_ram - min_non_texture_mem ;
}
- llinfos << "Total Video Memory set to: " << vb_mem << " MB" << llendl;
- llinfos << "Available Texture Memory set to: " << (vb_mem - fb_mem) << " MB" << llendl;
+ LL_INFOS() << "Total Video Memory set to: " << vb_mem << " MB" << LL_ENDL;
+ LL_INFOS() << "Available Texture Memory set to: " << (vb_mem - fb_mem) << " MB" << LL_ENDL;
}
///////////////////////////////////////////////////////////////////////////////
@@ -1394,8 +1393,8 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d
{
// msg->getSizeFast() is probably trying to tell us there
// was an error.
- llerrs << "image header chunk size was negative: "
- << data_size << llendl;
+ LL_ERRS() << "image header chunk size was negative: "
+ << data_size << LL_ENDL;
return;
}
@@ -1464,13 +1463,13 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d
{
// msg->getSizeFast() is probably trying to tell us there
// was an error.
- llerrs << "image data chunk size was negative: "
- << data_size << llendl;
+ LL_ERRS() << "image data chunk size was negative: "
+ << data_size << LL_ENDL;
return;
}
if (data_size > MTUBYTES)
{
- llerrs << "image data chunk too large: " << data_size << " bytes" << llendl;
+ LL_ERRS() << "image data chunk too large: " << data_size << " bytes" << LL_ENDL;
return;
}
U8 *data = new U8[data_size];
@@ -1507,7 +1506,7 @@ void LLViewerTextureList::processImageNotInDatabase(LLMessageSystem *msg,void **
LLViewerFetchedTexture* image = gTextureList.findImage( image_id );
if( image )
{
- llwarns << "not in db" << llendl;
+ llwarns << "not in db" << LL_ENDL;
image->setIsMissingAsset();
}
}
@@ -1634,7 +1633,7 @@ LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::s
if (found_it != mUIImages.end())
{
// image already loaded!
- llerrs << "UI Image " << name << " already loaded." << llendl;
+ LL_ERRS() << "UI Image " << name << " already loaded." << LL_ENDL;
}
return loadUIImageByName(name, filename, use_mips, scale_rect, clip_rect);
@@ -1737,7 +1736,7 @@ bool LLUIImageList::initFromFile()
std::vector<std::string>::const_iterator pi(textures_paths.begin()), pend(textures_paths.end());
if (pi == pend)
{
- llwarns << "No textures.xml found in skins directories" << llendl;
+ llwarns << "No textures.xml found in skins directories" << LL_ENDL;
return false;
}
@@ -1745,12 +1744,12 @@ bool LLUIImageList::initFromFile()
LLXMLNodePtr root;
if (!LLXMLNode::parseFile(*pi, root, NULL))
{
- llwarns << "Unable to parse UI image list file " << *pi << llendl;
+ llwarns << "Unable to parse UI image list file " << *pi << LL_ENDL;
return false;
}
if (!root->hasAttribute("version"))
{
- llwarns << "No valid version number in UI image list file " << *pi << llendl;
+ llwarns << "No valid version number in UI image list file " << *pi << LL_ENDL;
return false;
}
diff --git a/indra/newview/llviewerwearable.h b/indra/newview/llviewerwearable.h
index 65566f23a5..8f49e3c4e2 100644
--- a/indra/newview/llviewerwearable.h
+++ b/indra/newview/llviewerwearable.h
@@ -29,6 +29,7 @@
#include "llwearable.h"
#include "llavatarappearancedefines.h"
+#include "llextendedstatus.h"
class LLVOAvatar;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 10e354f2e3..4ec9485aee 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -76,7 +76,6 @@
#include "message.h"
#include "object_flags.h"
#include "lltimer.h"
-#include "timing.h"
#include "llviewermenu.h"
#include "lltooltip.h"
#include "llmediaentry.h"
@@ -3025,7 +3024,7 @@ void LLViewerWindow::updateUI()
if( !handled )
{
- lldebugst(LLERR_USER_INPUT) << "hover not handled by mouse captor" << llendl;
+ LL_DEBUGS("UserInput") << "hover not handled by mouse captor" << llendl;
}
}
else
diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp
index 94760e3c83..cd2075b122 100755
--- a/indra/newview/llvlcomposition.cpp
+++ b/indra/newview/llvlcomposition.cpp
@@ -28,7 +28,6 @@
#include "llvlcomposition.h"
-#include "imageids.h"
#include "llerror.h"
#include "v3math.h"
#include "llsurface.h"
diff --git a/indra/newview/llvlmanager.cpp b/indra/newview/llvlmanager.cpp
index d8de979f56..b231abc9c5 100755
--- a/indra/newview/llvlmanager.cpp
+++ b/indra/newview/llvlmanager.cpp
@@ -29,23 +29,27 @@
#include "llvlmanager.h"
#include "indra_constants.h"
-#include "bitpack.h"
#include "patch_code.h"
#include "patch_dct.h"
#include "llviewerregion.h"
#include "llframetimer.h"
#include "llsurface.h"
+#include "llbitpack.h"
+
+const char LAND_LAYER_CODE = 'L';
+const char WIND_LAYER_CODE = '7';
+const char CLOUD_LAYER_CODE = '8';
LLVLManager gVLManager;
LLVLManager::~LLVLManager()
{
S32 i;
- for (i = 0; i < mPacketData.count(); i++)
+ for (i = 0; i < mPacketData.size(); i++)
{
delete mPacketData[i];
}
- mPacketData.reset();
+ mPacketData.clear();
}
void LLVLManager::addLayerData(LLVLData *vl_datap, const S32 mesg_size)
@@ -67,7 +71,7 @@ void LLVLManager::addLayerData(LLVLData *vl_datap, const S32 mesg_size)
llerrs << "Unknown layer type!" << (S32)vl_datap->mType << llendl;
}
- mPacketData.put(vl_datap);
+ mPacketData.push_back(vl_datap);
}
void LLVLManager::unpackData(const S32 num_packets)
@@ -75,7 +79,7 @@ void LLVLManager::unpackData(const S32 num_packets)
static LLFrameTimer decode_timer;
S32 i;
- for (i = 0; i < mPacketData.count(); i++)
+ for (i = 0; i < mPacketData.size(); i++)
{
LLVLData *datap = mPacketData[i];
@@ -98,11 +102,11 @@ void LLVLManager::unpackData(const S32 num_packets)
}
}
- for (i = 0; i < mPacketData.count(); i++)
+ for (i = 0; i < mPacketData.size(); i++)
{
delete mPacketData[i];
}
- mPacketData.reset();
+ mPacketData.clear();
}
@@ -134,12 +138,12 @@ S32 LLVLManager::getTotalBytes() const
void LLVLManager::cleanupData(LLViewerRegion *regionp)
{
S32 cur = 0;
- while (cur < mPacketData.count())
+ while (cur < mPacketData.size())
{
if (mPacketData[cur]->mRegionp == regionp)
{
delete mPacketData[cur];
- mPacketData.remove(cur);
+ mPacketData.erase(mPacketData.begin() + cur);
}
else
{
diff --git a/indra/newview/llvlmanager.h b/indra/newview/llvlmanager.h
index 74b4823a5c..0733aebaae 100755
--- a/indra/newview/llvlmanager.h
+++ b/indra/newview/llvlmanager.h
@@ -30,7 +30,6 @@
// This class manages the data coming in for viewer layers from the network.
#include "stdtypes.h"
-#include "lldarray.h"
class LLVLData;
class LLViewerRegion;
@@ -55,7 +54,7 @@ public:
void cleanupData(LLViewerRegion *regionp);
protected:
- LLDynamicArray<LLVLData *> mPacketData;
+ std::vector<LLVLData *> mPacketData;
U32 mLandBits;
U32 mWindBits;
U32 mCloudBits;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 11b027a417..04c1bd3968 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -66,6 +66,7 @@
#include "llmutelist.h"
#include "llmoveview.h"
#include "llnotificationsutil.h"
+#include "llphysicsshapebuilderutil.h"
#include "llquantize.h"
#include "llrand.h"
#include "llregionhandle.h"
@@ -116,16 +117,16 @@ using namespace LLAvatarAppearanceDefines;
//-----------------------------------------------------------------------------
// Global constants
//-----------------------------------------------------------------------------
-const LLUUID ANIM_AGENT_BODY_NOISE = LLUUID("9aa8b0a6-0c6f-9518-c7c3-4f41f2c001ad"); //"body_noise"
-const LLUUID ANIM_AGENT_BREATHE_ROT = LLUUID("4c5a103e-b830-2f1c-16bc-224aa0ad5bc8"); //"breathe_rot"
-const LLUUID ANIM_AGENT_EDITING = LLUUID("2a8eba1d-a7f8-5596-d44a-b4977bf8c8bb"); //"editing"
-const LLUUID ANIM_AGENT_EYE = LLUUID("5c780ea8-1cd1-c463-a128-48c023f6fbea"); //"eye"
-const LLUUID ANIM_AGENT_FLY_ADJUST = LLUUID("db95561f-f1b0-9f9a-7224-b12f71af126e"); //"fly_adjust"
-const LLUUID ANIM_AGENT_HAND_MOTION = LLUUID("ce986325-0ba7-6e6e-cc24-b17c4b795578"); //"hand_motion"
-const LLUUID ANIM_AGENT_HEAD_ROT = LLUUID("e6e8d1dd-e643-fff7-b238-c6b4b056a68d"); //"head_rot"
-const LLUUID ANIM_AGENT_PELVIS_FIX = LLUUID("0c5dd2a2-514d-8893-d44d-05beffad208b"); //"pelvis_fix"
-const LLUUID ANIM_AGENT_TARGET = LLUUID("0e4896cb-fba4-926c-f355-8720189d5b55"); //"target"
-const LLUUID ANIM_AGENT_WALK_ADJUST = LLUUID("829bc85b-02fc-ec41-be2e-74cc6dd7215d"); //"walk_adjust"
+const LLUUID ANIM_AGENT_BODY_NOISE = LLUUID("9aa8b0a6-0c6f-9518-c7c3-4f41f2c001ad"); //"body_noise"
+const LLUUID ANIM_AGENT_BREATHE_ROT = LLUUID("4c5a103e-b830-2f1c-16bc-224aa0ad5bc8"); //"breathe_rot"
+const LLUUID ANIM_AGENT_EDITING = LLUUID("2a8eba1d-a7f8-5596-d44a-b4977bf8c8bb"); //"editing"
+const LLUUID ANIM_AGENT_EYE = LLUUID("5c780ea8-1cd1-c463-a128-48c023f6fbea"); //"eye"
+const LLUUID ANIM_AGENT_FLY_ADJUST = LLUUID("db95561f-f1b0-9f9a-7224-b12f71af126e"); //"fly_adjust"
+const LLUUID ANIM_AGENT_HAND_MOTION = LLUUID("ce986325-0ba7-6e6e-cc24-b17c4b795578"); //"hand_motion"
+const LLUUID ANIM_AGENT_HEAD_ROT = LLUUID("e6e8d1dd-e643-fff7-b238-c6b4b056a68d"); //"head_rot"
+const LLUUID ANIM_AGENT_PELVIS_FIX = LLUUID("0c5dd2a2-514d-8893-d44d-05beffad208b"); //"pelvis_fix"
+const LLUUID ANIM_AGENT_TARGET = LLUUID("0e4896cb-fba4-926c-f355-8720189d5b55"); //"target"
+const LLUUID ANIM_AGENT_WALK_ADJUST = LLUUID("829bc85b-02fc-ec41-be2e-74cc6dd7215d"); //"walk_adjust"
const LLUUID ANIM_AGENT_PHYSICS_MOTION = LLUUID("7360e029-3cb8-ebc4-863e-212df440d987"); //"physics_motion"
@@ -1313,7 +1314,7 @@ void LLVOAvatar::getSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
for (polymesh_map_t::iterator i = mPolyMeshes.begin(); i != mPolyMeshes.end(); ++i)
{
LLPolyMesh* mesh = i->second;
- for (S32 joint_num = 0; joint_num < mesh->mJointRenderData.count(); joint_num++)
+ for (S32 joint_num = 0; joint_num < mesh->mJointRenderData.size(); joint_num++)
{
LLVector4a trans;
trans.load3( mesh->mJointRenderData[joint_num]->mWorldMatrix->getTranslation().mV);
@@ -1638,7 +1639,7 @@ void LLVOAvatar::releaseMeshData()
return;
}
- //llinfos << "Releasing" << llendl;
+ LL_DEBUGS() << "Releasing mesh data" << LL_ENDL;
// cleanup mesh data
for (avatar_joint_list_t::iterator iter = mMeshLOD.begin();
@@ -7120,30 +7121,32 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
}
// static
-void LLVOAvatar::getAnimLabels( LLDynamicArray<std::string>* labels )
+void LLVOAvatar::getAnimLabels( std::vector<std::string>* labels )
{
S32 i;
+ labels->reserve(gUserAnimStatesCount);
for( i = 0; i < gUserAnimStatesCount; i++ )
{
- labels->put( LLAnimStateLabels::getStateLabel( gUserAnimStates[i].mName ) );
+ labels->push_back( LLAnimStateLabels::getStateLabel( gUserAnimStates[i].mName ) );
}
// Special case to trigger away (AFK) state
- labels->put( "Away From Keyboard" );
+ labels->push_back( "Away From Keyboard" );
}
// static
-void LLVOAvatar::getAnimNames( LLDynamicArray<std::string>* names )
+void LLVOAvatar::getAnimNames( std::vector<std::string>* names )
{
S32 i;
+ names->reserve(gUserAnimStatesCount);
for( i = 0; i < gUserAnimStatesCount; i++ )
{
- names->put( std::string(gUserAnimStates[i].mName) );
+ names->push_back( std::string(gUserAnimStates[i].mName) );
}
// Special case to trigger away (AFK) state
- names->put( "enter_away_from_keyboard_state" );
+ names->push_back( "enter_away_from_keyboard_state" );
}
// static
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 0544d7395d..2c86ed63d1 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -35,7 +35,6 @@
#include <boost/signals2/trackable.hpp>
-#include "imageids.h" // IMG_INVISIBLE
#include "llavatarappearance.h"
#include "llchat.h"
#include "lldrawpoolalpha.h"
@@ -853,8 +852,8 @@ public:
std::string getFullname() const; // Returns "FirstName LastName"
std::string avString() const; // Frequently used string in log messages "Avatar '<full name'"
protected:
- static void getAnimLabels(LLDynamicArray<std::string>* labels);
- static void getAnimNames(LLDynamicArray<std::string>* names);
+ static void getAnimLabels(std::vector<std::string>* labels);
+ static void getAnimNames(std::vector<std::string>* names);
private:
bool mNameIsSet;
std::string mTitle;
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 67da311c5a..117169678e 100755
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -143,8 +143,7 @@ struct LocalTextureData
// Static Data
//-----------------------------------------------------------------------------
S32 LLVOAvatarSelf::sScratchTexBytes = 0;
-LLMap< LLGLenum, LLGLuint*> LLVOAvatarSelf::sScratchTexNames;
-LLMap< LLGLenum, F32*> LLVOAvatarSelf::sScratchTexLastBindTime;
+std::map< LLGLenum, LLGLuint*> LLVOAvatarSelf::sScratchTexNames;
/*********************************************************************************
@@ -2543,11 +2542,11 @@ BOOL LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const
asset_id_matches);
BOOL can_grab = FALSE;
- lldebugs << "item count for asset " << texture_id << ": " << items.count() << llendl;
- if (items.count())
+ lldebugs << "item count for asset " << texture_id << ": " << items.size() << llendl;
+ if (items.size())
{
// search for full permissions version
- for (S32 i = 0; i < items.count(); i++)
+ for (S32 i = 0; i < items.size(); i++)
{
LLViewerInventoryItem* itemp = items[i];
if (itemp->getIsFullPerm())
@@ -3060,11 +3059,11 @@ BOOL LLVOAvatarSelf::needsRenderBeam()
// static
void LLVOAvatarSelf::deleteScratchTextures()
{
- for( LLGLuint* namep = sScratchTexNames.getFirstData();
- namep;
- namep = sScratchTexNames.getNextData() )
+ for(std::map< LLGLenum, LLGLuint*>::iterator it = sScratchTexNames.begin(), end_it = sScratchTexNames.end();
+ it != end_it;
+ ++it)
{
- LLImageGL::deleteTextures(LLTexUnit::TT_TEXTURE, 0, -1, 1, (U32 *)namep );
+ LLImageGL::deleteTextures(LLTexUnit::TT_TEXTURE, 0, -1, 1, (U32 *)it->second );
stop_glerror();
}
@@ -3072,8 +3071,7 @@ void LLVOAvatarSelf::deleteScratchTextures()
{
lldebugs << "Clearing Scratch Textures " << (sScratchTexBytes/1024) << "KB" << llendl;
- sScratchTexNames.deleteAllData();
- sScratchTexLastBindTime.deleteAllData();
+ delete_and_clear(sScratchTexNames);
LLImageGL::sGlobalTextureMemory -= sScratchTexBytes;
sScratchTexBytes = 0;
}
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index 3b7b6bac64..be98f8dfa9 100755
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -30,6 +30,7 @@
#include "llviewertexture.h"
#include "llvoavatar.h"
+#include <map>
struct LocalTextureData;
@@ -276,8 +277,7 @@ public:
static void deleteScratchTextures();
private:
static S32 sScratchTexBytes;
- static LLMap< LLGLenum, LLGLuint*> sScratchTexNames;
- static LLMap< LLGLenum, F32*> sScratchTexLastBindTime;
+ static std::map< LLGLenum, LLGLuint*> sScratchTexNames;
/** Textures
** **
diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp
index 88ce6df916..62fe6e7b12 100755
--- a/indra/newview/llvograss.cpp
+++ b/indra/newview/llvograss.cpp
@@ -28,7 +28,6 @@
#include "llvograss.h"
-#include "imageids.h"
#include "llviewercontrol.h"
#include "llagentcamera.h"
diff --git a/indra/newview/llvograss.h b/indra/newview/llvograss.h
index 122806766d..28203c65ae 100755
--- a/indra/newview/llvograss.h
+++ b/indra/newview/llvograss.h
@@ -28,7 +28,6 @@
#define LL_LLVOGRASS_H
#include "llviewerobject.h"
-#include "lldarray.h"
#include <map>
class LLSurfacePatch;
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 9b5d981aa5..df5d413407 100755
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -6547,8 +6547,8 @@ void LLVivoxVoiceClient::expireVoiceFonts()
// Give a warning notification if any voice fonts are due to expire.
if (will_expire)
{
- S32 seconds = gSavedSettings.getS32("VoiceEffectExpiryWarningTime");
- args["INTERVAL"] = llformat("%d", seconds / SEC_PER_DAY);
+ LLUnit<S32, LLUnits::Seconds> seconds = gSavedSettings.getS32("VoiceEffectExpiryWarningTime");
+ args["INTERVAL"] = llformat("%d", LLUnit<S32, LLUnits::Days>(seconds).value());
LLNotificationsUtil::add("VoiceEffectsWillExpire", args);
}
diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp
index 87f6f5c4a4..487227f006 100755
--- a/indra/newview/llvopartgroup.cpp
+++ b/indra/newview/llvopartgroup.cpp
@@ -46,7 +46,7 @@
const F32 MAX_PART_LIFETIME = 120.f;
-extern U64 gFrameTime;
+extern LLUnitImplicit<U64, LLUnits::Microseconds> gFrameTime;
LLPointer<LLVertexBuffer> LLVOPartGroup::sVB = NULL;
S32 LLVOPartGroup::sVBSlotFree[];
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index 0a119e853a..85e8fd8bf4 100755
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -28,11 +28,9 @@
#include "llvosky.h"
-#include "imageids.h"
#include "llfeaturemanager.h"
#include "llviewercontrol.h"
#include "llframetimer.h"
-#include "timing.h"
#include "llagent.h"
#include "llagentcamera.h"
diff --git a/indra/newview/llvotree.h b/indra/newview/llvotree.h
index 2ecb0303a1..a6077f4a7a 100755
--- a/indra/newview/llvotree.h
+++ b/indra/newview/llvotree.h
@@ -28,7 +28,6 @@
#define LL_LLVOTREE_H
#include "llviewerobject.h"
-#include "lldarray.h"
#include "xform.h"
class LLFace;
diff --git a/indra/newview/llvotreenew.h b/indra/newview/llvotreenew.h
deleted file mode 100755
index 0bb07008ca..0000000000
--- a/indra/newview/llvotreenew.h
+++ /dev/null
@@ -1,218 +0,0 @@
-/**
- * @file llvotreenew.h
- * @brief LLVOTreeNew class header file
- *
- * $LicenseInfo:firstyear=2003&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLVOTREENEW_H
-#define LL_LLVOTREENEW_H
-
-#include "llviewerobject.h"
-#include "lldarray.h"
-#include "xform.h"
-
-#include "lltreeparams.h"
-#include "llstrider.h"
-#include "v2math.h"
-#include "v3math.h"
-#include "llviewertexture.h"
-
-class LLFace;
-class LLDrawPool;
-
-// number of static arrays created
-const U8 MAX_SPECIES = 16; // max species of trees
-const U8 MAX_PARTS = 15; // trunk, 2 or 3 branches per species?
-const U8 MAX_RES = 6; // max # cross sections for a branch curve
-const U8 MAX_FLARE = 6; // max # cross sections for flare of trunk
-const U8 MAX_LEVELS = 3;
-
-// initial vertex array allocations
-const U32 NUM_INIT_VERTS = 5000; // number of vertices/normals/texcoords
-const U32 NUM_INIT_INDICES = 15000; // number of indices to vert array (3 vertices per triangle, roughly 3x)
-const U32 NUM_TIMES_TO_DOUBLE = 2; // if we go over initial allocations, num times to double each step
-
-// for finding the closest parts...
-
-// the parts are searched based on:
-const F32 MAX_LOBES_DIFF = 2;
-const F32 MAX_LOBEDEPTH_DIFF = .3f;
-const F32 MAX_CURVEBACK_DIFF = 20.0f;
-const F32 MAX_CURVE_DIFF = 15.0f;
-const F32 MAX_CURVE_V_DIFF = 20.0f;
-
-const F32 CURVEV_DIVIDER = 10.0f; // curveV/CURVEV_DIVIDER = # branch variances...
-const U8 MAX_VARS = 3; // max number of variations of branches
-
-const U8 MAX_RAND_NUMS = 100; // max number of rand numbers to pregenerate and store
-
-// texture params
-const F32 WIDTH_OF_BARK = .48f;
-
-class LLVOTreeNew : public LLViewerObject
-{
-public:
-
- // Some random number generators using the pre-generated random numbers
- // return +- negPos
- static S32 llrand_signed(S32 negPos)
- {
- return (ll_rand((U32)negPos * 2) - negPos);
- };
-
- static S32 llrand_signed(S32 negPos, U32 index)
- {
- return lltrunc((sRandNums[index % MAX_RAND_NUMS] * (negPos * 2.0f) - negPos));
- };
-
- static S32 llrand_unsigned(S32 pos, U32 index)
- {
- return lltrunc((sRandNums[index % MAX_RAND_NUMS] * pos));
- };
-
- // return +- negPos
- static F32 llfrand_signed(F32 negPos)
- {
- return (ll_frand(negPos * 2.0f) - negPos);
- };
-
- static F32 llfrand_signed(F32 negPos, U32 index)
- {
- return (sRandNums[index % MAX_RAND_NUMS] * negPos * 2.0f) - negPos;
- };
-
- static F32 llfrand_unsigned(F32 pos, U32 index)
- {
- return sRandNums[index % MAX_RAND_NUMS] * pos;
- };
-
- // return between 0-pos
- static F32 llfrand_unsigned(F32 pos)
- {
- return ll_frand(pos);
- };
-
- static void cleanupTextures() {}; // not needed anymore
-
- struct TreePart
- {
- F32 mRadius; // scale x/y
- F32 mLength; // scale z
- F32 mCurve;
- F32 mCurveV;
- F32 mCurveRes;
- F32 mCurveBack;
- U8 mLobes;
- F32 mLobeDepth;
- U8 mLevel;
- U32 mNumTris;
- U8 mVertsPerSection;
- U8 mNumVariants;
-
- // first index into the drawpool arrays for this particular branch
- U32 mIndiceIndex[MAX_VARS];
- U32 mOffsets[MAX_VARS][MAX_RES]; // offsets for the partial branch pieces
- // local section frames for this branch
- LLMatrix4 mFrames[MAX_VARS][(MAX_RES*(MAX_RES + 1))/2]; // (0...n) + (1...n) + ... + (n-1..n)
- LLDynamicArray<LLVector3> mFaceNormals;
-
- };
-
- LLVOTreeNew(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
- virtual ~LLVOTreeNew();
-
- /*virtual*/
- U32 processUpdateMessage(LLMessageSystem *mesgsys,
- void **user_data,
- U32 block_num, const EObjectUpdateType update_type,
- LLDataPacker *dp);
-
- /*virtual*/ BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
-
- /*virtual*/ void render(LLAgent &agent);
- /*virtual*/ void updateTextures();
-
- /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
- /*virtual*/ BOOL updateGeometry(LLDrawable *drawable);
-
- F32 CalcZStep(TreePart *part, U8 section);
-
- void createPart(U8 level, F32 length, F32 radius, LLStrider<LLVector3> &vertices, LLStrider<LLVector3> &normals,
- LLStrider<LLVector2> &tex_coords, U32 *indices,
- U32 &curVertexIndex, U32 &curTexCoordIndex,
- U32 &curNormalIndex, U32 &curIndiceIndex);
-
- S32 findSimilarPart(U8 level);
-
- F32 CalculateSectionRadius(U8 level, F32 y, F32 stemLength, F32 stemRadius);
- //F32 CalculateVerticalAttraction(U8 level, LLMatrix4 &sectionFrame);
-
- void createSection(LLMatrix4 &frame, TreePart *part, F32 sectionRadius, F32 stemZ,
- LLStrider<LLVector3> &vertices, LLStrider<LLVector2> &tex_coords, U32 *indices,
- U32 &curVertexIndex, U32 &curTexCoordIndex, U32 &curIndiceIndex, U8 curSection, BOOL firstBranch);
-
- void genIndicesAndFaceNormalsForLastSection(TreePart *part, U8 numVerts, LLStrider<LLVector3> &vertices, U32 curVertexIndex, U32 *indices, U32 &curIndiceIndex, BOOL firstBranch);
-
- void genVertexNormals(TreePart *part, LLStrider<LLVector3> &normals, U8 numSections, U32 curNormalOffset);
-
- void drawTree(LLDrawPool &draw_pool, const LLMatrix4 &frame, U8 level, F32 offsetChild, F32 curLength, F32 parentLength, F32 curRadius, F32 parentRadius, U8 part, U8 variant, U8 startSection);
- void drawTree(LLDrawPool &draw_pool);
-
-
- //LLTreeParams mParams;
- U8 mSpecies;
- LLPointer<LLViewerTexture> mTreeImagep;
- LLMatrix4 mTrunkFlareFrames[MAX_FLARE];
- F32 mSegSplitsError[3];
- U32 mRandOffset[MAX_LEVELS];
-
- U32 mNumTrisDrawn;
- U32 mTotalIndices;
- U32 mTotalVerts;
-
- static void initClass();
-
- // tree params
- static LLTreeParams sParameters;
-
- // next indexes used to drawpool arrays
- static U32 sNextVertexIndex[MAX_SPECIES];
- static U32 sNextIndiceIndex[MAX_SPECIES];
-
- // tree parts
- static U32 sNextPartIndex[MAX_PARTS];
- static TreePart sTreeParts[MAX_SPECIES][MAX_PARTS];
-
- // species images
- static LLUUID sTreeImageIDs[MAX_SPECIES];
-
- // random numbers
- static F32 sRandNums[MAX_RAND_NUMS];
-
- // usage data
- static U32 sTreePartsUsed[MAX_SPECIES][MAX_PARTS][MAX_VARS];
-
-
-};
-
-#endif
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 006011c2e7..632f4d178a 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -47,7 +47,6 @@
#include "message.h"
#include "llpluginclassmedia.h" // for code in the mediaEvent handler
#include "object_flags.h"
-#include "llagentconstants.h"
#include "lldrawable.h"
#include "lldrawpoolavatar.h"
#include "lldrawpoolbump.h"
diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp
index 50e7ed7bb5..fc85a670b5 100755
--- a/indra/newview/llvowater.cpp
+++ b/indra/newview/llvowater.cpp
@@ -28,7 +28,6 @@
#include "llvowater.h"
-#include "imageids.h"
#include "llviewercontrol.h"
#include "lldrawable.h"
diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp
index 4f52ff9778..ec1f0389ea 100755
--- a/indra/newview/llwaterparammanager.cpp
+++ b/indra/newview/llwaterparammanager.cpp
@@ -89,7 +89,7 @@ void LLWaterParamManager::loadAllPresets()
void LLWaterParamManager::loadPresetsFromDir(const std::string& dir)
{
- LL_INFOS2("AppInit", "Shaders") << "Loading water presets from " << dir << LL_ENDL;
+ LL_INFOS("AppInit", "Shaders") << "Loading water presets from " << dir << LL_ENDL;
LLDirIterator dir_iter(dir, "*.xml");
while (1)
@@ -119,7 +119,7 @@ bool LLWaterParamManager::loadPreset(const std::string& path)
return false;
}
- LL_DEBUGS2("AppInit", "Shaders") << "Loading water " << name << LL_ENDL;
+ LL_DEBUGS("AppInit", "Shaders") << "Loading water " << name << LL_ENDL;
LLSD params_data;
LLPointer<LLSDParser> parser = new LLSDXMLParser();
diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h
index a8a5ef3117..58a00c5be0 100755
--- a/indra/newview/llwearableitemslist.h
+++ b/indra/newview/llwearableitemslist.h
@@ -258,7 +258,7 @@ public:
if (!wearable_item1 || !wearable_item2)
{
- llwarning("item1 and item2 cannot be null", 0);
+ LL_WARNS() << "item1 and item2 cannot be null" << LL_ENDL;
return true;
}
diff --git a/indra/newview/llwind.h b/indra/newview/llwind.h
index 3b57f07124..e73d1baa58 100755
--- a/indra/newview/llwind.h
+++ b/indra/newview/llwind.h
@@ -35,6 +35,8 @@ class LLVector3;
class LLBitPack;
class LLGroupHeader;
+const F32 WIND_SCALE_HACK = 2.0f; // hack to make wind speeds more realistic
+
class LLWind
{
diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp
index 6077208799..c729d6ff4f 100755
--- a/indra/newview/llwlparammanager.cpp
+++ b/indra/newview/llwlparammanager.cpp
@@ -272,7 +272,7 @@ void LLWLParamManager::loadAllPresets()
void LLWLParamManager::loadPresetsFromDir(const std::string& dir)
{
- LL_INFOS2("AppInit", "Shaders") << "Loading sky presets from " << dir << LL_ENDL;
+ LL_INFOS("AppInit", "Shaders") << "Loading sky presets from " << dir << LL_ENDL;
LLDirIterator dir_iter(dir, "*.xml");
while (1)
@@ -302,7 +302,7 @@ bool LLWLParamManager::loadPreset(const std::string& path)
return false;
}
- LL_DEBUGS2("AppInit", "Shaders") << "Loading sky " << name << LL_ENDL;
+ LL_DEBUGS("AppInit", "Shaders") << "Loading sky " << name << LL_ENDL;
LLSD params_data;
LLPointer<LLSDParser> parser = new LLSDXMLParser();
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index ea0e38824b..bfc5077c90 100755
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -976,12 +976,12 @@ LLViewerTexture* LLWorld::getDefaultWaterTexture()
return mDefaultWaterTexturep;
}
-void LLWorld::setSpaceTimeUSec(const U64 space_time_usec)
+void LLWorld::setSpaceTimeUSec(const LLUnitImplicit<U64, LLUnits::Microseconds> space_time_usec)
{
mSpaceTimeUSec = space_time_usec;
}
-U64 LLWorld::getSpaceTimeUSec() const
+LLUnitImplicit<U64, LLUnits::Microseconds> LLWorld::getSpaceTimeUSec() const
{
return mSpaceTimeUSec;
}
@@ -1249,13 +1249,13 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positi
{
LLViewerRegion* regionp = *iter;
const LLVector3d& origin_global = regionp->getOriginGlobal();
- S32 count = regionp->mMapAvatars.count();
+ S32 count = regionp->mMapAvatars.size();
for (S32 i = 0; i < count; i++)
{
- LLVector3d pos_global = unpackLocalToGlobalPosition(regionp->mMapAvatars.get(i), origin_global);
+ LLVector3d pos_global = unpackLocalToGlobalPosition(regionp->mMapAvatars.at(i), origin_global);
if(dist_vec_squared(pos_global, relative_to) <= radius_squared)
{
- LLUUID uuid = regionp->mMapAvatarIDs.get(i);
+ LLUUID uuid = regionp->mMapAvatarIDs.at(i);
// if this avatar doesn't already exist in the list, add it
if(uuid.notNull() && avatar_ids != NULL && std::find(avatar_ids->begin(), avatar_ids->end(), uuid) == avatar_ids->end())
{
diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h
index d94c27c428..c74ac3fa6f 100755
--- a/indra/newview/llworld.h
+++ b/indra/newview/llworld.h
@@ -141,8 +141,8 @@ public:
void waterHeightRegionInfo(std::string const& sim_name, F32 water_height);
void shiftRegions(const LLVector3& offset);
- void setSpaceTimeUSec(const U64 space_time_usec);
- U64 getSpaceTimeUSec() const;
+ void setSpaceTimeUSec(const LLUnitImplicit<U64, LLUnits::Microseconds> space_time_usec);
+ LLUnitImplicit<U64, LLUnits::Microseconds> getSpaceTimeUSec() const;
void getInfo(LLSD& info);
U32 getNumOfActiveCachedObjects() const {return mNumOfActiveCachedObjects;}
@@ -189,7 +189,7 @@ private:
S32 mLastPacketsOut;
S32 mLastPacketsLost;
U32 mNumOfActiveCachedObjects;
- U64 mSpaceTimeUSec;
+ LLUnitImplicit<U64, LLUnits::Microseconds> mSpaceTimeUSec;
BOOL mClassicCloudsEnabled;
diff --git a/indra/newview/llworldmap.h b/indra/newview/llworldmap.h
index d514b2f14c..1a168e4b4d 100755
--- a/indra/newview/llworldmap.h
+++ b/indra/newview/llworldmap.h
@@ -38,6 +38,18 @@
#include "llviewertexture.h"
#include "llgltexture.h"
+// map item types
+const U32 MAP_ITEM_TELEHUB = 0x01;
+const U32 MAP_ITEM_PG_EVENT = 0x02;
+const U32 MAP_ITEM_MATURE_EVENT = 0x03;
+//const U32 MAP_ITEM_POPULAR = 0x04; // No longer supported, 2009-03-02 KLW
+//const U32 MAP_ITEM_AGENT_COUNT = 0x05;
+const U32 MAP_ITEM_AGENT_LOCATIONS = 0x06;
+const U32 MAP_ITEM_LAND_FOR_SALE = 0x07;
+const U32 MAP_ITEM_CLASSIFIED = 0x08;
+const U32 MAP_ITEM_ADULT_EVENT = 0x09;
+const U32 MAP_ITEM_LAND_FOR_SALE_ADULT = 0x0a;
+
// Description of objects like hubs, events, land for sale, people and more (TBD).
// Note: we don't store a "type" in there so we need to store instances of this class in
// well known objects (i.e. list of objects which type is "well known").
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index 6759328b84..977d967a76 100755
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -1723,7 +1723,7 @@ BOOL LLWorldMapView::handleHover( S32 x, S32 y, MASK mask )
{
gViewerWindow->setCursor( UI_CURSOR_CROSS );
}
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLWorldMapView" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLWorldMapView" << llendl;
return TRUE;
}
}
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 870ee6a103..1d9137c161 100755
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -30,7 +30,6 @@
// library includes
#include "llaudioengine.h" // For debugging.
-#include "imageids.h"
#include "llerror.h"
#include "llviewercontrol.h"
#include "llfasttimer.h"
@@ -40,7 +39,6 @@
#include "llprimitive.h"
#include "llvolume.h"
#include "material_codes.h"
-#include "timing.h"
#include "v3color.h"
#include "llui.h"
#include "llglheaders.h"
diff --git a/indra/newview/roles_constants.h b/indra/newview/roles_constants.h
new file mode 100755
index 0000000000..effd15ea72
--- /dev/null
+++ b/indra/newview/roles_constants.h
@@ -0,0 +1,192 @@
+/**
+ * @file roles_constants.h
+ * @brief General Roles Constants
+ *
+ * $LicenseInfo:firstyear=2006&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_ROLES_CONSTANTS_H
+#define LL_ROLES_CONSTANTS_H
+
+// This value includes the everyone group.
+const S32 MAX_ROLES = 10;
+
+enum LLRoleMemberChangeType
+{
+ RMC_ADD,
+ RMC_REMOVE,
+ RMC_NONE
+};
+
+enum LLRoleChangeType
+{
+ RC_UPDATE_NONE,
+ RC_UPDATE_DATA,
+ RC_UPDATE_POWERS,
+ RC_UPDATE_ALL,
+ RC_CREATE,
+ RC_DELETE
+};
+
+//
+// Powers
+//
+
+// KNOWN HOLES: use these for any single bit powers you need
+// bit 0x1 << 46
+// bit 0x1 << 49 and above
+
+// These powers were removed to make group roles simpler
+// bit 0x1 << 41 (GP_ACCOUNTING_VIEW)
+// bit 0x1 << 46 (GP_PROPOSAL_VIEW)
+
+const U64 GP_NO_POWERS = 0x0;
+const U64 GP_ALL_POWERS = 0xFFFFFFFFFFFFFFFFLL;
+
+// Membership
+const U64 GP_MEMBER_INVITE = 0x1 << 1; // Invite member
+const U64 GP_MEMBER_EJECT = 0x1 << 2; // Eject member from group
+const U64 GP_MEMBER_OPTIONS = 0x1 << 3; // Toggle "Open enrollment" and change "Signup Fee"
+const U64 GP_MEMBER_VISIBLE_IN_DIR = 0x1LL << 47;
+
+// Roles
+const U64 GP_ROLE_CREATE = 0x1 << 4; // Create new roles
+const U64 GP_ROLE_DELETE = 0x1 << 5; // Delete roles
+const U64 GP_ROLE_PROPERTIES = 0x1 << 6; // Change Role Names, Titles, and Descriptions (Of roles the user is in, only, or any role in group?)
+const U64 GP_ROLE_ASSIGN_MEMBER_LIMITED = 0x1 << 7; // Assign Member to a Role that the assigner is in
+const U64 GP_ROLE_ASSIGN_MEMBER = 0x1 << 8; // Assign Member to Role
+const U64 GP_ROLE_REMOVE_MEMBER = 0x1 << 9; // Remove Member from Role
+const U64 GP_ROLE_CHANGE_ACTIONS = 0x1 << 10; // Change actions a role can perform
+
+// Group Identity
+const U64 GP_GROUP_CHANGE_IDENTITY = 0x1 << 11; // Charter, insignia, 'Show In Group List', 'Publish on the web', 'Mature', all 'Show Member In Group Profile' checkboxes
+
+// Parcel Management
+const U64 GP_LAND_DEED = 0x1 << 12; // Deed Land and Buy Land for Group
+const U64 GP_LAND_RELEASE = 0x1 << 13; // Release Land (to Gov. Linden)
+const U64 GP_LAND_SET_SALE_INFO = 0x1 << 14; // Set for sale info (Toggle "For Sale", Set Price, Set Target, Toggle "Sell objects with the land")
+const U64 GP_LAND_DIVIDE_JOIN = 0x1 << 15; // Divide and Join Parcels
+
+// Parcel Identity
+const U64 GP_LAND_FIND_PLACES = 0x1 << 17; // Toggle "Show in Find Places" and Set Category.
+const U64 GP_LAND_CHANGE_IDENTITY = 0x1 << 18; // Change Parcel Identity: Parcel Name, Parcel Description, Snapshot, 'Publish on the web', and 'Mature' checkbox
+const U64 GP_LAND_SET_LANDING_POINT = 0x1 << 19; // Set Landing Point
+
+// Parcel Settings
+const U64 GP_LAND_CHANGE_MEDIA = 0x1 << 20; // Change Media Settings
+const U64 GP_LAND_EDIT = 0x1 << 21; // Toggle Edit Land
+const U64 GP_LAND_OPTIONS = 0x1 << 22; // Toggle Set Home Point, Fly, Outside Scripts, Create/Edit Objects, Landmark, and Damage checkboxes
+
+// Parcel Powers
+const U64 GP_LAND_ALLOW_EDIT_LAND = 0x1 << 23; // Bypass Edit Land Restriction
+const U64 GP_LAND_ALLOW_FLY = 0x1 << 24; // Bypass Fly Restriction
+const U64 GP_LAND_ALLOW_CREATE = 0x1 << 25; // Bypass Create/Edit Objects Restriction
+const U64 GP_LAND_ALLOW_LANDMARK = 0x1 << 26; // Bypass Landmark Restriction
+const U64 GP_LAND_ALLOW_SET_HOME = 0x1 << 28; // Bypass Set Home Point Restriction
+const U64 GP_LAND_ALLOW_HOLD_EVENT = 0x1LL << 41; // Allowed to hold events on group-owned land
+
+
+// Parcel Access
+const U64 GP_LAND_MANAGE_ALLOWED = 0x1 << 29; // Manage Allowed List
+const U64 GP_LAND_MANAGE_BANNED = 0x1 << 30; // Manage Banned List
+const U64 GP_LAND_MANAGE_PASSES = 0x1LL << 31; // Change Sell Pass Settings
+const U64 GP_LAND_ADMIN = 0x1LL << 32; // Eject and Freeze Users on the land
+
+// Parcel Content
+const U64 GP_LAND_RETURN_GROUP_SET = 0x1LL << 33; // Return objects on parcel that are set to group
+const U64 GP_LAND_RETURN_NON_GROUP = 0x1LL << 34; // Return objects on parcel that are not set to group
+const U64 GP_LAND_RETURN_GROUP_OWNED= 0x1LL << 48; // Return objects on parcel that are owned by the group
+
+// Select a power-bit based on an object's relationship to a parcel.
+const U64 GP_LAND_RETURN = GP_LAND_RETURN_GROUP_OWNED
+ | GP_LAND_RETURN_GROUP_SET
+ | GP_LAND_RETURN_NON_GROUP;
+
+const U64 GP_LAND_GARDENING = 0x1LL << 35; // Parcel Gardening - plant and move linden trees
+
+// Object Management
+const U64 GP_OBJECT_DEED = 0x1LL << 36; // Deed Object
+const U64 GP_OBJECT_MANIPULATE = 0x1LL << 38; // Manipulate Group Owned Objects (Move, Copy, Mod)
+const U64 GP_OBJECT_SET_SALE = 0x1LL << 39; // Set Group Owned Object for Sale
+
+// Accounting
+const U64 GP_ACCOUNTING_ACCOUNTABLE = 0x1LL << 40; // Pay Group Liabilities and Receive Group Dividends
+
+// Notices
+const U64 GP_NOTICES_SEND = 0x1LL << 42; // Send Notices
+const U64 GP_NOTICES_RECEIVE = 0x1LL << 43; // Receive Notices and View Notice History
+
+// Proposals
+// TODO: _DEPRECATED suffix as part of vote removal - DEV-24856:
+const U64 GP_PROPOSAL_START = 0x1LL << 44; // Start Proposal
+// TODO: _DEPRECATED suffix as part of vote removal - DEV-24856:
+const U64 GP_PROPOSAL_VOTE = 0x1LL << 45; // Vote on Proposal
+
+// Group chat moderation related
+const U64 GP_SESSION_JOIN = 0x1LL << 16; //can join session
+const U64 GP_SESSION_VOICE = 0x1LL << 27; //can hear/talk
+const U64 GP_SESSION_MODERATOR = 0x1LL << 37; //can mute people's session
+
+const U64 GP_DEFAULT_MEMBER = GP_ACCOUNTING_ACCOUNTABLE
+ | GP_LAND_ALLOW_SET_HOME
+ | GP_NOTICES_RECEIVE
+ | GP_SESSION_JOIN
+ | GP_SESSION_VOICE
+ ;
+
+const U64 GP_DEFAULT_OFFICER = GP_DEFAULT_MEMBER // Superset of GP_DEFAULT_MEMBER
+ | GP_GROUP_CHANGE_IDENTITY
+ | GP_LAND_ADMIN
+ | GP_LAND_ALLOW_EDIT_LAND
+ | GP_LAND_ALLOW_FLY
+ | GP_LAND_ALLOW_CREATE
+ | GP_LAND_ALLOW_LANDMARK
+ | GP_LAND_CHANGE_IDENTITY
+ | GP_LAND_CHANGE_MEDIA
+ | GP_LAND_DEED
+ | GP_LAND_DIVIDE_JOIN
+ | GP_LAND_EDIT
+ | GP_LAND_FIND_PLACES
+ | GP_LAND_GARDENING
+ | GP_LAND_MANAGE_ALLOWED
+ | GP_LAND_MANAGE_BANNED
+ | GP_LAND_MANAGE_PASSES
+ | GP_LAND_OPTIONS
+ | GP_LAND_RELEASE
+ | GP_LAND_RETURN_GROUP_OWNED
+ | GP_LAND_RETURN_GROUP_SET
+ | GP_LAND_RETURN_NON_GROUP
+ | GP_LAND_SET_LANDING_POINT
+ | GP_LAND_SET_SALE_INFO
+ | GP_MEMBER_EJECT
+ | GP_MEMBER_INVITE
+ | GP_MEMBER_OPTIONS
+ | GP_MEMBER_VISIBLE_IN_DIR
+ | GP_NOTICES_SEND
+ | GP_OBJECT_DEED
+ | GP_OBJECT_MANIPULATE
+ | GP_OBJECT_SET_SALE
+ | GP_ROLE_ASSIGN_MEMBER_LIMITED
+ | GP_ROLE_PROPERTIES
+ | GP_SESSION_MODERATOR
+ ;
+#endif
diff --git a/indra/newview/skins/default/xui/en/floater_stats.xml b/indra/newview/skins/default/xui/en/floater_stats.xml
index ba43c24ad3..d4dbb487f1 100755
--- a/indra/newview/skins/default/xui/en/floater_stats.xml
+++ b/indra/newview/skins/default/xui/en/floater_stats.xml
@@ -65,8 +65,7 @@
<stat_bar name="ktrisframe"
label="KTris per Frame"
unit_label="ktris/fr"
- stat="trianglesdrawnstat"
- show_per_sec="false"/>
+ stat="trianglesdrawnperframestat"/>
<stat_bar name="ktrissec"
label="KTris per Sec"
stat="trianglesdrawnstat"/>
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 29393bf749..9f02e90ea3 100755
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2402,6 +2402,7 @@ Drag folders to this area and click "Send to Marketplace" to list them for sale
<!-- compile queue-->
<string name="CompileQueueDownloadedCompiling">Downloaded, now compiling</string>
+ <string name="CompileQueueServiceUnavailable">Script compilation service not available</string>
<string name="CompileQueueScriptNotFound">Script not found on server.</string>
<string name="CompileQueueProblemDownloading">Problem downloading</string>
<string name="CompileQueueInsufficientPermDownload">Insufficient permissions to download a script.</string>