summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llappearance/llavatarappearance.cpp195
-rw-r--r--indra/llappearance/llavatarjointmesh.cpp25
-rw-r--r--indra/llappearance/lldriverparam.h1
-rw-r--r--indra/llappearance/llpolymesh.cpp19
-rw-r--r--indra/llappearance/llpolymesh.h3
-rw-r--r--indra/llappearance/llpolyskeletaldistortion.cpp2
-rw-r--r--indra/llappearance/llpolyskeletaldistortion.h1
-rw-r--r--indra/llappearance/lltexlayer.cpp1
-rw-r--r--indra/llappearance/llwearable.h1
-rwxr-xr-xindra/llaudio/llaudiodecodemgr.cpp16
-rwxr-xr-xindra/llaudio/llaudiodecodemgr.h1
-rwxr-xr-xindra/llaudio/llaudioengine.cpp2
-rwxr-xr-xindra/llaudio/llaudioengine.h4
-rw-r--r--indra/llaudio/llstreamingaudio_fmodex.h4
-rwxr-xr-xindra/llcharacter/llanimationstates.h2
-rwxr-xr-xindra/llcharacter/llcharacter.h2
-rwxr-xr-xindra/llcharacter/llgesture.cpp41
-rwxr-xr-xindra/llcharacter/llgesture.h17
-rwxr-xr-xindra/llcharacter/lljoint.cpp2
-rwxr-xr-xindra/llcharacter/lljoint.h2
-rwxr-xr-xindra/llcharacter/lljointsolverrp3.cpp74
-rwxr-xr-xindra/llcharacter/llkeyframemotion.cpp5
-rwxr-xr-xindra/llcharacter/llkeyframemotionparam.h1
-rwxr-xr-xindra/llcharacter/llmotion.cpp2
-rwxr-xr-xindra/llcharacter/llpose.h1
-rwxr-xr-xindra/llcommon/CMakeLists.txt39
-rwxr-xr-xindra/llcommon/imageids.cpp73
-rwxr-xr-xindra/llcommon/imageids.h70
-rwxr-xr-xindra/llcommon/indra_constants.cpp31
-rwxr-xr-xindra/llcommon/indra_constants.h356
-rwxr-xr-xindra/llcommon/linked_lists.h937
-rwxr-xr-xindra/llcommon/ll_template_cast.h177
-rwxr-xr-xindra/llcommon/llaccountingcost.h86
-rwxr-xr-xindra/llcommon/llagentconstants.h159
-rwxr-xr-xindra/llcommon/llapp.h5
-rwxr-xr-xindra/llcommon/llassettype.h2
-rwxr-xr-xindra/llcommon/llavatarconstants.h55
-rwxr-xr-xindra/llcommon/llbitpack.cpp (renamed from indra/llcommon/bitpack.cpp)2
-rwxr-xr-xindra/llcommon/llbitpack.h (renamed from indra/llcommon/bitpack.h)8
-rw-r--r--[-rwxr-xr-x]indra/llcommon/llclickaction.h11
-rwxr-xr-xindra/llcommon/lldarray.h223
-rw-r--r--indra/llcommon/lldeleteutils.h47
-rwxr-xr-xindra/llcommon/lldepthstack.h11
-rwxr-xr-xindra/llcommon/llerror.cpp173
-rwxr-xr-xindra/llcommon/llerror.h180
-rwxr-xr-xindra/llcommon/llerrorcontrol.h4
-rwxr-xr-xindra/llcommon/llerrorlegacy.h95
-rwxr-xr-xindra/llcommon/llevents.h2
-rwxr-xr-xindra/llcommon/llframetimer.h1
-rwxr-xr-xindra/llcommon/llindexedvector.h100
-rwxr-xr-xindra/llcommon/llinitparam.cpp10
-rwxr-xr-xindra/llcommon/llinstancetracker.h2
-rwxr-xr-xindra/llcommon/lllinkedqueue.h309
-rwxr-xr-xindra/llcommon/lllog.cpp111
-rwxr-xr-xindra/llcommon/lllog.h52
-rwxr-xr-xindra/llcommon/llmap.h245
-rwxr-xr-xindra/llcommon/llnametable.h105
-rwxr-xr-xindra/llcommon/lloptioninterface.cpp33
-rwxr-xr-xindra/llcommon/lloptioninterface.h40
-rwxr-xr-xindra/llcommon/llsecondlifeurls.cpp84
-rwxr-xr-xindra/llcommon/llsecondlifeurls.h76
-rw-r--r--[-rwxr-xr-x]indra/llcommon/llstatenums.h44
-rwxr-xr-xindra/llcommon/llstl.h199
-rwxr-xr-xindra/llcommon/llstringtable.cpp4
-rwxr-xr-xindra/llcommon/lltimer.cpp9
-rwxr-xr-xindra/llcommon/lltimer.h4
-rw-r--r--indra/llcommon/llunit.h88
-rwxr-xr-xindra/llcommon/llversionserver.h38
-rwxr-xr-xindra/llcommon/stdenums.h137
-rwxr-xr-xindra/llcommon/string_table.h26
-rwxr-xr-xindra/llcommon/tests/bitpack_test.cpp2
-rwxr-xr-xindra/llcommon/timing.h42
-rwxr-xr-xindra/llcrashlogger/llcrashlogger.h5
-rwxr-xr-xindra/llinventory/CMakeLists.txt2
-rwxr-xr-xindra/llinventory/llfoldertype.cpp (renamed from indra/llcommon/llfoldertype.cpp)0
-rwxr-xr-xindra/llinventory/llfoldertype.h (renamed from indra/llcommon/llfoldertype.h)0
-rwxr-xr-xindra/llinventory/llinventory.h5
-rwxr-xr-xindra/llinventory/llparcel.cpp4
-rwxr-xr-xindra/llmath/llvolume.cpp1
-rwxr-xr-xindra/llmath/llvolume.h1
-rwxr-xr-xindra/llmessage/CMakeLists.txt3
-rwxr-xr-xindra/llmessage/llassetstorage.h11
-rwxr-xr-xindra/llmessage/llavatarname.cpp (renamed from indra/llcommon/llavatarname.cpp)0
-rwxr-xr-xindra/llmessage/llavatarname.h (renamed from indra/llcommon/llavatarname.h)0
-rwxr-xr-xindra/llmessage/llcircuit.h3
-rwxr-xr-xindra/llmessage/llextendedstatus.h (renamed from indra/llcommon/llextendedstatus.h)0
-rwxr-xr-xindra/llmessage/llhttpassetstorage.cpp3
-rwxr-xr-xindra/llmessage/llmessagetemplate.h8
-rwxr-xr-xindra/llmessage/llnamevalue.cpp2
-rwxr-xr-xindra/llmessage/llnamevalue.h2
-rwxr-xr-xindra/llmessage/llpacketbuffer.cpp2
-rwxr-xr-xindra/llmessage/llpacketring.cpp1
-rwxr-xr-xindra/llmessage/llxfer.h4
-rwxr-xr-xindra/llmessage/llxfermanager.cpp10
-rwxr-xr-xindra/llmessage/llxfermanager.h4
-rwxr-xr-xindra/llmessage/message.cpp235
-rwxr-xr-xindra/llmessage/message.h2
-rwxr-xr-xindra/llmessage/net.h3
-rwxr-xr-xindra/llmessage/partsyspacket.cpp2
-rwxr-xr-xindra/llmessage/patch_code.cpp2
-rwxr-xr-xindra/llprimitive/CMakeLists.txt1
-rwxr-xr-xindra/llprimitive/lllslconstants.h (renamed from indra/llcommon/lllslconstants.h)0
-rwxr-xr-xindra/llprimitive/llmaterialtable.cpp2
-rwxr-xr-xindra/llprimitive/llprimitive.cpp1
-rwxr-xr-xindra/llprimitive/llprimitive.h24
-rwxr-xr-xindra/llprimitive/tests/llmediaentry_test.cpp2
-rwxr-xr-xindra/llrender/llpostprocess.cpp2
-rwxr-xr-xindra/llui/CMakeLists.txt5
-rwxr-xr-xindra/llui/llbutton.cpp2
-rwxr-xr-xindra/llui/llchat.h (renamed from indra/llcommon/llchat.h)0
-rwxr-xr-xindra/llui/llclipboard.cpp1
-rwxr-xr-xindra/llui/llclipboard.h1
-rwxr-xr-xindra/llui/llctrlselectioninterface.h2
-rwxr-xr-xindra/llui/lldraghandle.cpp4
-rwxr-xr-xindra/llui/llflatlistview.cpp2
-rwxr-xr-xindra/llui/llfloater.cpp4
-rwxr-xr-xindra/llui/llfolderview.cpp23
-rwxr-xr-xindra/llui/llfolderview.h1
-rw-r--r--indra/llui/llfolderviewitem.cpp4
-rwxr-xr-xindra/llui/lliconctrl.h1
-rwxr-xr-xindra/llui/llkeywords.cpp22
-rwxr-xr-xindra/llui/lllineeditor.cpp4
-rwxr-xr-xindra/llui/llmodaldialog.cpp2
-rwxr-xr-xindra/llui/llmultislider.cpp4
-rwxr-xr-xindra/llui/llresmgr.cpp27
-rwxr-xr-xindra/llui/llscrollbar.cpp4
-rwxr-xr-xindra/llui/llscrollcontainer.cpp2
-rwxr-xr-xindra/llui/llscrollcontainer.h1
-rwxr-xr-xindra/llui/llscrolllistctrl.cpp2
-rwxr-xr-xindra/llui/llscrolllistctrl.h1
-rwxr-xr-xindra/llui/llslider.cpp4
-rwxr-xr-xindra/llui/llstatbar.cpp58
-rwxr-xr-xindra/llui/llstatbar.h12
-rwxr-xr-xindra/llui/lltexteditor.cpp2
-rwxr-xr-xindra/llui/lltexteditor.h2
-rwxr-xr-xindra/llui/llui.h46
-rwxr-xr-xindra/llui/lluistring.h6
-rwxr-xr-xindra/llui/llurlentry.h1
-rwxr-xr-xindra/llui/llview.h2
-rwxr-xr-xindra/llui/llviewmodel.h2
-rwxr-xr-xindra/llvfs/CMakeLists.txt2
-rwxr-xr-xindra/llvfs/lldir.cpp32
-rwxr-xr-xindra/llvfs/llpidlock.cpp276
-rwxr-xr-xindra/llvfs/llvfs.h1
-rwxr-xr-xindra/llwindow/CMakeLists.txt2
-rwxr-xr-xindra/llwindow/llcursortypes.cpp (renamed from indra/llcommon/llcursortypes.cpp)0
-rwxr-xr-xindra/llwindow/llcursortypes.h (renamed from indra/llcommon/llcursortypes.h)0
-rwxr-xr-xindra/llwindow/llkeyboard.cpp2
-rwxr-xr-xindra/llwindow/llkeyboard.h2
-rwxr-xr-xindra/llwindow/llwindow.cpp1
-rwxr-xr-xindra/llxml/llcontrol.h2
-rwxr-xr-xindra/llxml/llxmltree.h2
-rwxr-xr-xindra/lscript/lscript_compile/indra.l1
-rwxr-xr-xindra/lscript/lscript_compile/lscript_bytecode.cpp17
-rwxr-xr-xindra/lscript/lscript_compile/lscript_bytecode.h5
-rwxr-xr-xindra/lscript/lscript_compile/lscript_scope.h51
-rwxr-xr-xindra/lscript/lscript_compile/lscript_tree.h9
-rwxr-xr-xindra/lscript/lscript_execute.h65
-rwxr-xr-xindra/lscript/lscript_execute/lscript_execute.cpp10
-rwxr-xr-xindra/lscript/lscript_execute/lscript_readlso.h1
-rwxr-xr-xindra/newview/CMakeLists.txt3
-rwxr-xr-xindra/newview/app_settings/logcontrol.xml1
-rwxr-xr-xindra/newview/llaccountingcost.h (renamed from indra/llvfs/llpidlock.h)56
-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.h (renamed from indra/llcommon/roles_constants.h)0
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_stats.xml3
-rwxr-xr-xindra/newview/skins/default/xui/en/strings.xml1
334 files changed, 2475 insertions, 6004 deletions
diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp
index 0e91cd3185..8126d620ec 100644
--- a/indra/llappearance/llavatarappearance.cpp
+++ b/indra/llappearance/llavatarappearance.cpp
@@ -35,8 +35,7 @@
#include "llavatarappearance.h"
#include "llavatarappearancedefines.h"
#include "llavatarjointmesh.h"
-#include "imageids.h"
-#include "lldeleteutils.h"
+#include "llstl.h"
#include "lldir.h"
#include "llpolymorph.h"
#include "llpolymesh.h"
@@ -135,9 +134,9 @@ LLAvatarAppearance::LLAvatarXmlInfo::~LLAvatarXmlInfo()
std::for_each(mMeshInfoList.begin(), mMeshInfoList.end(), DeletePointer());
std::for_each(mSkeletalDistortionInfoList.begin(), mSkeletalDistortionInfoList.end(), DeletePointer());
std::for_each(mAttachmentInfoList.begin(), mAttachmentInfoList.end(), DeletePointer());
- deleteAndClear(mTexSkinColorInfo);
- deleteAndClear(mTexHairColorInfo);
- deleteAndClear(mTexEyeColorInfo);
+ delete_and_clear(mTexSkinColorInfo);
+ delete_and_clear(mTexHairColorInfo);
+ delete_and_clear(mTexEyeColorInfo);
std::for_each(mLayerInfoList.begin(), mLayerInfoList.end(), DeletePointer());
std::for_each(mDriverInfoList.begin(), mDriverInfoList.end(), DeletePointer());
std::for_each(mMorphMaskInfoList.begin(), mMorphMaskInfoList.end(), DeletePointer());
@@ -222,7 +221,7 @@ void LLAvatarAppearance::initInstance()
mesh->setMeshID(mesh_index);
mesh->setPickName(mesh_dict->mPickName);
mesh->setIsTransparent(FALSE);
- switch((int)mesh_index)
+ switch((S32)mesh_index)
{
case MESH_ID_HAIR:
mesh->setIsTransparent(TRUE);
@@ -258,7 +257,7 @@ void LLAvatarAppearance::initInstance()
++iter)
{
LLAvatarJointMesh* mesh = (*iter);
- mBakedTextureDatas[(int)baked_texture_index].mJointMeshes.push_back(mesh);
+ mBakedTextureDatas[(S32)baked_texture_index].mJointMeshes.push_back(mesh);
}
}
@@ -269,13 +268,13 @@ void LLAvatarAppearance::initInstance()
// virtual
LLAvatarAppearance::~LLAvatarAppearance()
{
- deleteAndClear(mTexSkinColor);
- deleteAndClear(mTexHairColor);
- deleteAndClear(mTexEyeColor);
+ delete_and_clear(mTexSkinColor);
+ delete_and_clear(mTexHairColor);
+ delete_and_clear(mTexEyeColor);
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
{
- deleteAndClear(mBakedTextureDatas[i].mTexLayerSet);
+ delete_and_clear(mBakedTextureDatas[i].mTexLayerSet);
mBakedTextureDatas[i].mJointMeshes.clear();
for (morph_list_t::iterator iter2 = mBakedTextureDatas[i].mMaskedMorphs.begin();
@@ -290,11 +289,11 @@ LLAvatarAppearance::~LLAvatarAppearance()
mJointMap.clear();
clearSkeleton();
- deleteAndClearArray(mCollisionVolumes);
+ delete_and_clear_array(mCollisionVolumes);
- deleteAndClear(mTexSkinColor);
- deleteAndClear(mTexHairColor);
- deleteAndClear(mTexEyeColor);
+ delete_and_clear(mTexSkinColor);
+ delete_and_clear(mTexHairColor);
+ delete_and_clear(mTexEyeColor);
std::for_each(mPolyMeshes.begin(), mPolyMeshes.end(), DeletePairedPointer());
mPolyMeshes.clear();
@@ -320,14 +319,14 @@ void LLAvatarAppearance::initClass()
BOOL success = sXMLTree.parseFile( xmlFile, FALSE );
if (!success)
{
- llerrs << "Problem reading avatar configuration file:" << xmlFile << llendl;
+ llerrs << "Problem reading avatar configuration file:" << xmlFile << LL_ENDL;
}
// now sanity check xml file
LLXmlTreeNode* root = sXMLTree.getRoot();
if (!root)
{
- llerrs << "No root node found in avatar configuration file: " << xmlFile << llendl;
+ llerrs << "No root node found in avatar configuration file: " << xmlFile << LL_ENDL;
return;
}
@@ -336,14 +335,14 @@ void LLAvatarAppearance::initClass()
//-------------------------------------------------------------------------
if( !root->hasName( "linden_avatar" ) )
{
- llerrs << "Invalid avatar file header: " << xmlFile << llendl;
+ llerrs << "Invalid avatar file header: " << xmlFile << LL_ENDL;
}
std::string version;
static LLStdStringHandle version_string = LLXmlTree::addAttributeString("version");
if( !root->getFastAttributeString( version_string, version ) || (version != "1.0") )
{
- llerrs << "Invalid avatar file version: " << version << " in file: " << xmlFile << llendl;
+ llerrs << "Invalid avatar file version: " << version << " in file: " << xmlFile << LL_ENDL;
}
S32 wearable_def_version = 1;
@@ -356,7 +355,7 @@ void LLAvatarAppearance::initClass()
LLXmlTreeNode* skeleton_node = root->getChildByName( "skeleton" );
if (!skeleton_node)
{
- llerrs << "No skeleton in avatar configuration file: " << xmlFile << llendl;
+ llerrs << "No skeleton in avatar configuration file: " << xmlFile << LL_ENDL;
return;
}
@@ -364,14 +363,14 @@ void LLAvatarAppearance::initClass()
static LLStdStringHandle file_name_string = LLXmlTree::addAttributeString("file_name");
if (!skeleton_node->getFastAttributeString(file_name_string, skeleton_file_name))
{
- llerrs << "No file name in skeleton node in avatar config file: " << xmlFile << llendl;
+ llerrs << "No file name in skeleton node in avatar config file: " << xmlFile << LL_ENDL;
}
std::string skeleton_path;
skeleton_path = gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,skeleton_file_name);
if (!parseSkeletonFile(skeleton_path))
{
- llerrs << "Error parsing skeleton file: " << skeleton_path << llendl;
+ llerrs << "Error parsing skeleton file: " << skeleton_path << LL_ENDL;
}
// Process XML data
@@ -384,43 +383,43 @@ void LLAvatarAppearance::initClass()
sAvatarSkeletonInfo = new LLAvatarSkeletonInfo;
if (!sAvatarSkeletonInfo->parseXml(sSkeletonXMLTree.getRoot()))
{
- llerrs << "Error parsing skeleton XML file: " << skeleton_path << llendl;
+ llerrs << "Error parsing skeleton XML file: " << skeleton_path << LL_ENDL;
}
// parse avatar_lad.xml
if (sAvatarXmlInfo)
{ //this can happen if a login attempt failed
- deleteAndClear(sAvatarXmlInfo);
+ delete_and_clear(sAvatarXmlInfo);
}
sAvatarXmlInfo = new LLAvatarXmlInfo;
if (!sAvatarXmlInfo->parseXmlSkeletonNode(root))
{
- llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << llendl;
+ llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL;
}
if (!sAvatarXmlInfo->parseXmlMeshNodes(root))
{
- llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << llendl;
+ llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL;
}
if (!sAvatarXmlInfo->parseXmlColorNodes(root))
{
- llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << llendl;
+ llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL;
}
if (!sAvatarXmlInfo->parseXmlLayerNodes(root))
{
- llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << llendl;
+ llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL;
}
if (!sAvatarXmlInfo->parseXmlDriverNodes(root))
{
- llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << llendl;
+ llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL;
}
if (!sAvatarXmlInfo->parseXmlMorphNodes(root))
{
- llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << llendl;
+ llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL;
}
}
void LLAvatarAppearance::cleanupClass()
{
- deleteAndClear(sAvatarXmlInfo);
+ delete_and_clear(sAvatarXmlInfo);
// *TODO: What about sAvatarSkeletonInfo ???
sSkeletonXMLTree.cleanup();
sXMLTree.cleanup();
@@ -527,7 +526,7 @@ BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename)
if (!parsesuccess)
{
- llerrs << "Can't parse skeleton file: " << filename << llendl;
+ llerrs << "Can't parse skeleton file: " << filename << LL_ENDL;
return FALSE;
}
@@ -535,13 +534,13 @@ BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename)
LLXmlTreeNode* root = sSkeletonXMLTree.getRoot();
if (!root)
{
- llerrs << "No root node found in avatar skeleton file: " << filename << llendl;
+ llerrs << "No root node found in avatar skeleton file: " << filename << LL_ENDL;
return FALSE;
}
if( !root->hasName( "linden_skeleton" ) )
{
- llerrs << "Invalid avatar skeleton file header: " << filename << llendl;
+ llerrs << "Invalid avatar skeleton file header: " << filename << LL_ENDL;
return FALSE;
}
@@ -549,7 +548,7 @@ BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename)
static LLStdStringHandle version_string = LLXmlTree::addAttributeString("version");
if( !root->getFastAttributeString( version_string, version ) || (version != "1.0") )
{
- llerrs << "Invalid avatar skeleton file version: " << version << " in file: " << filename << llendl;
+ llerrs << "Invalid avatar skeleton file version: " << version << " in file: " << filename << LL_ENDL;
return FALSE;
}
@@ -568,7 +567,7 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent
joint = getCharacterJoint(joint_num);
if (!joint)
{
- llwarns << "Too many bones" << llendl;
+ llwarns << "Too many bones" << LL_ENDL;
return FALSE;
}
joint->setName( info->mName );
@@ -577,7 +576,7 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent
{
if (volume_num >= (S32)mNumCollisionVolumes)
{
- llwarns << "Too many bones" << llendl;
+ llwarns << "Too many bones" << LL_ENDL;
return FALSE;
}
joint = (&mCollisionVolumes[volume_num]);
@@ -647,7 +646,7 @@ BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info)
//-------------------------------------------------------------------------
if (!allocateCharacterJoints(info->mNumBones))
{
- llerrs << "Can't allocate " << info->mNumBones << " joints" << llendl;
+ llerrs << "Can't allocate " << info->mNumBones << " joints" << LL_ENDL;
return FALSE;
}
@@ -658,7 +657,7 @@ BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info)
{
if (!allocateCollisionVolumes(info->mNumCollisionVolumes))
{
- llerrs << "Can't allocate " << info->mNumCollisionVolumes << " collision volumes" << llendl;
+ llerrs << "Can't allocate " << info->mNumCollisionVolumes << " collision volumes" << LL_ENDL;
return FALSE;
}
}
@@ -671,7 +670,7 @@ BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info)
LLAvatarBoneInfo *info = *iter;
if (!setupBone(info, NULL, current_volume_num, current_joint_num))
{
- llerrs << "Error parsing bone in skeleton file" << llendl;
+ llerrs << "Error parsing bone in skeleton file" << LL_ENDL;
return FALSE;
}
}
@@ -731,17 +730,17 @@ void LLAvatarAppearance::buildCharacter()
stop_glerror();
// gPrintMessagesThisFrame = TRUE;
- lldebugs << "Avatar load took " << timer.getElapsedTimeF32() << " seconds." << llendl;
+ lldebugs << "Avatar load took " << timer.getElapsedTimeF32() << " seconds." << LL_ENDL;
if (!status)
{
if (isSelf())
{
- llerrs << "Unable to load user's avatar" << llendl;
+ llerrs << "Unable to load user's avatar" << LL_ENDL;
}
else
{
- llwarns << "Unable to load other's avatar" << llendl;
+ llwarns << "Unable to load other's avatar" << LL_ENDL;
}
return;
}
@@ -790,7 +789,7 @@ void LLAvatarAppearance::buildCharacter()
mEyeLeftp &&
mEyeRightp))
{
- llerrs << "Failed to create avatar." << llendl;
+ llerrs << "Failed to create avatar." << LL_ENDL;
return;
}
@@ -811,21 +810,21 @@ BOOL LLAvatarAppearance::loadAvatar()
// avatar_skeleton.xml
if( !buildSkeleton(sAvatarSkeletonInfo) )
{
- llwarns << "avatar file: buildSkeleton() failed" << llendl;
+ llwarns << "avatar file: buildSkeleton() failed" << LL_ENDL;
return FALSE;
}
// avatar_lad.xml : <skeleton>
if( !loadSkeletonNode() )
{
- llwarns << "avatar file: loadNodeSkeleton() failed" << llendl;
+ llwarns << "avatar file: loadNodeSkeleton() failed" << LL_ENDL;
return FALSE;
}
// avatar_lad.xml : <mesh>
if( !loadMeshNodes() )
{
- llwarns << "avatar file: loadNodeMesh() failed" << llendl;
+ llwarns << "avatar file: loadNodeMesh() failed" << LL_ENDL;
return FALSE;
}
@@ -835,13 +834,13 @@ BOOL LLAvatarAppearance::loadAvatar()
mTexSkinColor = new LLTexGlobalColor( this );
if( !mTexSkinColor->setInfo( sAvatarXmlInfo->mTexSkinColorInfo ) )
{
- llwarns << "avatar file: mTexSkinColor->setInfo() failed" << llendl;
+ llwarns << "avatar file: mTexSkinColor->setInfo() failed" << LL_ENDL;
return FALSE;
}
}
else
{
- llwarns << "<global_color> name=\"skin_color\" not found" << llendl;
+ llwarns << "<global_color> name=\"skin_color\" not found" << LL_ENDL;
return FALSE;
}
if( sAvatarXmlInfo->mTexHairColorInfo )
@@ -849,13 +848,13 @@ BOOL LLAvatarAppearance::loadAvatar()
mTexHairColor = new LLTexGlobalColor( this );
if( !mTexHairColor->setInfo( sAvatarXmlInfo->mTexHairColorInfo ) )
{
- llwarns << "avatar file: mTexHairColor->setInfo() failed" << llendl;
+ llwarns << "avatar file: mTexHairColor->setInfo() failed" << LL_ENDL;
return FALSE;
}
}
else
{
- llwarns << "<global_color> name=\"hair_color\" not found" << llendl;
+ llwarns << "<global_color> name=\"hair_color\" not found" << LL_ENDL;
return FALSE;
}
if( sAvatarXmlInfo->mTexEyeColorInfo )
@@ -863,26 +862,26 @@ BOOL LLAvatarAppearance::loadAvatar()
mTexEyeColor = new LLTexGlobalColor( this );
if( !mTexEyeColor->setInfo( sAvatarXmlInfo->mTexEyeColorInfo ) )
{
- llwarns << "avatar file: mTexEyeColor->setInfo() failed" << llendl;
+ llwarns << "avatar file: mTexEyeColor->setInfo() failed" << LL_ENDL;
return FALSE;
}
}
else
{
- llwarns << "<global_color> name=\"eye_color\" not found" << llendl;
+ llwarns << "<global_color> name=\"eye_color\" not found" << LL_ENDL;
return FALSE;
}
// avatar_lad.xml : <layer_set>
if (sAvatarXmlInfo->mLayerInfoList.empty())
{
- llwarns << "avatar file: missing <layer_set> node" << llendl;
+ llwarns << "avatar file: missing <layer_set> node" << LL_ENDL;
return FALSE;
}
if (sAvatarXmlInfo->mMorphMaskInfoList.empty())
{
- llwarns << "avatar file: missing <morph_masks> node" << llendl;
+ llwarns << "avatar file: missing <morph_masks> node" << LL_ENDL;
return FALSE;
}
@@ -924,14 +923,14 @@ BOOL LLAvatarAppearance::loadAvatar()
LLVisualParam*(LLAvatarAppearance::*avatar_function)(S32)const = &LLAvatarAppearance::getVisualParam;
if( !driver_param->linkDrivenParams(boost::bind(avatar_function,(LLAvatarAppearance*)this,_1 ), false))
{
- llwarns << "could not link driven params for avatar " << getID().asString() << " param id: " << driver_param->getID() << llendl;
+ llwarns << "could not link driven params for avatar " << getID().asString() << " param id: " << driver_param->getID() << LL_ENDL;
continue;
}
}
else
{
delete driver_param;
- llwarns << "avatar file: driver_param->parseData() failed" << llendl;
+ llwarns << "avatar file: driver_param->parseData() failed" << LL_ENDL;
return FALSE;
}
}
@@ -1051,17 +1050,17 @@ BOOL LLAvatarAppearance::loadMeshNodes()
}
else
{
- llwarns << "Avatar file: <mesh> has invalid lod setting " << lod << llendl;
+ llwarns << "Avatar file: <mesh> has invalid lod setting " << lod << LL_ENDL;
return FALSE;
}
}
else
{
- llwarns << "Ignoring unrecognized mesh type: " << type << llendl;
+ llwarns << "Ignoring unrecognized mesh type: " << type << LL_ENDL;
return FALSE;
}
- // llinfos << "Parsing mesh data for " << type << "..." << llendl;
+ // llinfos << "Parsing mesh data for " << type << "..." << LL_ENDL;
// If this isn't set to white (1.0), avatars will *ALWAYS* be darker than their surroundings.
// Do not touch!!!
@@ -1091,7 +1090,7 @@ BOOL LLAvatarAppearance::loadMeshNodes()
if( !poly_mesh )
{
- llwarns << "Failed to load mesh of type " << type << llendl;
+ llwarns << "Failed to load mesh of type " << type << LL_ENDL;
return FALSE;
}
@@ -1151,7 +1150,7 @@ BOOL LLAvatarAppearance::loadLayersets()
{
stop_glerror();
delete layer_set;
- llwarns << "avatar file: layer_set->setInfo() failed" << llendl;
+ llwarns << "avatar file: layer_set->setInfo() failed" << LL_ENDL;
return FALSE;
}
@@ -1174,7 +1173,7 @@ BOOL LLAvatarAppearance::loadLayersets()
// if no baked texture was found, warn and cleanup
if (baked_index == BAKED_NUM_INDICES)
{
- llwarns << "<layer_set> has invalid body_region attribute" << llendl;
+ llwarns << "<layer_set> has invalid body_region attribute" << LL_ENDL;
delete layer_set;
return FALSE;
}
@@ -1192,7 +1191,7 @@ BOOL LLAvatarAppearance::loadLayersets()
}
else
{
- llwarns << "Could not find layer named " << morph->mLayer << " to set morph flag" << llendl;
+ llwarns << "Could not find layer named " << morph->mLayer << " to set morph flag" << LL_ENDL;
success = FALSE;
}
}
@@ -1288,7 +1287,7 @@ BOOL LLAvatarAppearance::isValid() const
// This should only be called on ourself.
if (!isSelf())
{
- llerrs << "Called LLAvatarAppearance::isValid() on when isSelf() == false" << llendl;
+ llerrs << "Called LLAvatarAppearance::isValid() on when isSelf() == false" << LL_ENDL;
}
return TRUE;
}
@@ -1453,7 +1452,7 @@ LLTexLayerSet* LLAvatarAppearance::getAvatarLayerSet(EBakedTextureIndex baked_in
//-----------------------------------------------------------------------------
BOOL LLAvatarAppearance::allocateCollisionVolumes( U32 num )
{
- deleteAndClearArray(mCollisionVolumes);
+ delete_and_clear_array(mCollisionVolumes);
mNumCollisionVolumes = 0;
mCollisionVolumes = new LLAvatarJointCollisionVolume[num];
@@ -1477,7 +1476,7 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node)
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if (!node->getFastAttributeString(name_string, mName))
{
- llwarns << "Bone without name" << llendl;
+ llwarns << "Bone without name" << LL_ENDL;
return FALSE;
}
}
@@ -1492,28 +1491,28 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node)
}
else
{
- llwarns << "Invalid node " << node->getName() << llendl;
+ llwarns << "Invalid node " << node->getName() << LL_ENDL;
return FALSE;
}
static LLStdStringHandle pos_string = LLXmlTree::addAttributeString("pos");
if (!node->getFastAttributeVector3(pos_string, mPos))
{
- llwarns << "Bone without position" << llendl;
+ llwarns << "Bone without position" << LL_ENDL;
return FALSE;
}
static LLStdStringHandle rot_string = LLXmlTree::addAttributeString("rot");
if (!node->getFastAttributeVector3(rot_string, mRot))
{
- llwarns << "Bone without rotation" << llendl;
+ llwarns << "Bone without rotation" << LL_ENDL;
return FALSE;
}
static LLStdStringHandle scale_string = LLXmlTree::addAttributeString("scale");
if (!node->getFastAttributeVector3(scale_string, mScale))
{
- llwarns << "Bone without scale" << llendl;
+ llwarns << "Bone without scale" << LL_ENDL;
return FALSE;
}
@@ -1522,7 +1521,7 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node)
static LLStdStringHandle pivot_string = LLXmlTree::addAttributeString("pivot");
if (!node->getFastAttributeVector3(pivot_string, mPivot))
{
- llwarns << "Bone without pivot" << llendl;
+ llwarns << "Bone without pivot" << LL_ENDL;
return FALSE;
}
}
@@ -1550,7 +1549,7 @@ BOOL LLAvatarSkeletonInfo::parseXml(LLXmlTreeNode* node)
static LLStdStringHandle num_bones_string = LLXmlTree::addAttributeString("num_bones");
if (!node->getFastAttributeS32(num_bones_string, mNumBones))
{
- llwarns << "Couldn't find number of bones." << llendl;
+ llwarns << "Couldn't find number of bones." << LL_ENDL;
return FALSE;
}
@@ -1564,7 +1563,7 @@ BOOL LLAvatarSkeletonInfo::parseXml(LLXmlTreeNode* node)
if (!info->parseXml(child))
{
delete info;
- llwarns << "Error parsing bone in skeleton file" << llendl;
+ llwarns << "Error parsing bone in skeleton file" << LL_ENDL;
return FALSE;
}
mBoneInfoList.push_back(info);
@@ -1581,7 +1580,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro
LLXmlTreeNode* node = root->getChildByName( "skeleton" );
if( !node )
{
- llwarns << "avatar file: missing <skeleton>" << llendl;
+ llwarns << "avatar file: missing <skeleton>" << LL_ENDL;
return FALSE;
}
@@ -1596,11 +1595,11 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro
{
if (child->getChildByName("param_morph"))
{
- llwarns << "Can't specify morph param in skeleton definition." << llendl;
+ llwarns << "Can't specify morph param in skeleton definition." << LL_ENDL;
}
else
{
- llwarns << "Unknown param type." << llendl;
+ llwarns << "Unknown param type." << LL_ENDL;
}
continue;
}
@@ -1625,7 +1624,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if (!child->getFastAttributeString(name_string, info->mName))
{
- llwarns << "No name supplied for attachment point." << llendl;
+ llwarns << "No name supplied for attachment point." << LL_ENDL;
delete info;
continue;
}
@@ -1633,7 +1632,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro
static LLStdStringHandle joint_string = LLXmlTree::addAttributeString("joint");
if (!child->getFastAttributeString(joint_string, info->mJointName))
{
- llwarns << "No bone declared in attachment point " << info->mName << llendl;
+ llwarns << "No bone declared in attachment point " << info->mName << LL_ENDL;
delete info;
continue;
}
@@ -1659,7 +1658,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro
static LLStdStringHandle id_string = LLXmlTree::addAttributeString("id");
if (!child->getFastAttributeS32(id_string, info->mAttachmentID))
{
- llwarns << "No id supplied for attachment point " << info->mName << llendl;
+ llwarns << "No id supplied for attachment point " << info->mName << LL_ENDL;
delete info;
continue;
}
@@ -1694,7 +1693,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root)
static LLStdStringHandle type_string = LLXmlTree::addAttributeString("type");
if( !node->getFastAttributeString( type_string, info->mType ) )
{
- llwarns << "Avatar file: <mesh> is missing type attribute. Ignoring element. " << llendl;
+ llwarns << "Avatar file: <mesh> is missing type attribute. Ignoring element. " << LL_ENDL;
delete info;
return FALSE; // Ignore this element
}
@@ -1702,7 +1701,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root)
static LLStdStringHandle lod_string = LLXmlTree::addAttributeString("lod");
if (!node->getFastAttributeS32( lod_string, info->mLOD ))
{
- llwarns << "Avatar file: <mesh> is missing lod attribute. Ignoring element. " << llendl;
+ llwarns << "Avatar file: <mesh> is missing lod attribute. Ignoring element. " << LL_ENDL;
delete info;
return FALSE; // Ignore this element
}
@@ -1710,7 +1709,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root)
static LLStdStringHandle file_name_string = LLXmlTree::addAttributeString("file_name");
if( !node->getFastAttributeString( file_name_string, info->mMeshFileName ) )
{
- llwarns << "Avatar file: <mesh> is missing file_name attribute. Ignoring: " << info->mType << llendl;
+ llwarns << "Avatar file: <mesh> is missing file_name attribute. Ignoring: " << info->mType << LL_ENDL;
delete info;
return FALSE; // Ignore this element
}
@@ -1741,11 +1740,11 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root)
{
if (child->getChildByName("param_skeleton"))
{
- llwarns << "Can't specify skeleton param in a mesh definition." << llendl;
+ llwarns << "Can't specify skeleton param in a mesh definition." << LL_ENDL;
}
else
{
- llwarns << "Unknown param type." << llendl;
+ llwarns << "Unknown param type." << LL_ENDL;
}
continue;
}
@@ -1786,14 +1785,14 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root
{
if (mTexSkinColorInfo)
{
- llwarns << "avatar file: multiple instances of skin_color" << llendl;
+ llwarns << "avatar file: multiple instances of skin_color" << LL_ENDL;
return FALSE;
}
mTexSkinColorInfo = new LLTexGlobalColorInfo;
if( !mTexSkinColorInfo->parseXml( color_node ) )
{
- deleteAndClear(mTexSkinColorInfo);
- llwarns << "avatar file: mTexSkinColor->parseXml() failed" << llendl;
+ delete_and_clear(mTexSkinColorInfo);
+ llwarns << "avatar file: mTexSkinColor->parseXml() failed" << LL_ENDL;
return FALSE;
}
}
@@ -1801,14 +1800,14 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root
{
if (mTexHairColorInfo)
{
- llwarns << "avatar file: multiple instances of hair_color" << llendl;
+ llwarns << "avatar file: multiple instances of hair_color" << LL_ENDL;
return FALSE;
}
mTexHairColorInfo = new LLTexGlobalColorInfo;
if( !mTexHairColorInfo->parseXml( color_node ) )
{
- deleteAndClear(mTexHairColorInfo);
- llwarns << "avatar file: mTexHairColor->parseXml() failed" << llendl;
+ delete_and_clear(mTexHairColorInfo);
+ llwarns << "avatar file: mTexHairColor->parseXml() failed" << LL_ENDL;
return FALSE;
}
}
@@ -1816,13 +1815,13 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root
{
if (mTexEyeColorInfo)
{
- llwarns << "avatar file: multiple instances of eye_color" << llendl;
+ llwarns << "avatar file: multiple instances of eye_color" << LL_ENDL;
return FALSE;
}
mTexEyeColorInfo = new LLTexGlobalColorInfo;
if( !mTexEyeColorInfo->parseXml( color_node ) )
{
- llwarns << "avatar file: mTexEyeColor->parseXml() failed" << llendl;
+ llwarns << "avatar file: mTexEyeColor->parseXml() failed" << LL_ENDL;
return FALSE;
}
}
@@ -1848,7 +1847,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlLayerNodes(LLXmlTreeNode* root
else
{
delete layer_info;
- llwarns << "avatar file: layer_set->parseXml() failed" << llendl;
+ llwarns << "avatar file: layer_set->parseXml() failed" << LL_ENDL;
return FALSE;
}
}
@@ -1877,7 +1876,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlDriverNodes(LLXmlTreeNode* roo
else
{
delete driver_info;
- llwarns << "avatar file: driver_param->parseXml() failed" << llendl;
+ llwarns << "avatar file: driver_param->parseXml() failed" << LL_ENDL;
return FALSE;
}
}
@@ -1906,7 +1905,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("morph_name");
if (!grand_child->getFastAttributeString(name_string, info->mName))
{
- llwarns << "No name supplied for morph mask." << llendl;
+ llwarns << "No name supplied for morph mask." << LL_ENDL;
delete info;
continue;
}
@@ -1914,7 +1913,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root
static LLStdStringHandle region_string = LLXmlTree::addAttributeString("body_region");
if (!grand_child->getFastAttributeString(region_string, info->mRegion))
{
- llwarns << "No region supplied for morph mask." << llendl;
+ llwarns << "No region supplied for morph mask." << LL_ENDL;
delete info;
continue;
}
@@ -1922,7 +1921,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root
static LLStdStringHandle layer_string = LLXmlTree::addAttributeString("layer");
if (!grand_child->getFastAttributeString(layer_string, info->mLayer))
{
- llwarns << "No layer supplied for morph mask." << llendl;
+ llwarns << "No layer supplied for morph mask." << LL_ENDL;
delete info;
continue;
}
diff --git a/indra/llappearance/llavatarjointmesh.cpp b/indra/llappearance/llavatarjointmesh.cpp
index 753805b314..e50ef8d485 100644
--- a/indra/llappearance/llavatarjointmesh.cpp
+++ b/indra/llappearance/llavatarjointmesh.cpp
@@ -28,7 +28,6 @@
// Header Files
//-----------------------------------------------------------------------------
#include "linden_common.h"
-#include "imageids.h"
#include "llfasttimer.h"
#include "llrender.h"
@@ -317,7 +316,7 @@ void LLAvatarJointMesh::setMesh( LLPolyMesh *mesh )
setupJoint((LLAvatarJoint*)getRoot());
}
-// llinfos << "joint render entries: " << mMesh->mJointRenderData.count() << llendl;
+ LL_DEBUGS() << "joint render entries: " << mMesh->mJointRenderData.size() << LL_ENDL;
}
//-----------------------------------------------------------------------------
@@ -325,10 +324,11 @@ void LLAvatarJointMesh::setMesh( LLPolyMesh *mesh )
//-----------------------------------------------------------------------------
void LLAvatarJointMesh::setupJoint(LLAvatarJoint* current_joint)
{
-// llinfos << "Mesh: " << getName() << llendl;
+ LL_DEBUGS() << "Mesh: " << getName() << LL_ENDL;
-// S32 joint_count = 0;
+ S32 joint_count = 0;
U32 sj;
+
for (sj=0; sj<mNumSkinJoints; sj++)
{
LLSkinJoint &js = mSkinJoints[sj];
@@ -341,23 +341,20 @@ void LLAvatarJointMesh::setupJoint(LLAvatarJoint* current_joint)
// we've found a skinjoint for this joint..
// is the last joint in the array our parent?
- if(mMesh->mJointRenderData.count() && mMesh->mJointRenderData[mMesh->mJointRenderData.count() - 1]->mWorldMatrix == &current_joint->getParent()->getWorldMatrix())
+ if(mMesh->mJointRenderData.size() && mMesh->mJointRenderData[mMesh->mJointRenderData.size() - 1]->mWorldMatrix == &current_joint->getParent()->getWorldMatrix())
{
// ...then just add ourselves
LLAvatarJoint* jointp = js.mJoint;
- mMesh->mJointRenderData.put(new LLJointRenderData(&jointp->getWorldMatrix(), &js));
-// llinfos << "joint " << joint_count << js.mJoint->getName() << llendl;
-// joint_count++;
+ mMesh->mJointRenderData.push_back(new LLJointRenderData(&jointp->getWorldMatrix(), &js));
+ LL_DEBUGS() << "joint " << joint_count++ << js.mJoint->getName() << LL_ENDL;
}
// otherwise add our parent and ourselves
else
{
- mMesh->mJointRenderData.put(new LLJointRenderData(&current_joint->getParent()->getWorldMatrix(), NULL));
-// llinfos << "joint " << joint_count << current_joint->getParent()->getName() << llendl;
-// joint_count++;
- mMesh->mJointRenderData.put(new LLJointRenderData(&current_joint->getWorldMatrix(), &js));
-// llinfos << "joint " << joint_count << current_joint->getName() << llendl;
-// joint_count++;
+ mMesh->mJointRenderData.push_back(new LLJointRenderData(&current_joint->getParent()->getWorldMatrix(), NULL));
+ LL_DEBUGS() << "joint " << joint_count++ << current_joint->getParent()->getName() << LL_ENDL;
+ mMesh->mJointRenderData.push_back(new LLJointRenderData(&current_joint->getWorldMatrix(), &js));
+ LL_DEBUGS() << "joint " << joint_count++ << current_joint->getName() << LL_ENDL;
}
}
diff --git a/indra/llappearance/lldriverparam.h b/indra/llappearance/lldriverparam.h
index 040c9cf5be..2420db76e7 100644
--- a/indra/llappearance/lldriverparam.h
+++ b/indra/llappearance/lldriverparam.h
@@ -29,6 +29,7 @@
#include "llviewervisualparam.h"
#include "llwearabletype.h"
+#include <deque>
class LLAvatarAppearance;
class LLDriverParam;
diff --git a/indra/llappearance/llpolymesh.cpp b/indra/llappearance/llpolymesh.cpp
index a01457246e..1e87dae485 100644
--- a/indra/llappearance/llpolymesh.cpp
+++ b/indra/llappearance/llpolymesh.cpp
@@ -161,8 +161,8 @@ void LLPolyMeshSharedData::freeMeshData()
// mVertFaceMap.deleteAllData();
}
-// compate_int is used by the qsort function to sort the index array
-int compare_int(const void *a, const void *b);
+// compare_int is used by the qsort function to sort the index array
+S32 compare_int(const void *a, const void *b);
//-----------------------------------------------------------------------------
// genIndices()
@@ -547,10 +547,10 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
// S32 j;
// for(j = 0; j < 3; j++)
// {
-// LLDynamicArray<S32> *face_list = mVertFaceMap.getIfThere(face[j]);
+// std::vector<S32> *face_list = mVertFaceMap.getIfThere(face[j]);
// if (!face_list)
// {
-// face_list = new LLDynamicArray<S32>;
+// face_list = new std::vector<S32>;
// mVertFaceMap.addData(face[j], face_list);
// }
// face_list->put(i);
@@ -808,15 +808,8 @@ LLPolyMesh::LLPolyMesh(LLPolyMeshSharedData *shared_data, LLPolyMesh *reference_
//-----------------------------------------------------------------------------
LLPolyMesh::~LLPolyMesh()
{
- S32 i;
- for (i = 0; i < mJointRenderData.count(); i++)
- {
- delete mJointRenderData[i];
- mJointRenderData[i] = NULL;
- }
-
- ll_aligned_free_16(mVertexData);
-
+ delete_and_clear(mJointRenderData);
+ ll_aligned_free_16(mVertexData);
}
diff --git a/indra/llappearance/llpolymesh.h b/indra/llappearance/llpolymesh.h
index ef1dfb1adb..83659d9514 100644
--- a/indra/llappearance/llpolymesh.h
+++ b/indra/llappearance/llpolymesh.h
@@ -36,7 +36,6 @@
#include "llquaternion.h"
#include "llpolymorph.h"
#include "lljoint.h"
-//#include "lldarray.h"
class LLSkinJoint;
class LLAvatarAppearance;
@@ -322,7 +321,7 @@ public:
void setAvatar(LLAvatarAppearance* avatarp) { mAvatarp = avatarp; }
LLAvatarAppearance* getAvatar() { return mAvatarp; }
- LLDynamicArray<LLJointRenderData*> mJointRenderData;
+ std::vector<LLJointRenderData*> mJointRenderData;
U32 mFaceVertexOffset;
U32 mFaceVertexCount;
diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp
index a98a11b357..8f1f413e02 100644
--- a/indra/llappearance/llpolyskeletaldistortion.cpp
+++ b/indra/llappearance/llpolyskeletaldistortion.cpp
@@ -28,7 +28,7 @@
// Header Files
//-----------------------------------------------------------------------------
#include "llpreprocessor.h"
-#include "llerrorlegacy.h"
+#include "llerror.h"
#include "llavatarappearance.h"
#include "llavatarjoint.h"
#include "llpolymorph.h"
diff --git a/indra/llappearance/llpolyskeletaldistortion.h b/indra/llappearance/llpolyskeletaldistortion.h
index 774bc7dfa2..24c9e9ae48 100644
--- a/indra/llappearance/llpolyskeletaldistortion.h
+++ b/indra/llappearance/llpolyskeletaldistortion.h
@@ -39,7 +39,6 @@
//#include "llpolymorph.h"
#include "lljoint.h"
#include "llviewervisualparam.h"
-//#include "lldarray.h"
//class LLSkinJoint;
class LLAvatarAppearance;
diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp
index f65829febe..6c584c239c 100644
--- a/indra/llappearance/lltexlayer.cpp
+++ b/indra/llappearance/lltexlayer.cpp
@@ -30,7 +30,6 @@
#include "llavatarappearance.h"
#include "llcrc.h"
-#include "imageids.h"
#include "llimagej2c.h"
#include "llimagetga.h"
#include "lldir.h"
diff --git a/indra/llappearance/llwearable.h b/indra/llappearance/llwearable.h
index 6e4d2b2242..132c153bcd 100644
--- a/indra/llappearance/llwearable.h
+++ b/indra/llappearance/llwearable.h
@@ -28,7 +28,6 @@
#define LL_LLWEARABLE_H
#include "llavatarappearancedefines.h"
-#include "llextendedstatus.h"
#include "llpermissions.h"
#include "llsaleinfo.h"
#include "llwearabletype.h"
diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp
index bcff03ceaa..e7b9fa6b18 100755
--- a/indra/llaudio/llaudiodecodemgr.cpp
+++ b/indra/llaudio/llaudiodecodemgr.cpp
@@ -41,6 +41,7 @@
#include "vorbis/codec.h"
#include "vorbis/vorbisfile.h"
#include <iterator>
+#include <deque>
extern LLAudioEngine *gAudiop;
@@ -114,7 +115,7 @@ size_t vfs_read(void *ptr, size_t size, size_t nmemb, void *datasource)
}
}
-int vfs_seek(void *datasource, ogg_int64_t offset, int whence)
+S32 vfs_seek(void *datasource, ogg_int64_t offset, S32 whence)
{
LLVFile *file = (LLVFile *)datasource;
@@ -150,7 +151,7 @@ int vfs_seek(void *datasource, ogg_int64_t offset, int whence)
}
}
-int vfs_close (void *datasource)
+S32 vfs_close (void *datasource)
{
LLVFile *file = (LLVFile *)datasource;
delete file;
@@ -209,7 +210,7 @@ BOOL LLVorbisDecodeState::initDecode()
return FALSE;
}
- int r = ov_open_callbacks(mInFilep, &mVF, NULL, 0, vfs_callbacks);
+ S32 r = ov_open_callbacks(mInFilep, &mVF, NULL, 0, vfs_callbacks);
if(r < 0)
{
llwarns << r << " Input to vorbis decode does not appear to be an Ogg bitstream: " << mUUID << llendl;
@@ -542,7 +543,7 @@ public:
void processQueue(const F32 num_secs = 0.005);
protected:
- LLLinkedQueue<LLUUID> mDecodeQueue;
+ std::deque<LLUUID> mDecodeQueue;
LLPointer<LLVorbisDecodeState> mCurrentDecodep;
};
@@ -617,7 +618,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
if (!done)
{
- if (!mDecodeQueue.getLength())
+ if (mDecodeQueue.empty())
{
// Nothing else on the queue.
done = TRUE;
@@ -625,7 +626,8 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
else
{
LLUUID uuid;
- mDecodeQueue.pop(uuid);
+ uuid = mDecodeQueue.front();
+ mDecodeQueue.pop_front();
if (gAudiop->hasDecodedFile(uuid))
{
// This file has already been decoded, don't decode it again.
@@ -683,7 +685,7 @@ BOOL LLAudioDecodeMgr::addDecodeRequest(const LLUUID &uuid)
{
// Just put it on the decode queue.
//llinfos << "addDecodeRequest for " << uuid << " has local asset file already" << llendl;
- mImpl->mDecodeQueue.push(uuid);
+ mImpl->mDecodeQueue.push_back(uuid);
return TRUE;
}
diff --git a/indra/llaudio/llaudiodecodemgr.h b/indra/llaudio/llaudiodecodemgr.h
index e42fe8a40d..7a9b807d04 100755
--- a/indra/llaudio/llaudiodecodemgr.h
+++ b/indra/llaudio/llaudiodecodemgr.h
@@ -28,7 +28,6 @@
#include "stdtypes.h"
-#include "lllinkedqueue.h"
#include "lluuid.h"
#include "llassettype.h"
diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp
index 06e752cf34..9c72515a0f 100755
--- a/indra/llaudio/llaudioengine.cpp
+++ b/indra/llaudio/llaudioengine.cpp
@@ -187,7 +187,7 @@ void LLAudioEngine::stopInternetStream()
}
// virtual
-void LLAudioEngine::pauseInternetStream(int pause)
+void LLAudioEngine::pauseInternetStream(S32 pause)
{
if (mStreamingAudioImpl)
mStreamingAudioImpl->pause(pause);
diff --git a/indra/llaudio/llaudioengine.h b/indra/llaudio/llaudioengine.h
index da1629a1db..f1e1b4e308 100755
--- a/indra/llaudio/llaudioengine.h
+++ b/indra/llaudio/llaudioengine.h
@@ -88,7 +88,7 @@ public:
enum LLAudioPlayState
{
- // isInternetStreamPlaying() returns an *int*, with
+ // isInternetStreamPlaying() returns an *S32*, with
// 0 = stopped, 1 = playing, 2 = paused.
AUDIO_STOPPED = 0,
AUDIO_PLAYING = 1,
@@ -160,7 +160,7 @@ public:
// Internet stream methods - these will call down into the *mStreamingAudioImpl if it exists
void startInternetStream(const std::string& url);
void stopInternetStream();
- void pauseInternetStream(int pause);
+ void pauseInternetStream(S32 pause);
void updateInternetStream(); // expected to be called often
LLAudioPlayState isInternetStreamPlaying();
// use a value from 0.0 to 1.0, inclusive
diff --git a/indra/llaudio/llstreamingaudio_fmodex.h b/indra/llaudio/llstreamingaudio_fmodex.h
index 1dee18ae7d..2787840ba1 100644
--- a/indra/llaudio/llstreamingaudio_fmodex.h
+++ b/indra/llaudio/llstreamingaudio_fmodex.h
@@ -49,9 +49,9 @@ class LLStreamingAudio_FMODEX : public LLStreamingAudioInterface
/*virtual*/ void start(const std::string& url);
/*virtual*/ void stop();
- /*virtual*/ void pause(int pause);
+ /*virtual*/ void pause(S32 pause);
/*virtual*/ void update();
- /*virtual*/ int isPlaying();
+ /*virtual*/ S32 isPlaying();
/*virtual*/ void setGain(F32 vol);
/*virtual*/ F32 getGain();
/*virtual*/ std::string getURL();
diff --git a/indra/llcharacter/llanimationstates.h b/indra/llcharacter/llanimationstates.h
index 84185c3f92..79cbcabdc1 100755
--- a/indra/llcharacter/llanimationstates.h
+++ b/indra/llcharacter/llanimationstates.h
@@ -29,7 +29,7 @@
#include <map>
-#include "string_table.h"
+#include "llstringtable.h"
#include "lluuid.h"
//-----------------------------------------------------------------------------
diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h
index 5740dbce77..43fb68bb5c 100755
--- a/indra/llcharacter/llcharacter.h
+++ b/indra/llcharacter/llcharacter.h
@@ -35,7 +35,7 @@
#include "lljoint.h"
#include "llmotioncontroller.h"
#include "llvisualparam.h"
-#include "string_table.h"
+#include "llstringtable.h"
#include "llpointer.h"
#include "llthread.h"
diff --git a/indra/llcharacter/llgesture.cpp b/indra/llcharacter/llgesture.cpp
index c23694639e..aeb65eb10f 100755
--- a/indra/llcharacter/llgesture.cpp
+++ b/indra/llcharacter/llgesture.cpp
@@ -173,27 +173,7 @@ S32 LLGesture::getMaxSerialSize()
LLGestureList::LLGestureList()
: mList(0)
-{
- // add some gestures for debugging
-// LLGesture *gesture = NULL;
-/*
- gesture = new LLGesture(KEY_F2, MASK_NONE, ":-)",
- SND_CHIRP, "dance2", ":-)" );
- mList.put(gesture);
-
- gesture = new LLGesture(KEY_F3, MASK_NONE, "/dance",
- SND_OBJECT_CREATE, "dance3", "(dances)" );
- mList.put(gesture);
-
- gesture = new LLGesture(KEY_F4, MASK_NONE, "/boogie",
- LLUUID::null, "dance4", LLStringUtil::null );
- mList.put(gesture);
-
- gesture = new LLGesture(KEY_F5, MASK_SHIFT, "/tongue",
- LLUUID::null, "Express_Tongue_Out", LLStringUtil::null );
- mList.put(gesture);
- */
-}
+{}
LLGestureList::~LLGestureList()
{
@@ -203,12 +183,7 @@ LLGestureList::~LLGestureList()
void LLGestureList::deleteAll()
{
- S32 count = mList.count();
- for (S32 i = 0; i < count; i++)
- {
- delete mList.get(i);
- }
- mList.reset();
+ delete_and_clear(mList);
}
// Iterates through space delimited tokens in string, triggering any gestures found.
@@ -235,9 +210,9 @@ BOOL LLGestureList::triggerAndReviseString(const std::string &string, std::strin
std::string cur_token_lower = *token_iter;
LLStringUtil::toLower(cur_token_lower);
- for (S32 i = 0; i < mList.count(); i++)
+ for (U32 i = 0; i < mList.size(); i++)
{
- gesture = mList.get(i);
+ gesture = mList.at(i);
if (gesture->trigger(cur_token_lower))
{
if( !gesture->getOutputString().empty() )
@@ -286,9 +261,9 @@ BOOL LLGestureList::triggerAndReviseString(const std::string &string, std::strin
BOOL LLGestureList::trigger(KEY key, MASK mask)
{
- for (S32 i = 0; i < mList.count(); i++)
+ for (U32 i = 0; i < mList.size(); i++)
{
- LLGesture* gesture = mList.get(i);
+ LLGesture* gesture = mList.at(i);
if( gesture )
{
if (gesture->trigger(key, mask))
@@ -308,7 +283,7 @@ BOOL LLGestureList::trigger(KEY key, MASK mask)
U8 *LLGestureList::serialize(U8 *buffer) const
{
// a single S32 serves as the header that tells us how many to read
- S32 count = mList.count();
+ U32 count = mList.size();
htonmemcpy(buffer, &count, MVT_S32, 4);
buffer += sizeof(count);
@@ -345,7 +320,7 @@ U8 *LLGestureList::deserialize(U8 *buffer, S32 max_size)
tmp += sizeof(count);
- mList.reserve_block(count);
+ mList.resize(count);
for (S32 i = 0; i < count; i++)
{
diff --git a/indra/llcharacter/llgesture.h b/indra/llcharacter/llgesture.h
index 66b618c473..cfb489f727 100755
--- a/indra/llcharacter/llgesture.h
+++ b/indra/llcharacter/llgesture.h
@@ -31,7 +31,6 @@
#include "llanimationstates.h"
#include "lluuid.h"
#include "llstring.h"
-#include "lldarray.h"
class LLGesture
{
@@ -67,12 +66,12 @@ public:
static S32 getMaxSerialSize();
protected:
- KEY mKey; // usually a function key
- MASK mMask; // usually MASK_NONE, or MASK_SHIFT
+ KEY mKey; // usually a function key
+ MASK mMask; // usually MASK_NONE, or MASK_SHIFT
std::string mTrigger; // string, no whitespace allowed
std::string mTriggerLower; // lowercase version of mTrigger
- LLUUID mSoundItemID; // ItemID of sound to play, LLUUID::null if none
- std::string mAnimation; // canonical name of animation or face animation
+ LLUUID mSoundItemID; // ItemID of sound to play, LLUUID::null if none
+ std::string mAnimation; // canonical name of animation or face animation
std::string mOutputString; // string to say
static const S32 MAX_SERIAL_SIZE;
@@ -91,9 +90,9 @@ public:
BOOL triggerAndReviseString(const std::string &string, std::string* revised_string);
// Used for construction from UI
- S32 count() const { return mList.count(); }
- virtual LLGesture* get(S32 i) const { return mList.get(i); }
- virtual void put(LLGesture* gesture) { mList.put( gesture ); }
+ S32 count() const { return mList.size(); }
+ virtual LLGesture* get(S32 i) const { return mList.at(i); }
+ virtual void put(LLGesture* gesture) { mList.push_back( gesture ); }
void deleteAll();
// non-endian-neutral serialization
@@ -106,7 +105,7 @@ protected:
virtual LLGesture *create_gesture(U8 **buffer, S32 max_size);
protected:
- LLDynamicArray<LLGesture*> mList;
+ std::vector<LLGesture*> mList;
static const S32 SERIAL_HEADER_SIZE;
};
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp
index 09a7c11a22..83bd62e8fa 100755
--- a/indra/llcharacter/lljoint.cpp
+++ b/indra/llcharacter/lljoint.cpp
@@ -560,7 +560,7 @@ void LLJoint::clampRotation(LLQuaternion old_rot, LLQuaternion new_rot)
// LLVector3 old_axis = main_axis * old_rot;
// LLVector3 new_axis = main_axis * new_rot;
-// for (S32 i = 0; i < mConstraintSilhouette.count() - 1; i++)
+// for (S32 i = 0; i < mConstraintSilhouette.size() - 1; i++)
// {
// LLVector3 vert1 = mConstraintSilhouette[i];
// LLVector3 vert2 = mConstraintSilhouette[i + 1];
diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h
index 07374b7814..6efa13aeb5 100755
--- a/indra/llcharacter/lljoint.h
+++ b/indra/llcharacter/lljoint.h
@@ -33,13 +33,11 @@
#include <string>
#include <list>
-#include "linked_lists.h"
#include "v3math.h"
#include "v4math.h"
#include "m4math.h"
#include "llquaternion.h"
#include "xform.h"
-#include "lldarray.h"
const S32 LL_CHARACTER_MAX_JOINTS_PER_MESH = 15;
const U32 LL_CHARACTER_MAX_JOINTS = 32; // must be divisible by 4!
diff --git a/indra/llcharacter/lljointsolverrp3.cpp b/indra/llcharacter/lljointsolverrp3.cpp
index 1331900791..69a7e3dc6e 100755
--- a/indra/llcharacter/lljointsolverrp3.cpp
+++ b/indra/llcharacter/lljointsolverrp3.cpp
@@ -135,8 +135,6 @@ void LLJointSolverRP3::setTwist( F32 twist )
//-----------------------------------------------------------------------------
void LLJointSolverRP3::solve()
{
-// llinfos << llendl;
-// llinfos << "LLJointSolverRP3::solve()" << llendl;
//-------------------------------------------------------------------------
// setup joints in their base rotations
@@ -152,15 +150,15 @@ void LLJointSolverRP3::solve()
LLVector3 cPos = mJointC->getWorldPosition();
LLVector3 gPos = mJointGoal->getWorldPosition();
-// llinfos << "bPosLocal = " << mJointB->getPosition() << llendl;
-// llinfos << "cPosLocal = " << mJointC->getPosition() << llendl;
-// llinfos << "bRotLocal = " << mJointB->getRotation() << llendl;
-// llinfos << "cRotLocal = " << mJointC->getRotation() << llendl;
-
-// llinfos << "aPos : " << aPos << llendl;
-// llinfos << "bPos : " << bPos << llendl;
-// llinfos << "cPos : " << cPos << llendl;
-// llinfos << "gPos : " << gPos << llendl;
+ LL_DEBUGS("JointSolver") << "LLJointSolverRP3::solve()" << LL_NEWLINE
+ << "bPosLocal = " << mJointB->getPosition() << LL_NEWLINE
+ << "cPosLocal = " << mJointC->getPosition() << LL_NEWLINE
+ << "bRotLocal = " << mJointB->getRotation() << LL_NEWLINE
+ << "cRotLocal = " << mJointC->getRotation() << LL_NEWLINE
+ << "aPos : " << aPos << LL_NEWLINE
+ << "bPos : " << bPos << LL_NEWLINE
+ << "cPos : " << cPos << LL_NEWLINE
+ << "gPos : " << gPos << LL_ENDL;
//-------------------------------------------------------------------------
// get the poleVector in world space
@@ -184,11 +182,6 @@ void LLJointSolverRP3::solve()
LLVector3 acVec = cPos - aPos;
LLVector3 agVec = gPos - aPos;
-// llinfos << "abVec : " << abVec << llendl;
-// llinfos << "bcVec : " << bcVec << llendl;
-// llinfos << "acVec : " << acVec << llendl;
-// llinfos << "agVec : " << agVec << llendl;
-
//-------------------------------------------------------------------------
// compute needed lengths of those vectors
//-------------------------------------------------------------------------
@@ -196,16 +189,19 @@ void LLJointSolverRP3::solve()
F32 bcLen = bcVec.magVec();
F32 agLen = agVec.magVec();
-// llinfos << "abLen : " << abLen << llendl;
-// llinfos << "bcLen : " << bcLen << llendl;
-// llinfos << "agLen : " << agLen << llendl;
-
//-------------------------------------------------------------------------
// compute component vector of (A->B) orthogonal to (A->C)
//-------------------------------------------------------------------------
LLVector3 abacCompOrthoVec = abVec - acVec * ((abVec * acVec)/(acVec * acVec));
-// llinfos << "abacCompOrthoVec : " << abacCompOrthoVec << llendl;
+ LL_DEBUGS("JointSolver") << "abVec : " << abVec << LL_NEWLINE
+ << "bcVec : " << bcVec << LL_NEWLINE
+ << "acVec : " << acVec << LL_NEWLINE
+ << "agVec : " << agVec << LL_NEWLINE
+ << "abLen : " << abLen << LL_NEWLINE
+ << "bcLen : " << bcLen << LL_NEWLINE
+ << "agLen : " << agLen << LL_NEWLINE
+ << "abacCompOrthoVec : " << abacCompOrthoVec << LL_ENDL;
//-------------------------------------------------------------------------
// compute the normal of the original ABC plane (and store for later)
@@ -273,13 +269,17 @@ void LLJointSolverRP3::solve()
LLQuaternion bRot(theta - abbcAng, abbcOrthoVec);
-// llinfos << "abbcAng : " << abbcAng << llendl;
-// llinfos << "abbcOrthoVec : " << abbcOrthoVec << llendl;
-// llinfos << "agLenSq : " << agLenSq << llendl;
-// llinfos << "cosTheta : " << cosTheta << llendl;
-// llinfos << "theta : " << theta << llendl;
-// llinfos << "bRot : " << bRot << llendl;
-// llinfos << "theta abbcAng theta-abbcAng: " << theta*180.0/F_PI << " " << abbcAng*180.0f/F_PI << " " << (theta - abbcAng)*180.0f/F_PI << llendl;
+ LL_DEBUGS("JointSolver") << "abbcAng : " << abbcAng << LL_NEWLINE
+ << "abbcOrthoVec : " << abbcOrthoVec << LL_NEWLINE
+ << "agLenSq : " << agLenSq << LL_NEWLINE
+ << "cosTheta : " << cosTheta << LL_NEWLINE
+ << "theta : " << theta << LL_NEWLINE
+ << "bRot : " << bRot << LL_NEWLINE
+ << "theta abbcAng theta-abbcAng: "
+ << theta*180.0/F_PI << " "
+ << abbcAng*180.0f/F_PI << " "
+ << (theta - abbcAng)*180.0f/F_PI
+ << LL_ENDL;
//-------------------------------------------------------------------------
// compute rotation that rotates new A->C to A->G
@@ -293,9 +293,9 @@ void LLJointSolverRP3::solve()
LLQuaternion cgRot;
cgRot.shortestArc( acVec, agVec );
-// llinfos << "bcVec : " << bcVec << llendl;
-// llinfos << "acVec : " << acVec << llendl;
-// llinfos << "cgRot : " << cgRot << llendl;
+ LL_DEBUGS("JointSolver") << "bcVec : " << bcVec << LL_NEWLINE
+ << "acVec : " << acVec << LL_NEWLINE
+ << "cgRot : " << cgRot << LL_ENDL;
// update A->B and B->C with rotation from C to G
abVec = abVec * cgRot;
@@ -353,18 +353,16 @@ void LLJointSolverRP3::solve()
pRot.shortestArc( abcNorm, apgNorm );
}
-// llinfos << "abcNorm = " << abcNorm << llendl;
-// llinfos << "apgNorm = " << apgNorm << llendl;
-// llinfos << "pRot = " << pRot << llendl;
-
//-------------------------------------------------------------------------
// compute twist rotation
//-------------------------------------------------------------------------
LLQuaternion twistRot( mTwist, agVec );
-// llinfos << "twist : " << mTwist*180.0/F_PI << llendl;
-// llinfos << "agNormVec: " << agNormVec << llendl;
-// llinfos << "twistRot : " << twistRot << llendl;
+ LL_DEBUGS("JointSolver") << "abcNorm = " << abcNorm << LL_NEWLINE
+ << "apgNorm = " << apgNorm << LL_NEWLINE
+ << "pRot = " << pRot << LL_NEWLINE
+ << "twist : " << mTwist*180.0/F_PI << LL_NEWLINE
+ << "twistRot : " << twistRot << LL_ENDL;
//-------------------------------------------------------------------------
// compute rotation of A
diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp
index 831a0a6719..1352c9d592 100755
--- a/indra/llcharacter/llkeyframemotion.cpp
+++ b/indra/llcharacter/llkeyframemotion.cpp
@@ -1263,7 +1263,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
if (mJointMotionList->mBasePriority >= LLJoint::ADDITIVE_PRIORITY)
{
- mJointMotionList->mBasePriority = (LLJoint::JointPriority)((int)LLJoint::ADDITIVE_PRIORITY-1);
+ mJointMotionList->mBasePriority = (LLJoint::JointPriority)((S32)LLJoint::ADDITIVE_PRIORITY-1);
mJointMotionList->mMaxPriority = mJointMotionList->mBasePriority;
}
else if (mJointMotionList->mBasePriority < LLJoint::USE_MOTION_PRIORITY)
@@ -2288,8 +2288,7 @@ LLKeyframeMotion::JointConstraint::JointConstraint(JointConstraintSharedData* sh
mTargetVolume = NULL;
mFixupDistanceRMS = 0.f;
- int i;
- for (i=0; i<MAX_CHAIN_LENGTH; ++i)
+ for (S32 i=0; i<MAX_CHAIN_LENGTH; ++i)
{
mJointLengths[i] = 0.f;
mJointLengthFractions[i] = 0.f;
diff --git a/indra/llcharacter/llkeyframemotionparam.h b/indra/llcharacter/llkeyframemotionparam.h
index 24e8141753..0fac3724d1 100755
--- a/indra/llcharacter/llkeyframemotionparam.h
+++ b/indra/llcharacter/llkeyframemotionparam.h
@@ -37,7 +37,6 @@
#include "lljointstate.h"
#include "v3math.h"
#include "llquaternion.h"
-#include "linked_lists.h"
#include "llkeyframemotion.h"
//-----------------------------------------------------------------------------
diff --git a/indra/llcharacter/llmotion.cpp b/indra/llcharacter/llmotion.cpp
index af2e10220a..094cf87167 100755
--- a/indra/llcharacter/llmotion.cpp
+++ b/indra/llcharacter/llmotion.cpp
@@ -54,7 +54,7 @@ LLMotion::LLMotion( const LLUUID &id ) :
mDeactivateCallback(NULL),
mDeactivateCallbackUserData(NULL)
{
- for (int i=0; i<3; ++i)
+ for (S32 i=0; i<3; ++i)
memset(&mJointSignature[i][0], 0, sizeof(U8) * LL_CHARACTER_MAX_JOINTS);
}
diff --git a/indra/llcharacter/llpose.h b/indra/llcharacter/llpose.h
index b486852605..c004a0f3b7 100755
--- a/indra/llcharacter/llpose.h
+++ b/indra/llcharacter/llpose.h
@@ -33,7 +33,6 @@
#include "lljointstate.h"
#include "lljoint.h"
-#include "llmap.h"
#include "llpointer.h"
#include <map>
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 0c76fd46c0..4336550d07 100755
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -26,22 +26,20 @@ include_directories(
# ${LLCOMMON_LIBRARIES})
set(llcommon_SOURCE_FILES
- imageids.cpp
indra_constants.cpp
llallocator.cpp
llallocator_heap_profile.cpp
llapp.cpp
llapr.cpp
llassettype.cpp
- llavatarname.cpp
llbase32.cpp
llbase64.cpp
+ llbitpack.cpp
llcommon.cpp
llcommonutils.cpp
llcoros.cpp
llcrc.cpp
llcriticaldamp.cpp
- llcursortypes.cpp
lldate.cpp
lldependencies.cpp
lldictionary.cpp
@@ -58,7 +56,6 @@ set(llcommon_SOURCE_FILES
llfile.cpp
llfindlocale.cpp
llfixedbuffer.cpp
- llfoldertype.cpp
llformat.cpp
llframetimer.cpp
llheartbeat.cpp
@@ -68,7 +65,6 @@ set(llcommon_SOURCE_FILES
llleaplistener.cpp
llliveappconfig.cpp
lllivefile.cpp
- lllog.cpp
llmd5.cpp
llmemory.cpp
llmemorystream.cpp
@@ -76,7 +72,6 @@ set(llcommon_SOURCE_FILES
llmetricperformancetester.cpp
llmortician.cpp
llmutex.cpp
- lloptioninterface.cpp
llptrto.cpp
llpredicate.cpp
llprocess.cpp
@@ -90,7 +85,6 @@ set(llcommon_SOURCE_FILES
llsdserialize.cpp
llsdserialize_xml.cpp
llsdutil.cpp
- llsecondlifeurls.cpp
llsingleton.cpp
llstacktrace.cpp
llstreamqueue.cpp
@@ -116,45 +110,33 @@ set(llcommon_SOURCE_FILES
set(llcommon_HEADER_FILES
CMakeLists.txt
- bitpack.h
ctype_workaround.h
fix_macros.h
- imageids.h
indra_constants.h
linden_common.h
- linked_lists.h
- llaccountingcost.h
llallocator.h
llallocator_heap_profile.h
- llagentconstants.h
- llavatarname.h
llapp.h
llapr.h
llassettype.h
- llavatarconstants.h
llbase32.h
llbase64.h
+ llbitpack.h
llboost.h
- llchat.h
- llclickaction.h
llcommon.h
llcommonutils.h
llcoros.h
llcrc.h
llcriticaldamp.h
- llcursortypes.h
- lldarray.h
lldate.h
lldefs.h
lldependencies.h
- lldeleteutils.h
lldepthstack.h
lldictionary.h
lldoubledispatch.h
llendianswizzle.h
llerror.h
llerrorcontrol.h
- llerrorlegacy.h
llerrorthread.h
llevent.h
lleventapi.h
@@ -163,30 +145,25 @@ set(llcommon_HEADER_FILES
lleventfilter.h
llevents.h
lleventemitter.h
- llextendedstatus.h
llfasttimer.h
llfile.h
llfindlocale.h
llfixedbuffer.h
- llfoldertype.h
llformat.h
llframetimer.h
llhandle.h
llhash.h
llheartbeat.h
llhttpstatuscodes.h
+ llindexedvector.h
llinitparam.h
llinstancetracker.h
llkeythrottle.h
llleap.h
llleaplistener.h
lllistenerwrapper.h
- lllinkedqueue.h
llliveappconfig.h
lllivefile.h
- lllog.h
- lllslconstants.h
- llmap.h
llmd5.h
llmemory.h
llmemorystream.h
@@ -194,8 +171,6 @@ set(llcommon_HEADER_FILES
llmetricperformancetester.h
llmortician.h
llmutex.h
- llnametable.h
- lloptioninterface.h
llpointer.h
llpredicate.h
llpreprocessor.h
@@ -215,11 +190,9 @@ set(llcommon_HEADER_FILES
llsdserialize.h
llsdserialize_xml.h
llsdutil.h
- llsecondlifeurls.h
llsimplehash.h
llsingleton.h
llstacktrace.h
- llstatenums.h
llstl.h
llstreamqueue.h
llstreamtools.h
@@ -239,18 +212,12 @@ set(llcommon_HEADER_FILES
llunit.h
lluri.h
lluuid.h
- llversionserver.h
llwin32headers.h
llwin32headerslean.h
llworkerthread.h
- ll_template_cast.h
- roles_constants.h
- stdenums.h
stdtypes.h
- string_table.h
stringize.h
timer.h
- timing.h
u64.h
)
diff --git a/indra/llcommon/imageids.cpp b/indra/llcommon/imageids.cpp
deleted file mode 100755
index 7d647e5c36..0000000000
--- a/indra/llcommon/imageids.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * @file imageids.cpp
- *
- * $LicenseInfo:firstyear=2001&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$
- */
-
-#include "linden_common.h"
-
-#include "imageids.h"
-
-#include "lluuid.h"
-
-//
-// USE OF THIS FILE IS DEPRECATED
-//
-// Please use viewerart.ini and the standard
-// art import path. // indicates if file is only
- // on dataserver, or also
- // pre-cached on viewer
-
-// Grass Images
-const LLUUID IMG_SMOKE ("b4ba225c-373f-446d-9f7e-6cb7b5cf9b3d"); // VIEWER
-
-const LLUUID IMG_DEFAULT ("d2114404-dd59-4a4d-8e6c-49359e91bbf0"); // VIEWER
-
-const LLUUID IMG_SUN ("cce0f112-878f-4586-a2e2-a8f104bba271"); // dataserver
-const LLUUID IMG_MOON ("d07f6eed-b96a-47cd-b51d-400ad4a1c428"); // dataserver
-const LLUUID IMG_CLOUD_POOF ("fc4b9f0b-d008-45c6-96a4-01dd947ac621"); // dataserver
-const LLUUID IMG_SHOT ("35f217a3-f618-49cf-bbca-c86d486551a9"); // dataserver
-const LLUUID IMG_SPARK ("d2e75ac1-d0fb-4532-820e-a20034ac814d"); // dataserver
-const LLUUID IMG_FIRE ("aca40aa8-44cf-44ca-a0fa-93e1a2986f82"); // dataserver
-const LLUUID IMG_FACE_SELECT ("a85ac674-cb75-4af6-9499-df7c5aaf7a28"); // face selector
-const LLUUID IMG_DEFAULT_AVATAR ("c228d1cf-4b5d-4ba8-84f4-899a0796aa97"); // dataserver
-const LLUUID IMG_INVISIBLE ("3a367d1c-bef1-6d43-7595-e88c1e3aadb3"); // dataserver
-
-const LLUUID IMG_EXPLOSION ("68edcf47-ccd7-45b8-9f90-1649d7f12806"); // On dataserver
-const LLUUID IMG_EXPLOSION_2 ("21ce046c-83fe-430a-b629-c7660ac78d7c"); // On dataserver
-const LLUUID IMG_EXPLOSION_3 ("fedea30a-1be8-47a6-bc06-337a04a39c4b"); // On dataserver
-const LLUUID IMG_EXPLOSION_4 ("abf0d56b-82e5-47a2-a8ad-74741bb2c29e"); // On dataserver
-const LLUUID IMG_SMOKE_POOF ("1e63e323-5fe0-452e-92f8-b98bd0f764e3"); // On dataserver
-
-const LLUUID IMG_BIG_EXPLOSION_1 ("5e47a0dc-97bf-44e0-8b40-de06718cee9d"); // On dataserver
-const LLUUID IMG_BIG_EXPLOSION_2 ("9c8eca51-53d5-42a7-bb58-cef070395db8"); // On dataserver
-
-const LLUUID IMG_BLOOM1 ("3c59f7fe-9dc8-47f9-8aaf-a9dd1fbc3bef"); // VIEWER
-const LLUUID TERRAIN_DIRT_DETAIL ("0bc58228-74a0-7e83-89bc-5c23464bcec5"); // VIEWER
-const LLUUID TERRAIN_GRASS_DETAIL ("63338ede-0037-c4fd-855b-015d77112fc8"); // VIEWER
-const LLUUID TERRAIN_MOUNTAIN_DETAIL ("303cd381-8560-7579-23f1-f0a880799740"); // VIEWER
-const LLUUID TERRAIN_ROCK_DETAIL ("53a2f406-4895-1d13-d541-d2e3b86bc19c"); // VIEWER
-
-const LLUUID DEFAULT_WATER_NORMAL ("822ded49-9a6c-f61c-cb89-6df54f42cdf4"); // VIEWER
-
-const LLUUID IMG_CHECKERBOARD_RGBA ("2585a0f3-4163-6dd1-0f34-ad48cb909e25"); // dataserver
-
diff --git a/indra/llcommon/imageids.h b/indra/llcommon/imageids.h
deleted file mode 100755
index 18c8ecb074..0000000000
--- a/indra/llcommon/imageids.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * @file imageids.h
- * @brief Temporary holder for image IDs
- *
- * $LicenseInfo:firstyear=2001&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_IMAGEIDS_H
-#define LL_IMAGEIDS_H
-
-//
-// USE OF THIS FILE IS DEPRECATED
-//
-// Please use viewerart.ini and the standard
-// art import path.
-
-class LLUUID;
-
-LL_COMMON_API extern const LLUUID IMG_SMOKE;
-
-LL_COMMON_API extern const LLUUID IMG_DEFAULT;
-
-LL_COMMON_API extern const LLUUID IMG_SUN;
-LL_COMMON_API extern const LLUUID IMG_MOON;
-LL_COMMON_API extern const LLUUID IMG_CLOUD_POOF;
-LL_COMMON_API extern const LLUUID IMG_SHOT;
-LL_COMMON_API extern const LLUUID IMG_SPARK;
-LL_COMMON_API extern const LLUUID IMG_FIRE;
-LL_COMMON_API extern const LLUUID IMG_FACE_SELECT;
-LL_COMMON_API extern const LLUUID IMG_DEFAULT_AVATAR;
-LL_COMMON_API extern const LLUUID IMG_INVISIBLE;
-
-LL_COMMON_API extern const LLUUID IMG_EXPLOSION;
-LL_COMMON_API extern const LLUUID IMG_EXPLOSION_2;
-LL_COMMON_API extern const LLUUID IMG_EXPLOSION_3;
-LL_COMMON_API extern const LLUUID IMG_EXPLOSION_4;
-LL_COMMON_API extern const LLUUID IMG_SMOKE_POOF;
-
-LL_COMMON_API extern const LLUUID IMG_BIG_EXPLOSION_1;
-LL_COMMON_API extern const LLUUID IMG_BIG_EXPLOSION_2;
-
-LL_COMMON_API extern const LLUUID IMG_BLOOM1;
-LL_COMMON_API extern const LLUUID TERRAIN_DIRT_DETAIL;
-LL_COMMON_API extern const LLUUID TERRAIN_GRASS_DETAIL;
-LL_COMMON_API extern const LLUUID TERRAIN_MOUNTAIN_DETAIL;
-LL_COMMON_API extern const LLUUID TERRAIN_ROCK_DETAIL;
-
-LL_COMMON_API extern const LLUUID DEFAULT_WATER_NORMAL;
-
-LL_COMMON_API extern const LLUUID IMG_CHECKERBOARD_RGBA;
-#endif
diff --git a/indra/llcommon/indra_constants.cpp b/indra/llcommon/indra_constants.cpp
index d32ae6c041..b61dca3243 100755
--- a/indra/llcommon/indra_constants.cpp
+++ b/indra/llcommon/indra_constants.cpp
@@ -35,6 +35,35 @@ const LLUUID LL_UUID_ALL_AGENTS("44e87126-e794-4ded-05b3-7c42da3d5cdb");
// Governor Linden's agent id.
const LLUUID ALEXANDRIA_LINDEN_ID("ba2a564a-f0f1-4b82-9c61-b7520bfcd09f");
const LLUUID GOVERNOR_LINDEN_ID("3d6181b0-6a4b-97ef-18d8-722652995cf1");
-const LLUUID REALESTATE_LINDEN_ID("3d6181b0-6a4b-97ef-18d8-722652995cf1");
// Maintenance's group id.
const LLUUID MAINTENANCE_GROUP_ID("dc7b21cd-3c89-fcaa-31c8-25f9ffd224cd");
+// Grass Images
+const LLUUID IMG_SMOKE ("b4ba225c-373f-446d-9f7e-6cb7b5cf9b3d"); // VIEWER
+
+const LLUUID IMG_DEFAULT ("d2114404-dd59-4a4d-8e6c-49359e91bbf0"); // VIEWER
+
+const LLUUID IMG_SUN ("cce0f112-878f-4586-a2e2-a8f104bba271"); // dataserver
+const LLUUID IMG_MOON ("d07f6eed-b96a-47cd-b51d-400ad4a1c428"); // dataserver
+const LLUUID IMG_SHOT ("35f217a3-f618-49cf-bbca-c86d486551a9"); // dataserver
+const LLUUID IMG_SPARK ("d2e75ac1-d0fb-4532-820e-a20034ac814d"); // dataserver
+const LLUUID IMG_FIRE ("aca40aa8-44cf-44ca-a0fa-93e1a2986f82"); // dataserver
+const LLUUID IMG_FACE_SELECT ("a85ac674-cb75-4af6-9499-df7c5aaf7a28"); // face selector
+const LLUUID IMG_DEFAULT_AVATAR ("c228d1cf-4b5d-4ba8-84f4-899a0796aa97"); // dataserver
+const LLUUID IMG_INVISIBLE ("3a367d1c-bef1-6d43-7595-e88c1e3aadb3"); // dataserver
+
+const LLUUID IMG_EXPLOSION ("68edcf47-ccd7-45b8-9f90-1649d7f12806"); // On dataserver
+const LLUUID IMG_EXPLOSION_2 ("21ce046c-83fe-430a-b629-c7660ac78d7c"); // On dataserver
+const LLUUID IMG_EXPLOSION_3 ("fedea30a-1be8-47a6-bc06-337a04a39c4b"); // On dataserver
+const LLUUID IMG_EXPLOSION_4 ("abf0d56b-82e5-47a2-a8ad-74741bb2c29e"); // On dataserver
+const LLUUID IMG_SMOKE_POOF ("1e63e323-5fe0-452e-92f8-b98bd0f764e3"); // On dataserver
+
+const LLUUID IMG_BIG_EXPLOSION_1 ("5e47a0dc-97bf-44e0-8b40-de06718cee9d"); // On dataserver
+const LLUUID IMG_BIG_EXPLOSION_2 ("9c8eca51-53d5-42a7-bb58-cef070395db8"); // On dataserver
+
+const LLUUID IMG_BLOOM1 ("3c59f7fe-9dc8-47f9-8aaf-a9dd1fbc3bef"); // VIEWER
+const LLUUID TERRAIN_DIRT_DETAIL ("0bc58228-74a0-7e83-89bc-5c23464bcec5"); // VIEWER
+const LLUUID TERRAIN_GRASS_DETAIL ("63338ede-0037-c4fd-855b-015d77112fc8"); // VIEWER
+const LLUUID TERRAIN_MOUNTAIN_DETAIL ("303cd381-8560-7579-23f1-f0a880799740"); // VIEWER
+const LLUUID TERRAIN_ROCK_DETAIL ("53a2f406-4895-1d13-d541-d2e3b86bc19c"); // VIEWER
+
+const LLUUID DEFAULT_WATER_NORMAL ("822ded49-9a6c-f61c-cb89-6df54f42cdf4"); // VIEWER \ No newline at end of file
diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h
index 0da83720bd..02f063f5e8 100755
--- a/indra/llcommon/indra_constants.h
+++ b/indra/llcommon/indra_constants.h
@@ -31,122 +31,28 @@
class LLUUID;
-// 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;
-// This must be a #define due to anal retentive restrictions on const expressions
-// CG 2008-06-05
-#define PHYSICS_TIMESTEP (1.f / 45.f)
-
-const F32 COLLISION_TOLERANCE = 0.1f;
-const F32 HALF_COLLISION_TOLERANCE = 0.05f;
-
-// Time constants
-const U32 HOURS_PER_LINDEN_DAY = 4;
-const U32 DAYS_PER_LINDEN_YEAR = 11;
-
-const U32 SEC_PER_LINDEN_DAY = HOURS_PER_LINDEN_DAY * 60 * 60;
-const U32 SEC_PER_LINDEN_YEAR = DAYS_PER_LINDEN_YEAR * SEC_PER_LINDEN_DAY;
-
static const F32 REGION_WIDTH_METERS = 256.f;
static const S32 REGION_WIDTH_UNITS = 256;
static const U32 REGION_WIDTH_U32 = 256;
const F32 REGION_HEIGHT_METERS = 4096.f;
-// 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
-};
-
-const U32 STAT_FILTER_MASK = 0x1FFFFFFF;
-
-// Region absolute limits
-static const S32 REGION_AGENT_COUNT_MIN = 1;
-static const S32 REGION_AGENT_COUNT_MAX = 200; // Must fit in U8 for the moment (RegionInfo msg)
-static const S32 REGION_PRIM_COUNT_MIN = 0;
-static const S32 REGION_PRIM_COUNT_MAX = 40000;
-static const F32 REGION_PRIM_BONUS_MIN = 1.0;
-static const F32 REGION_PRIM_BONUS_MAX = 10.0;
-
-// Default maximum number of tasks/prims per region.
-const U32 DEFAULT_MAX_REGION_WIDE_PRIM_COUNT = 15000;
-
-const F32 MIN_AGENT_DEPTH = 0.30f;
const F32 DEFAULT_AGENT_DEPTH = 0.45f;
-const F32 MAX_AGENT_DEPTH = 0.60f;
-
-const F32 MIN_AGENT_WIDTH = 0.40f;
const F32 DEFAULT_AGENT_WIDTH = 0.60f;
-const F32 MAX_AGENT_WIDTH = 0.80f;
-
-const F32 MIN_AGENT_HEIGHT = 1.1f;
const F32 DEFAULT_AGENT_HEIGHT = 1.9f;
-const F32 MAX_AGENT_HEIGHT = 2.45f;
-
-// For linked sets
-const S32 MAX_CHILDREN_PER_TASK = 255;
-const S32 MAX_CHILDREN_PER_PHYSICAL_TASK = 32;
-
-const S32 MAX_JOINTS_PER_OBJECT = 1; // limiting to 1 until Havok 2.x
-
-const char* const DEFAULT_DMZ_SPACE_SERVER = "192.168.0.140";
-const char* const DEFAULT_DMZ_USER_SERVER = "192.168.0.140";
-const char* const DEFAULT_DMZ_DATA_SERVER = "192.168.0.140";
-const char* const DEFAULT_DMZ_ASSET_SERVER = "http://asset.dmz.lindenlab.com:80";
-
-const char* const DEFAULT_AGNI_SPACE_SERVER = "63.211.139.100";
-const char* const DEFAULT_AGNI_USER_SERVER = "63.211.139.100";
-const char* const DEFAULT_AGNI_DATA_SERVER = "63.211.139.100";
-const char* const DEFAULT_AGNI_ASSET_SERVER = "http://asset.agni.lindenlab.com:80";
-
-// Information about what ports are for what services is in the wiki Name Space Ports page
-// https://wiki.lindenlab.com/wiki/Name_Space_Ports
-const char* const DEFAULT_LOCAL_ASSET_SERVER = "http://localhost:12041/asset/tmp";
-const char* const LOCAL_ASSET_URL_FORMAT = "http://%s:12041/asset";
-
-const U32 DEFAULT_LAUNCHER_PORT = 12029;
-//const U32 DEFAULT_BIGBOARD_PORT = 12030; // Deprecated
-//const U32 DEFAULT_QUERYSIM_PORT = 12031; // Deprecated
-const U32 DEFAULT_DATA_SERVER_PORT = 12032;
-const U32 DEFAULT_SPACE_SERVER_PORT = 12033;
-const U32 DEFAULT_VIEWER_PORT = 12034;
-const U32 DEFAULT_SIMULATOR_PORT = 12035;
-const U32 DEFAULT_USER_SERVER_PORT = 12036;
-const U32 DEFAULT_RPC_SERVER_PORT = 12037;
-const U32 DEFAULT_LOG_DATA_SERVER_PORT = 12039;
-const U32 DEFAULT_BACKBONE_PORT = 12040;
-const U32 DEFAULT_LOCAL_ASSET_PORT = 12041;
-//const U32 DEFAULT_BACKBONE_CAP_PORT = 12042; // Deprecated
-const U32 DEFAULT_CAP_PROXY_PORT = 12043;
-const U32 DEFAULT_INV_DATA_SERVER_PORT = 12044;
-const U32 DEFAULT_CGI_SERVICES_PORT = 12045;
-
-// Mapserver uses ports 12124 - 12139 to allow multiple mapservers to run
-// on a single host for map tile generation. JC
-const U32 DEFAULT_MAPSERVER_PORT = 12124;
-
-// For automatic port discovery when running multiple viewers on one host
-const U32 PORT_DISCOVERY_RANGE_MIN = 13000;
-const U32 PORT_DISCOVERY_RANGE_MAX = PORT_DISCOVERY_RANGE_MIN + 50;
-
-const char LAND_LAYER_CODE = 'L';
-const char WATER_LAYER_CODE = 'W';
-const char WIND_LAYER_CODE = '7';
-const char CLOUD_LAYER_CODE = '8';
+
+enum ETerrainBrushType
+{
+ // the valid brush numbers cannot be reordered, because they
+ // are used in the binary LSL format as arguments to llModifyLand()
+ E_LANDBRUSH_LEVEL = 0,
+ E_LANDBRUSH_RAISE = 1,
+ E_LANDBRUSH_LOWER = 2,
+ E_LANDBRUSH_SMOOTH = 3,
+ E_LANDBRUSH_NOISE = 4,
+ E_LANDBRUSH_REVERT = 5,
+ E_LANDBRUSH_INVALID = 6
+};
// keys
// Bit masks for various keyboard modifier keys.
@@ -265,89 +171,43 @@ LL_COMMON_API extern const LLUUID LL_UUID_ALL_AGENTS;
LL_COMMON_API extern const LLUUID ALEXANDRIA_LINDEN_ID;
LL_COMMON_API extern const LLUUID GOVERNOR_LINDEN_ID;
-LL_COMMON_API extern const LLUUID REALESTATE_LINDEN_ID;
// Maintenance's group id.
LL_COMMON_API extern const LLUUID MAINTENANCE_GROUP_ID;
-// Flags for kick message
-const U32 KICK_FLAGS_DEFAULT = 0x0;
-const U32 KICK_FLAGS_FREEZE = 1 << 0;
-const U32 KICK_FLAGS_UNFREEZE = 1 << 1;
-
-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
-
-// Agent Update Flags (U8)
-const U8 AU_FLAGS_NONE = 0x00;
-const U8 AU_FLAGS_HIDETITLE = 0x01;
-const U8 AU_FLAGS_CLIENT_AUTOPILOT = 0x02;
-
-// start location constants
-const U32 START_LOCATION_ID_LAST = 0;
-const U32 START_LOCATION_ID_HOME = 1;
-const U32 START_LOCATION_ID_DIRECT = 2; // for direct teleport
-const U32 START_LOCATION_ID_PARCEL = 3; // for teleports to a parcel
-const U32 START_LOCATION_ID_TELEHUB = 4; // for teleports to a spawnpoint
-const U32 START_LOCATION_ID_URL = 5;
-const U32 START_LOCATION_ID_COUNT = 6;
-
-// group constants
-const U32 GROUP_MIN_SIZE = 2;
-
-// gMaxAgentGroups is now sent by login.cgi, which
-// looks it up from globals.xml.
-//
-// For now we need an old default value however,
-// so the viewer can be deployed ahead of login.cgi.
-//
-const S32 DEFAULT_MAX_AGENT_GROUPS = 25;
+// image ids
+LL_COMMON_API extern const LLUUID IMG_SMOKE;
-// radius within which a chat message is fully audible
-const F32 CHAT_WHISPER_RADIUS = 10.f;
-const F32 CHAT_NORMAL_RADIUS = 20.f;
-const F32 CHAT_SHOUT_RADIUS = 100.f;
-const F32 CHAT_MAX_RADIUS = CHAT_SHOUT_RADIUS;
-const F32 CHAT_MAX_RADIUS_BY_TWO = CHAT_MAX_RADIUS / 2.f;
+LL_COMMON_API extern const LLUUID IMG_DEFAULT;
-// squared editions of the above for distance checks
-const F32 CHAT_WHISPER_RADIUS_SQUARED = CHAT_WHISPER_RADIUS * CHAT_WHISPER_RADIUS;
-const F32 CHAT_NORMAL_RADIUS_SQUARED = CHAT_NORMAL_RADIUS * CHAT_NORMAL_RADIUS;
-const F32 CHAT_SHOUT_RADIUS_SQUARED = CHAT_SHOUT_RADIUS * CHAT_SHOUT_RADIUS;
-const F32 CHAT_MAX_RADIUS_SQUARED = CHAT_SHOUT_RADIUS_SQUARED;
-const F32 CHAT_MAX_RADIUS_BY_TWO_SQUARED = CHAT_MAX_RADIUS_BY_TWO * CHAT_MAX_RADIUS_BY_TWO;
+LL_COMMON_API extern const LLUUID IMG_SUN;
+LL_COMMON_API extern const LLUUID IMG_MOON;
+LL_COMMON_API extern const LLUUID IMG_SHOT;
+LL_COMMON_API extern const LLUUID IMG_SPARK;
+LL_COMMON_API extern const LLUUID IMG_FIRE;
+LL_COMMON_API extern const LLUUID IMG_FACE_SELECT;
+LL_COMMON_API extern const LLUUID IMG_DEFAULT_AVATAR;
+LL_COMMON_API extern const LLUUID IMG_INVISIBLE;
+LL_COMMON_API extern const LLUUID IMG_EXPLOSION;
+LL_COMMON_API extern const LLUUID IMG_EXPLOSION_2;
+LL_COMMON_API extern const LLUUID IMG_EXPLOSION_3;
+LL_COMMON_API extern const LLUUID IMG_EXPLOSION_4;
+LL_COMMON_API extern const LLUUID IMG_SMOKE_POOF;
-// this times above gives barely audible radius
-const F32 CHAT_BARELY_AUDIBLE_FACTOR = 2.0f;
+LL_COMMON_API extern const LLUUID IMG_BIG_EXPLOSION_1;
+LL_COMMON_API extern const LLUUID IMG_BIG_EXPLOSION_2;
-// distance in front of speaking agent the sphere is centered
-const F32 CHAT_WHISPER_OFFSET = 5.f;
-const F32 CHAT_NORMAL_OFFSET = 10.f;
-const F32 CHAT_SHOUT_OFFSET = 50.f;
+LL_COMMON_API extern const LLUUID IMG_BLOOM1;
+LL_COMMON_API extern const LLUUID TERRAIN_DIRT_DETAIL;
+LL_COMMON_API extern const LLUUID TERRAIN_GRASS_DETAIL;
+LL_COMMON_API extern const LLUUID TERRAIN_MOUNTAIN_DETAIL;
+LL_COMMON_API extern const LLUUID TERRAIN_ROCK_DETAIL;
-// first clean starts at 3 AM
-const S32 SANDBOX_FIRST_CLEAN_HOUR = 3;
-// clean every <n> hours
-const S32 SANDBOX_CLEAN_FREQ = 12;
+LL_COMMON_API extern const LLUUID DEFAULT_WATER_NORMAL;
-const F32 WIND_SCALE_HACK = 2.0f; // hack to make wind speeds more realistic
-enum ETerrainBrushType
-{
- // the valid brush numbers cannot be reordered, because they
- // are used in the binary LSL format as arguments to llModifyLand()
- E_LANDBRUSH_LEVEL = 0,
- E_LANDBRUSH_RAISE = 1,
- E_LANDBRUSH_LOWER = 2,
- E_LANDBRUSH_SMOOTH = 3,
- E_LANDBRUSH_NOISE = 4,
- E_LANDBRUSH_REVERT = 5,
- E_LANDBRUSH_INVALID = 6
-};
+// radius within which a chat message is fully audible
+const F32 CHAT_NORMAL_RADIUS = 20.f;
// media commands
const U32 PARCEL_MEDIA_COMMAND_STOP = 0;
@@ -365,51 +225,101 @@ const U32 PARCEL_MEDIA_COMMAND_SIZE = 11;
const U32 PARCEL_MEDIA_COMMAND_DESC = 12;
const U32 PARCEL_MEDIA_COMMAND_LOOP_SET = 13;
-// 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;
-
-// Region map layer numbers
-const S32 MAP_SIM_OBJECTS = 0;
-const S32 MAP_SIM_TERRAIN = 1;
-const S32 MAP_SIM_LAND_FOR_SALE = 2; // Transparent alpha overlay of land for sale
-const S32 MAP_SIM_IMAGE_TYPES = 3; // Number of map layers
-const S32 MAP_SIM_INFO_MASK = 0x00FFFFFF; // Agent access may be stuffed into upper byte
-const S32 MAP_SIM_LAYER_MASK = 0x0000FFFF; // Layer info is in lower 16 bits
-const S32 MAP_SIM_RETURN_NULL_SIMS = 0x00010000;
-const S32 MAP_SIM_PRELUDE = 0x00020000;
-
-// Crash reporter behavior
-const S32 CRASH_BEHAVIOR_ASK = 0;
-const S32 CRASH_BEHAVIOR_ALWAYS_SEND = 1;
-const S32 CRASH_BEHAVIOR_NEVER_SEND = 2;
-
-// Export/Import return values
-const S32 EXPORT_SUCCESS = 0;
-const S32 EXPORT_ERROR_PERMISSIONS = -1;
-const S32 EXPORT_ERROR_UNKNOWN = -2;
-
-// 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;
-
-// The maximum size of an object extra parameters binary (packed) block
-#define MAX_OBJECT_PARAMS_SIZE 1024
-
const S32 CHAT_CHANNEL_DEBUG = S32_MAX;
-// PLEASE don't add constants here. Every dev will have to do
-// a complete rebuild. Try to find another shared header file,
-// like llregionflags.h, lllslconstants.h, llagentconstants.h,
-// or create a new one. JC
+// agent constants
+const U32 CONTROL_AT_POS_INDEX = 0;
+const U32 CONTROL_AT_NEG_INDEX = 1;
+const U32 CONTROL_LEFT_POS_INDEX = 2;
+const U32 CONTROL_LEFT_NEG_INDEX = 3;
+const U32 CONTROL_UP_POS_INDEX = 4;
+const U32 CONTROL_UP_NEG_INDEX = 5;
+const U32 CONTROL_PITCH_POS_INDEX = 6;
+const U32 CONTROL_PITCH_NEG_INDEX = 7;
+const U32 CONTROL_YAW_POS_INDEX = 8;
+const U32 CONTROL_YAW_NEG_INDEX = 9;
+const U32 CONTROL_FAST_AT_INDEX = 10;
+const U32 CONTROL_FAST_LEFT_INDEX = 11;
+const U32 CONTROL_FAST_UP_INDEX = 12;
+const U32 CONTROL_FLY_INDEX = 13;
+const U32 CONTROL_STOP_INDEX = 14;
+const U32 CONTROL_FINISH_ANIM_INDEX = 15;
+const U32 CONTROL_STAND_UP_INDEX = 16;
+const U32 CONTROL_SIT_ON_GROUND_INDEX = 17;
+const U32 CONTROL_MOUSELOOK_INDEX = 18;
+const U32 CONTROL_NUDGE_AT_POS_INDEX = 19;
+const U32 CONTROL_NUDGE_AT_NEG_INDEX = 20;
+const U32 CONTROL_NUDGE_LEFT_POS_INDEX = 21;
+const U32 CONTROL_NUDGE_LEFT_NEG_INDEX = 22;
+const U32 CONTROL_NUDGE_UP_POS_INDEX = 23;
+const U32 CONTROL_NUDGE_UP_NEG_INDEX = 24;
+const U32 CONTROL_TURN_LEFT_INDEX = 25;
+const U32 CONTROL_TURN_RIGHT_INDEX = 26;
+const U32 CONTROL_AWAY_INDEX = 27;
+const U32 CONTROL_LBUTTON_DOWN_INDEX = 28;
+const U32 CONTROL_LBUTTON_UP_INDEX = 29;
+const U32 CONTROL_ML_LBUTTON_DOWN_INDEX = 30;
+const U32 CONTROL_ML_LBUTTON_UP_INDEX = 31;
+const U32 TOTAL_CONTROLS = 32;
+
+const U32 AGENT_CONTROL_AT_POS = 0x1 << CONTROL_AT_POS_INDEX; // 0x00000001
+const U32 AGENT_CONTROL_AT_NEG = 0x1 << CONTROL_AT_NEG_INDEX; // 0x00000002
+const U32 AGENT_CONTROL_LEFT_POS = 0x1 << CONTROL_LEFT_POS_INDEX; // 0x00000004
+const U32 AGENT_CONTROL_LEFT_NEG = 0x1 << CONTROL_LEFT_NEG_INDEX; // 0x00000008
+const U32 AGENT_CONTROL_UP_POS = 0x1 << CONTROL_UP_POS_INDEX; // 0x00000010
+const U32 AGENT_CONTROL_UP_NEG = 0x1 << CONTROL_UP_NEG_INDEX; // 0x00000020
+const U32 AGENT_CONTROL_PITCH_POS = 0x1 << CONTROL_PITCH_POS_INDEX; // 0x00000040
+const U32 AGENT_CONTROL_PITCH_NEG = 0x1 << CONTROL_PITCH_NEG_INDEX; // 0x00000080
+const U32 AGENT_CONTROL_YAW_POS = 0x1 << CONTROL_YAW_POS_INDEX; // 0x00000100
+const U32 AGENT_CONTROL_YAW_NEG = 0x1 << CONTROL_YAW_NEG_INDEX; // 0x00000200
+
+const U32 AGENT_CONTROL_FAST_AT = 0x1 << CONTROL_FAST_AT_INDEX; // 0x00000400
+const U32 AGENT_CONTROL_FAST_LEFT = 0x1 << CONTROL_FAST_LEFT_INDEX; // 0x00000800
+const U32 AGENT_CONTROL_FAST_UP = 0x1 << CONTROL_FAST_UP_INDEX; // 0x00001000
+
+const U32 AGENT_CONTROL_FLY = 0x1 << CONTROL_FLY_INDEX; // 0x00002000
+const U32 AGENT_CONTROL_STOP = 0x1 << CONTROL_STOP_INDEX; // 0x00004000
+const U32 AGENT_CONTROL_FINISH_ANIM = 0x1 << CONTROL_FINISH_ANIM_INDEX; // 0x00008000
+const U32 AGENT_CONTROL_STAND_UP = 0x1 << CONTROL_STAND_UP_INDEX; // 0x00010000
+const U32 AGENT_CONTROL_SIT_ON_GROUND = 0x1 << CONTROL_SIT_ON_GROUND_INDEX; // 0x00020000
+const U32 AGENT_CONTROL_MOUSELOOK = 0x1 << CONTROL_MOUSELOOK_INDEX; // 0x00040000
+
+const U32 AGENT_CONTROL_NUDGE_AT_POS = 0x1 << CONTROL_NUDGE_AT_POS_INDEX; // 0x00080000
+const U32 AGENT_CONTROL_NUDGE_AT_NEG = 0x1 << CONTROL_NUDGE_AT_NEG_INDEX; // 0x00100000
+const U32 AGENT_CONTROL_NUDGE_LEFT_POS = 0x1 << CONTROL_NUDGE_LEFT_POS_INDEX; // 0x00200000
+const U32 AGENT_CONTROL_NUDGE_LEFT_NEG = 0x1 << CONTROL_NUDGE_LEFT_NEG_INDEX; // 0x00400000
+const U32 AGENT_CONTROL_NUDGE_UP_POS = 0x1 << CONTROL_NUDGE_UP_POS_INDEX; // 0x00800000
+const U32 AGENT_CONTROL_NUDGE_UP_NEG = 0x1 << CONTROL_NUDGE_UP_NEG_INDEX; // 0x01000000
+const U32 AGENT_CONTROL_TURN_LEFT = 0x1 << CONTROL_TURN_LEFT_INDEX; // 0x02000000
+const U32 AGENT_CONTROL_TURN_RIGHT = 0x1 << CONTROL_TURN_RIGHT_INDEX; // 0x04000000
+
+const U32 AGENT_CONTROL_AWAY = 0x1 << CONTROL_AWAY_INDEX; // 0x08000000
+
+const U32 AGENT_CONTROL_LBUTTON_DOWN = 0x1 << CONTROL_LBUTTON_DOWN_INDEX; // 0x10000000
+const U32 AGENT_CONTROL_LBUTTON_UP = 0x1 << CONTROL_LBUTTON_UP_INDEX; // 0x20000000
+const U32 AGENT_CONTROL_ML_LBUTTON_DOWN = 0x1 << CONTROL_ML_LBUTTON_DOWN_INDEX; // 0x40000000
+const U32 AGENT_CONTROL_ML_LBUTTON_UP = ((U32)0x1) << CONTROL_ML_LBUTTON_UP_INDEX; // 0x80000000
+
+// move these up so that we can hide them in "State" for object updates
+// (for now)
+const U32 AGENT_ATTACH_OFFSET = 4;
+const U32 AGENT_ATTACH_MASK = 0xf << AGENT_ATTACH_OFFSET;
+
+// RN: this method swaps the upper and lower nibbles to maintain backward
+// compatibility with old objects that only used the upper nibble
+#define ATTACHMENT_ID_FROM_STATE(state) ((S32)((((U8)state & AGENT_ATTACH_MASK) >> 4) | (((U8)state & ~AGENT_ATTACH_MASK) << 4)))
+
+// DO NOT CHANGE THE SEQUENCE OF THIS LIST!!
+const U8 CLICK_ACTION_NONE = 0;
+const U8 CLICK_ACTION_TOUCH = 0;
+const U8 CLICK_ACTION_SIT = 1;
+const U8 CLICK_ACTION_BUY = 2;
+const U8 CLICK_ACTION_PAY = 3;
+const U8 CLICK_ACTION_OPEN = 4;
+const U8 CLICK_ACTION_PLAY = 5;
+const U8 CLICK_ACTION_OPEN_MEDIA = 6;
+const U8 CLICK_ACTION_ZOOM = 7;
+// DO NOT CHANGE THE SEQUENCE OF THIS LIST!!
+
#endif
diff --git a/indra/llcommon/linked_lists.h b/indra/llcommon/linked_lists.h
deleted file mode 100755
index 6b25295b7b..0000000000
--- a/indra/llcommon/linked_lists.h
+++ /dev/null
@@ -1,937 +0,0 @@
-/**
- * @file linked_lists.h
- * @brief LLLinkedList class header amd implementation file.
- *
- * $LicenseInfo:firstyear=2001&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_LINKED_LISTS_H
-#define LL_LINKED_LISTS_H
-
-/**
- * Provides a standard doubly linked list for fun and profit
- * Utilizes a neat trick off of Flipcode where the back pointer is a
- * pointer to a pointer, allowing easier transfer of nodes between lists, &c
- * And a template class, of course
- */
-
-#include "llerror.h"
-
-
-template <class DATA_TYPE> class LLLinkedList
-{
-public:
- friend class LLLinkNode;
- // External interface
-
- // basic constructor
- LLLinkedList() : mHead(NULL), mCurrentp(NULL), mInsertBefore(NULL)
- {
- mCurrentp = mHead.mNextp;
- mCurrentOperatingp = mHead.mNextp;
- mCount = 0;
- }
-
- // basic constructor
- LLLinkedList(BOOL (*insert_before)(DATA_TYPE *data_new, DATA_TYPE *data_tested)) : mHead(NULL), mCurrentp(NULL), mInsertBefore(insert_before)
- {
- mCurrentp = mHead.mNextp;
- mCurrentOperatingp = mHead.mNextp;
- mCount = 0;
- }
-
- // destructor destroys list and nodes, but not data in nodes
- ~LLLinkedList()
- {
- removeAllNodes();
- }
-
- // set mInsertBefore
- void setInsertBefore(BOOL (*insert_before)(DATA_TYPE *data_new, DATA_TYPE *data_tested))
- {
- mInsertBefore = insert_before;
- }
-
- //
- // WARNING!!!!!!!
- // addData and addDataSorted are NOT O(1) operations, but O(n) because they check
- // for existence of the data in the linked list first. Why, I don't know - djs
- // If you don't care about dupes, use addDataNoCheck
- //
-
- // put data into a node and stick it at the front of the list
- inline BOOL addData(DATA_TYPE *data);
-
- // put data into a node and sort into list by mInsertBefore()
- // calls normal add if mInsertBefore isn't set
- inline BOOL addDataSorted(DATA_TYPE *data);
-
- inline BOOL addDataNoCheck(DATA_TYPE *data);
-
- // bubbleSortList
- // does an improved bubble sort of the list . . . works best with almost sorted data
- // does nothing if mInsertBefore isn't set
- // Nota Bene: Swaps are accomplished by swapping data pointers
- inline void bubbleSortList();
-
- // put data into a node and stick it at the end of the list
- inline BOOL addDataAtEnd(DATA_TYPE *data);
-
- // returns number of items in the list
- inline S32 getLength() const;
-
- inline BOOL isEmpty();
-
- // search the list starting at mHead.mNextp and remove the link with mDatap == data
- // leave mCurrentp and mCurrentOperatingp on the next entry
- // return TRUE if found, FALSE if not found
- inline BOOL removeData(DATA_TYPE *data);
-
- // search the list starting at mHead.mNextp and delete the link with mDatap == data
- // leave mCurrentp and mCurrentOperatingp on the next entry
- // return TRUE if found, FALSE if not found
- inline BOOL deleteData(DATA_TYPE *data);
-
- // remove all nodes from the list and delete the associated data
- inline void deleteAllData();
-
- // remove all nodes from the list but do not delete data
- inline void removeAllNodes();
-
- // check to see if data is in list
- // if TRUE then mCurrentp and mCurrentOperatingp point to data
- inline BOOL checkData(DATA_TYPE *data);
-
- // place mCurrentp on first node
- inline void resetList();
-
- // return the data currently pointed to, set mCurentOperatingp to that node and bump mCurrentp
- inline DATA_TYPE *getCurrentData();
-
- // same as getCurrentData() but a more intuitive name for the operation
- inline DATA_TYPE *getNextData();
-
- // reset the list and return the data currently pointed to, set mCurentOperatingp to that node and bump mCurrentp
- inline DATA_TYPE *getFirstData();
-
- // reset the list and return the data at position n, set mCurentOperatingp to that node and bump mCurrentp
- // Note: n is zero-based
- inline DATA_TYPE *getNthData( U32 n);
-
- // reset the list and return the last data in it, set mCurentOperatingp to that node and bump mCurrentp
- inline DATA_TYPE *getLastData();
-
- // remove the Node at mCurentOperatingp
- // leave mCurrentp and mCurentOperatingp on the next entry
- inline void removeCurrentData();
-
- // remove the Node at mCurentOperatingp and add it to newlist
- // leave mCurrentp and mCurentOperatingp on the next entry
- void moveCurrentData(LLLinkedList *newlist, BOOL b_sort);
-
- BOOL moveData(DATA_TYPE *data, LLLinkedList *newlist, BOOL b_sort);
-
- // delete the Node at mCurentOperatingp
- // leave mCurrentp anf mCurentOperatingp on the next entry
- void deleteCurrentData();
-
-private:
- // node that actually contains the data
- class LLLinkNode
- {
- public:
- // assign the mDatap pointer
- LLLinkNode(DATA_TYPE *data) : mDatap(data), mNextp(NULL), mPrevpp(NULL)
- {
- }
-
- // destructor does not, by default, destroy associated data
- // however, the mDatap must be NULL to ensure that we aren't causing memory leaks
- ~LLLinkNode()
- {
- if (mDatap)
- {
- llerror("Attempting to call LLLinkNode destructor with a non-null mDatap!", 1);
- }
- }
-
- // delete associated data and NULL out pointer
- void deleteData()
- {
- delete mDatap;
- mDatap = NULL;
- }
-
- // NULL out pointer
- void removeData()
- {
- mDatap = NULL;
- }
-
- DATA_TYPE *mDatap;
- LLLinkNode *mNextp;
- LLLinkNode **mPrevpp;
- };
-
- // add a node at the front of the list
- void addData(LLLinkNode *node)
- {
- // don't allow NULL to be passed to addData
- if (!node)
- {
- llerror("NULL pointer passed to LLLinkedList::addData", 0);
- }
-
- // add the node to the front of the list
- node->mPrevpp = &mHead.mNextp;
- node->mNextp = mHead.mNextp;
-
- // if there's something in the list, fix its back pointer
- if (node->mNextp)
- {
- node->mNextp->mPrevpp = &node->mNextp;
- }
-
- mHead.mNextp = node;
- }
-
- LLLinkNode mHead; // fake head node. . . makes pointer operations faster and easier
- LLLinkNode *mCurrentp; // mCurrentp is the Node that getCurrentData returns
- LLLinkNode *mCurrentOperatingp; // this is the node that the various mumbleCurrentData functions act on
- BOOL (*mInsertBefore)(DATA_TYPE *data_new, DATA_TYPE *data_tested); // user function set to allow sorted lists
- U32 mCount;
-};
-
-template <class DATA_TYPE>
-BOOL LLLinkedList<DATA_TYPE>::addData(DATA_TYPE *data)
-{
- // don't allow NULL to be passed to addData
- if (!data)
- {
- llerror("NULL pointer passed to LLLinkedList::addData", 0);
- }
-
- LLLinkNode *tcurr = mCurrentp;
- LLLinkNode *tcurrop = mCurrentOperatingp;
-
- if ( checkData(data))
- {
- mCurrentp = tcurr;
- mCurrentOperatingp = tcurrop;
- return FALSE;
- }
-
- // make the new node
- LLLinkNode *temp = new LLLinkNode(data);
-
- // add the node to the front of the list
- temp->mPrevpp = &mHead.mNextp;
- temp->mNextp = mHead.mNextp;
-
- // if there's something in the list, fix its back pointer
- if (temp->mNextp)
- {
- temp->mNextp->mPrevpp = &temp->mNextp;
- }
-
- mHead.mNextp = temp;
- mCurrentp = tcurr;
- mCurrentOperatingp = tcurrop;
- mCount++;
- return TRUE;
-}
-
-
-template <class DATA_TYPE>
-BOOL LLLinkedList<DATA_TYPE>::addDataNoCheck(DATA_TYPE *data)
-{
- // don't allow NULL to be passed to addData
- if (!data)
- {
- llerror("NULL pointer passed to LLLinkedList::addData", 0);
- }
-
- LLLinkNode *tcurr = mCurrentp;
- LLLinkNode *tcurrop = mCurrentOperatingp;
-
- // make the new node
- LLLinkNode *temp = new LLLinkNode(data);
-
- // add the node to the front of the list
- temp->mPrevpp = &mHead.mNextp;
- temp->mNextp = mHead.mNextp;
-
- // if there's something in the list, fix its back pointer
- if (temp->mNextp)
- {
- temp->mNextp->mPrevpp = &temp->mNextp;
- }
-
- mHead.mNextp = temp;
- mCurrentp = tcurr;
- mCurrentOperatingp = tcurrop;
- mCount++;
- return TRUE;
-}
-
-
-template <class DATA_TYPE>
-BOOL LLLinkedList<DATA_TYPE>::addDataSorted(DATA_TYPE *data)
-{
- LLLinkNode *tcurr = mCurrentp;
- LLLinkNode *tcurrop = mCurrentOperatingp;
- // don't allow NULL to be passed to addData
- if (!data)
- {
- llerror("NULL pointer passed to LLLinkedList::addDataSorted", 0);
- }
-
- if (checkData(data))
- {
- // restore
- mCurrentp = tcurr;
- mCurrentOperatingp = tcurrop;
- return FALSE;
- }
-
- // mInsertBefore not set?
- if (!mInsertBefore)
- {
- addData(data);
- // restore
- mCurrentp = tcurr;
- mCurrentOperatingp = tcurrop;
- return FALSE;
- }
-
- // empty list?
- if (!mHead.mNextp)
- {
- addData(data);
- // restore
- mCurrentp = tcurr;
- mCurrentOperatingp = tcurrop;
- return TRUE;
- }
-
- // make the new node
- LLLinkNode *temp = new LLLinkNode(data);
-
- // walk the list until mInsertBefore returns true
- mCurrentp = mHead.mNextp;
- while (mCurrentp->mNextp)
- {
- if (mInsertBefore(data, mCurrentp->mDatap))
- {
- // insert before the current one
- temp->mPrevpp = mCurrentp->mPrevpp;
- temp->mNextp = mCurrentp;
- *(temp->mPrevpp) = temp;
- mCurrentp->mPrevpp = &temp->mNextp;
- // restore
- mCurrentp = tcurr;
- mCurrentOperatingp = tcurrop;
- mCount++;
- return TRUE;
- }
- else
- {
- mCurrentp = mCurrentp->mNextp;
- }
- }
-
- // on the last element, add before?
- if (mInsertBefore(data, mCurrentp->mDatap))
- {
- // insert before the current one
- temp->mPrevpp = mCurrentp->mPrevpp;
- temp->mNextp = mCurrentp;
- *(temp->mPrevpp) = temp;
- mCurrentp->mPrevpp = &temp->mNextp;
- // restore
- mCurrentp = tcurr;
- mCurrentOperatingp = tcurrop;
- }
- else // insert after
- {
- temp->mPrevpp = &mCurrentp->mNextp;
- temp->mNextp = NULL;
- mCurrentp->mNextp = temp;
-
- // restore
- mCurrentp = tcurr;
- mCurrentOperatingp = tcurrop;
- }
- mCount++;
- return TRUE;
-}
-
-template <class DATA_TYPE>
-void LLLinkedList<DATA_TYPE>::bubbleSortList()
-{
- // mInsertBefore not set
- if (!mInsertBefore)
- {
- return;
- }
-
- LLLinkNode *tcurr = mCurrentp;
- LLLinkNode *tcurrop = mCurrentOperatingp;
-
- BOOL b_swapped = FALSE;
- DATA_TYPE *temp;
-
- // Nota Bene: This will break if more than 0x7FFFFFFF members in list!
- S32 length = 0x7FFFFFFF;
- S32 count = 0;
- do
- {
- b_swapped = FALSE;
- mCurrentp = mHead.mNextp;
- count = 0;
- while ( (count + 1 < length)
- &&(mCurrentp))
- {
- if (mCurrentp->mNextp)
- {
- if (!mInsertBefore(mCurrentp->mDatap, mCurrentp->mNextp->mDatap))
- {
- // swap data pointers!
- temp = mCurrentp->mDatap;
- mCurrentp->mDatap = mCurrentp->mNextp->mDatap;
- mCurrentp->mNextp->mDatap = temp;
- b_swapped = TRUE;
- }
- }
- else
- {
- break;
- }
- count++;
- mCurrentp = mCurrentp->mNextp;
- }
- length = count;
- } while (b_swapped);
-
- // restore
- mCurrentp = tcurr;
- mCurrentOperatingp = tcurrop;
-}
-
-
-template <class DATA_TYPE>
-BOOL LLLinkedList<DATA_TYPE>::addDataAtEnd(DATA_TYPE *data)
-{
- LLLinkNode *tcurr = mCurrentp;
- LLLinkNode *tcurrop = mCurrentOperatingp;
-
- // don't allow NULL to be passed to addData
- if (!data)
- {
- llerror("NULL pointer passed to LLLinkedList::addData", 0);
- }
-
- if (checkData(data))
- {
- mCurrentp = tcurr;
- mCurrentOperatingp = tcurrop;
- return FALSE;
- }
-
- // make the new node
- LLLinkNode *temp = new LLLinkNode(data);
-
- // add the node to the end of the list
-
- // if empty, add to the front and be done with it
- if (!mHead.mNextp)
- {
- temp->mPrevpp = &mHead.mNextp;
- temp->mNextp = NULL;
- mHead.mNextp = temp;
- }
- else
- {
- // otherwise, walk to the end of the list
- mCurrentp = mHead.mNextp;
- while (mCurrentp->mNextp)
- {
- mCurrentp = mCurrentp->mNextp;
- }
- temp->mPrevpp = &mCurrentp->mNextp;
- temp->mNextp = NULL;
- mCurrentp->mNextp = temp;
- }
-
- // restore
- mCurrentp = tcurr;
- mCurrentOperatingp = tcurrop;
- mCount++;
- return TRUE;
-}
-
-
-// returns number of items in the list
-template <class DATA_TYPE>
-S32 LLLinkedList<DATA_TYPE>::getLength() const
-{
-// S32 length = 0;
-// for (LLLinkNode* temp = mHead.mNextp; temp != NULL; temp = temp->mNextp)
-// {
-// length++;
-// }
- return mCount;
-}
-
-
-template <class DATA_TYPE>
-BOOL LLLinkedList<DATA_TYPE>::isEmpty()
-{
- return (mCount == 0);
-}
-
-
-// search the list starting at mHead.mNextp and remove the link with mDatap == data
-// leave mCurrentp and mCurrentOperatingp on the next entry
-// return TRUE if found, FALSE if not found
-template <class DATA_TYPE>
-BOOL LLLinkedList<DATA_TYPE>::removeData(DATA_TYPE *data)
-{
- BOOL b_found = FALSE;
- // don't allow NULL to be passed to addData
- if (!data)
- {
- llerror("NULL pointer passed to LLLinkedList::removeData", 0);
- }
-
- LLLinkNode *tcurr = mCurrentp;
- LLLinkNode *tcurrop = mCurrentOperatingp;
-
- mCurrentp = mHead.mNextp;
- mCurrentOperatingp = mHead.mNextp;
-
- while (mCurrentOperatingp)
- {
- if (mCurrentOperatingp->mDatap == data)
- {
- b_found = TRUE;
-
- // remove the node
-
- // if there is a next one, fix it
- if (mCurrentOperatingp->mNextp)
- {
- mCurrentOperatingp->mNextp->mPrevpp = mCurrentOperatingp->mPrevpp;
- }
- *(mCurrentOperatingp->mPrevpp) = mCurrentOperatingp->mNextp;
-
- // remove the LLLinkNode
-
- // if we were on the one we want to delete, bump the cached copies
- if (mCurrentOperatingp == tcurrop)
- {
- tcurrop = tcurr = mCurrentOperatingp->mNextp;
- }
- else if (mCurrentOperatingp == tcurr)
- {
- tcurrop = tcurr = mCurrentOperatingp->mNextp;
- }
-
- mCurrentp = mCurrentOperatingp->mNextp;
-
- mCurrentOperatingp->removeData();
- delete mCurrentOperatingp;
- mCurrentOperatingp = mCurrentp;
- mCount--;
- break;
- }
- mCurrentOperatingp = mCurrentOperatingp->mNextp;
- }
- // restore
- mCurrentp = tcurr;
- mCurrentOperatingp = tcurrop;
- return b_found;
-}
-
-// search the list starting at mHead.mNextp and delete the link with mDatap == data
-// leave mCurrentp and mCurrentOperatingp on the next entry
-// return TRUE if found, FALSE if not found
-template <class DATA_TYPE>
-BOOL LLLinkedList<DATA_TYPE>::deleteData(DATA_TYPE *data)
-{
- BOOL b_found = FALSE;
- // don't allow NULL to be passed to addData
- if (!data)
- {
- llerror("NULL pointer passed to LLLinkedList::removeData", 0);
- }
-
- LLLinkNode *tcurr = mCurrentp;
- LLLinkNode *tcurrop = mCurrentOperatingp;
-
- mCurrentp = mHead.mNextp;
- mCurrentOperatingp = mHead.mNextp;
-
- while (mCurrentOperatingp)
- {
- if (mCurrentOperatingp->mDatap == data)
- {
- b_found = TRUE;
-
- // remove the node
- // if there is a next one, fix it
- if (mCurrentOperatingp->mNextp)
- {
- mCurrentOperatingp->mNextp->mPrevpp = mCurrentOperatingp->mPrevpp;
- }
- *(mCurrentOperatingp->mPrevpp) = mCurrentOperatingp->mNextp;
-
- // delete the LLLinkNode
- // if we were on the one we want to delete, bump the cached copies
- if (mCurrentOperatingp == tcurrop)
- {
- tcurrop = tcurr = mCurrentOperatingp->mNextp;
- }
-
- // and delete the associated data
- llassert(mCurrentOperatingp);
- mCurrentp = mCurrentOperatingp->mNextp;
- mCurrentOperatingp->deleteData();
- delete mCurrentOperatingp;
- mCurrentOperatingp = mCurrentp;
- mCount--;
- break;
- }
- mCurrentOperatingp = mCurrentOperatingp->mNextp;
- }
- // restore
- mCurrentp = tcurr;
- mCurrentOperatingp = tcurrop;
- return b_found;
-}
-
- // remove all nodes from the list and delete the associated data
-template <class DATA_TYPE>
-void LLLinkedList<DATA_TYPE>::deleteAllData()
-{
- LLLinkNode *temp;
- // reset mCurrentp
- mCurrentp = mHead.mNextp;
-
- while (mCurrentp)
- {
- temp = mCurrentp->mNextp;
- mCurrentp->deleteData();
- delete mCurrentp;
- mCurrentp = temp;
- }
-
- // reset mHead and mCurrentp
- mHead.mNextp = NULL;
- mCurrentp = mHead.mNextp;
- mCurrentOperatingp = mHead.mNextp;
- mCount = 0;
-}
-
-// remove all nodes from the list but do not delete data
-template <class DATA_TYPE>
-void LLLinkedList<DATA_TYPE>::removeAllNodes()
-{
- LLLinkNode *temp;
- // reset mCurrentp
- mCurrentp = mHead.mNextp;
-
- while (mCurrentp)
- {
- temp = mCurrentp->mNextp;
- mCurrentp->removeData();
- delete mCurrentp;
- mCurrentp = temp;
- }
-
- // reset mHead and mCurrentp
- mHead.mNextp = NULL;
- mCurrentp = mHead.mNextp;
- mCurrentOperatingp = mHead.mNextp;
- mCount = 0;
-}
-
-// check to see if data is in list
-// if TRUE then mCurrentp and mCurrentOperatingp point to data
-template <class DATA_TYPE>
-BOOL LLLinkedList<DATA_TYPE>::checkData(DATA_TYPE *data)
-{
- // reset mCurrentp
- mCurrentp = mHead.mNextp;
-
- while (mCurrentp)
- {
- if (mCurrentp->mDatap == data)
- {
- mCurrentOperatingp = mCurrentp;
- return TRUE;
- }
- mCurrentp = mCurrentp->mNextp;
- }
- mCurrentOperatingp = mCurrentp;
- return FALSE;
-}
-
-// place mCurrentp on first node
-template <class DATA_TYPE>
-void LLLinkedList<DATA_TYPE>::resetList()
-{
- mCurrentp = mHead.mNextp;
- mCurrentOperatingp = mHead.mNextp;
-}
-
-// return the data currently pointed to, set mCurentOperatingp to that node and bump mCurrentp
-template <class DATA_TYPE>
-DATA_TYPE *LLLinkedList<DATA_TYPE>::getCurrentData()
-{
- if (mCurrentp)
- {
- mCurrentOperatingp = mCurrentp;
- mCurrentp = mCurrentp->mNextp;
- return mCurrentOperatingp->mDatap;
- }
- else
- {
- return NULL;
- }
-}
-
-// same as getCurrentData() but a more intuitive name for the operation
-template <class DATA_TYPE>
-DATA_TYPE *LLLinkedList<DATA_TYPE>::getNextData()
-{
- if (mCurrentp)
- {
- mCurrentOperatingp = mCurrentp;
- mCurrentp = mCurrentp->mNextp;
- return mCurrentOperatingp->mDatap;
- }
- else
- {
- return NULL;
- }
-}
-
-// reset the list and return the data currently pointed to, set mCurentOperatingp to that node and bump mCurrentp
-template <class DATA_TYPE>
-DATA_TYPE *LLLinkedList<DATA_TYPE>::getFirstData()
-{
- mCurrentp = mHead.mNextp;
- mCurrentOperatingp = mHead.mNextp;
- if (mCurrentp)
- {
- mCurrentOperatingp = mCurrentp;
- mCurrentp = mCurrentp->mNextp;
- return mCurrentOperatingp->mDatap;
- }
- else
- {
- return NULL;
- }
-}
-
-// Note: n is zero-based
-template <class DATA_TYPE>
-DATA_TYPE *LLLinkedList<DATA_TYPE>::getNthData( U32 n )
-{
- mCurrentOperatingp = mHead.mNextp;
-
- // if empty, return NULL
- if (!mCurrentOperatingp)
- {
- return NULL;
- }
-
- for( U32 i = 0; i < n; i++ )
- {
- mCurrentOperatingp = mCurrentOperatingp->mNextp;
- if( !mCurrentOperatingp )
- {
- return NULL;
- }
- }
-
- mCurrentp = mCurrentOperatingp->mNextp;
- return mCurrentOperatingp->mDatap;
-}
-
-
-// reset the list and return the last data in it, set mCurentOperatingp to that node and bump mCurrentp
-template <class DATA_TYPE>
-DATA_TYPE *LLLinkedList<DATA_TYPE>::getLastData()
-{
- mCurrentOperatingp = mHead.mNextp;
-
- // if empty, return NULL
- if (!mCurrentOperatingp)
- return NULL;
-
- // walk until we're pointing at the last entry
- while (mCurrentOperatingp->mNextp)
- {
- mCurrentOperatingp = mCurrentOperatingp->mNextp;
- }
- mCurrentp = mCurrentOperatingp->mNextp;
- return mCurrentOperatingp->mDatap;
-}
-
-// remove the Node at mCurentOperatingp
-// leave mCurrentp and mCurentOperatingp on the next entry
-// return TRUE if found, FALSE if not found
-template <class DATA_TYPE>
-void LLLinkedList<DATA_TYPE>::removeCurrentData()
-{
- if (mCurrentOperatingp)
- {
- // remove the node
- // if there is a next one, fix it
- if (mCurrentOperatingp->mNextp)
- {
- mCurrentOperatingp->mNextp->mPrevpp = mCurrentOperatingp->mPrevpp;
- }
- *(mCurrentOperatingp->mPrevpp) = mCurrentOperatingp->mNextp;
-
- // remove the LLLinkNode
- mCurrentp = mCurrentOperatingp->mNextp;
-
- mCurrentOperatingp->removeData();
- delete mCurrentOperatingp;
- mCount--;
- mCurrentOperatingp = mCurrentp;
- }
-}
-
-// remove the Node at mCurentOperatingp and add it to newlist
-// leave mCurrentp and mCurentOperatingp on the next entry
-// return TRUE if found, FALSE if not found
-template <class DATA_TYPE>
-void LLLinkedList<DATA_TYPE>::moveCurrentData(LLLinkedList *newlist, BOOL b_sort)
-{
- if (mCurrentOperatingp)
- {
- // remove the node
- // if there is a next one, fix it
- if (mCurrentOperatingp->mNextp)
- {
- mCurrentOperatingp->mNextp->mPrevpp = mCurrentOperatingp->mPrevpp;
- }
- *(mCurrentOperatingp->mPrevpp) = mCurrentOperatingp->mNextp;
-
- // remove the LLLinkNode
- mCurrentp = mCurrentOperatingp->mNextp;
- // move the node to the new list
- newlist->addData(mCurrentOperatingp);
- if (b_sort)
- bubbleSortList();
- mCurrentOperatingp = mCurrentp;
- }
-}
-
-template <class DATA_TYPE>
-BOOL LLLinkedList<DATA_TYPE>::moveData(DATA_TYPE *data, LLLinkedList *newlist, BOOL b_sort)
-{
- BOOL b_found = FALSE;
- // don't allow NULL to be passed to addData
- if (!data)
- {
- llerror("NULL pointer passed to LLLinkedList::removeData", 0);
- }
-
- LLLinkNode *tcurr = mCurrentp;
- LLLinkNode *tcurrop = mCurrentOperatingp;
-
- mCurrentp = mHead.mNextp;
- mCurrentOperatingp = mHead.mNextp;
-
- while (mCurrentOperatingp)
- {
- if (mCurrentOperatingp->mDatap == data)
- {
- b_found = TRUE;
-
- // remove the node
-
- // if there is a next one, fix it
- if (mCurrentOperatingp->mNextp)
- {
- mCurrentOperatingp->mNextp->mPrevpp = mCurrentOperatingp->mPrevpp;
- }
- *(mCurrentOperatingp->mPrevpp) = mCurrentOperatingp->mNextp;
-
- // if we were on the one we want to delete, bump the cached copies
- if ( (mCurrentOperatingp == tcurrop)
- ||(mCurrentOperatingp == tcurr))
- {
- tcurrop = tcurr = mCurrentOperatingp->mNextp;
- }
-
- // remove the LLLinkNode
- mCurrentp = mCurrentOperatingp->mNextp;
- // move the node to the new list
- newlist->addData(mCurrentOperatingp);
- if (b_sort)
- newlist->bubbleSortList();
- mCurrentOperatingp = mCurrentp;
- break;
- }
- mCurrentOperatingp = mCurrentOperatingp->mNextp;
- }
- // restore
- mCurrentp = tcurr;
- mCurrentOperatingp = tcurrop;
- return b_found;
-}
-
-// delete the Node at mCurentOperatingp
-// leave mCurrentp anf mCurentOperatingp on the next entry
-// return TRUE if found, FALSE if not found
-template <class DATA_TYPE>
-void LLLinkedList<DATA_TYPE>::deleteCurrentData()
-{
- if (mCurrentOperatingp)
- {
- // remove the node
- // if there is a next one, fix it
- if (mCurrentOperatingp->mNextp)
- {
- mCurrentOperatingp->mNextp->mPrevpp = mCurrentOperatingp->mPrevpp;
- }
- *(mCurrentOperatingp->mPrevpp) = mCurrentOperatingp->mNextp;
-
- // remove the LLLinkNode
- mCurrentp = mCurrentOperatingp->mNextp;
-
- mCurrentOperatingp->deleteData();
- if (mCurrentOperatingp->mDatap)
- llerror("This is impossible!", 0);
- delete mCurrentOperatingp;
- mCurrentOperatingp = mCurrentp;
- mCount--;
- }
-}
-
-#endif
diff --git a/indra/llcommon/ll_template_cast.h b/indra/llcommon/ll_template_cast.h
deleted file mode 100755
index c8f9a2f7eb..0000000000
--- a/indra/llcommon/ll_template_cast.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/**
- * @file ll_template_cast.h
- * @author Nat Goodspeed
- * @date 2009-11-21
- * @brief Define ll_template_cast function
- *
- * $LicenseInfo:firstyear=2009&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$
- */
-
-#if ! defined(LL_LL_TEMPLATE_CAST_H)
-#define LL_LL_TEMPLATE_CAST_H
-
-/**
- * Implementation for ll_template_cast() (q.v.).
- *
- * Default implementation: trying to cast two completely unrelated types
- * returns 0. Typically you'd specify T and U as pointer types, but in fact T
- * can be any type that can be initialized with 0.
- */
-template <typename T, typename U>
-struct ll_template_cast_impl
-{
- T operator()(U)
- {
- return 0;
- }
-};
-
-/**
- * ll_template_cast<T>(some_value) is for use in a template function when
- * some_value might be of arbitrary type, but you want to recognize type T
- * specially.
- *
- * It's designed for use with pointer types. Example:
- * @code
- * struct SpecialClass
- * {
- * void someMethod(const std::string&) const;
- * };
- *
- * template <class REALCLASS>
- * void somefunc(const REALCLASS& instance)
- * {
- * const SpecialClass* ptr = ll_template_cast<const SpecialClass*>(&instance);
- * if (ptr)
- * {
- * ptr->someMethod("Call method only available on SpecialClass");
- * }
- * }
- * @endcode
- *
- * Why is this better than dynamic_cast<>? Because unless OtherClass is
- * polymorphic, the following won't even compile (gcc 4.0.1):
- * @code
- * OtherClass other;
- * SpecialClass* ptr = dynamic_cast<SpecialClass*>(&other);
- * @endcode
- * to say nothing of this:
- * @code
- * void function(int);
- * SpecialClass* ptr = dynamic_cast<SpecialClass*>(&function);
- * @endcode
- * ll_template_cast handles these kinds of cases by returning 0.
- */
-template <typename T, typename U>
-T ll_template_cast(U value)
-{
- return ll_template_cast_impl<T, U>()(value);
-}
-
-/**
- * Implementation for ll_template_cast() (q.v.).
- *
- * Implementation for identical types: return same value.
- */
-template <typename T>
-struct ll_template_cast_impl<T, T>
-{
- T operator()(T value)
- {
- return value;
- }
-};
-
-/**
- * LL_TEMPLATE_CONVERTIBLE(dest, source) asserts that, for a value @c s of
- * type @c source, <tt>ll_template_cast<dest>(s)</tt> will return @c s --
- * presuming that @c source can be converted to @c dest by the normal rules of
- * C++.
- *
- * By default, <tt>ll_template_cast<dest>(s)</tt> will return 0 unless @c s's
- * type is literally identical to @c dest. (This is because of the
- * straightforward application of template specialization rules.) That can
- * lead to surprising results, e.g.:
- *
- * @code
- * Foo myFoo;
- * const Foo* fooptr = ll_template_cast<const Foo*>(&myFoo);
- * @endcode
- *
- * Here @c fooptr will be 0 because <tt>&myFoo</tt> is of type <tt>Foo*</tt>
- * -- @em not <tt>const Foo*</tt>. (Declaring <tt>const Foo myFoo;</tt> would
- * force the compiler to do the right thing.)
- *
- * More disappointingly:
- * @code
- * struct Base {};
- * struct Subclass: public Base {};
- * Subclass object;
- * Base* ptr = ll_template_cast<Base*>(&object);
- * @endcode
- *
- * Here @c ptr will be 0 because <tt>&object</tt> is of type
- * <tt>Subclass*</tt> rather than <tt>Base*</tt>. We @em want this cast to
- * succeed, but without our help ll_template_cast can't recognize it.
- *
- * The following would suffice:
- * @code
- * LL_TEMPLATE_CONVERTIBLE(Base*, Subclass*);
- * ...
- * Base* ptr = ll_template_cast<Base*>(&object);
- * @endcode
- *
- * However, as noted earlier, this is easily fooled:
- * @code
- * const Base* ptr = ll_template_cast<const Base*>(&object);
- * @endcode
- * would still produce 0 because we haven't yet seen:
- * @code
- * LL_TEMPLATE_CONVERTIBLE(const Base*, Subclass*);
- * @endcode
- *
- * @TODO
- * This macro should use Boost type_traits facilities for stripping and
- * re-adding @c const and @c volatile qualifiers so that invoking
- * LL_TEMPLATE_CONVERTIBLE(dest, source) will automatically generate all
- * permitted permutations. It's really not fair to the coder to require
- * separate:
- * @code
- * LL_TEMPLATE_CONVERTIBLE(Base*, Subclass*);
- * LL_TEMPLATE_CONVERTIBLE(const Base*, Subclass*);
- * LL_TEMPLATE_CONVERTIBLE(const Base*, const Subclass*);
- * @endcode
- *
- * (Naturally we omit <tt>LL_TEMPLATE_CONVERTIBLE(Base*, const Subclass*)</tt>
- * because that's not permitted by normal C++ assignment anyway.)
- */
-#define LL_TEMPLATE_CONVERTIBLE(DEST, SOURCE) \
-template <> \
-struct ll_template_cast_impl<DEST, SOURCE> \
-{ \
- DEST operator()(SOURCE wrapper) \
- { \
- return wrapper; \
- } \
-}
-
-#endif /* ! defined(LL_LL_TEMPLATE_CAST_H) */
diff --git a/indra/llcommon/llaccountingcost.h b/indra/llcommon/llaccountingcost.h
deleted file mode 100755
index 0ef3b50c6d..0000000000
--- a/indra/llcommon/llaccountingcost.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * @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
-
-struct ParcelQuota
-{
- ParcelQuota( F32 ownerRenderCost, F32 ownerPhysicsCost, F32 ownerNetworkCost, F32 ownerSimulationCost,
- F32 groupRenderCost, F32 groupPhysicsCost, F32 groupNetworkCost, F32 groupSimulationCost,
- F32 otherRenderCost, F32 otherPhysicsCost, F32 otherNetworkCost, F32 otherSimulationCost,
- F32 tempRenderCost, F32 tempPhysicsCost, F32 tempNetworkCost, F32 tempSimulationCost,
- F32 selectedRenderCost, F32 selectedPhysicsCost, F32 selectedNetworkCost, F32 selectedSimulationCost,
- F32 parcelCapacity )
- : mOwnerRenderCost( ownerRenderCost ), mOwnerPhysicsCost( ownerPhysicsCost )
- , mOwnerNetworkCost( ownerNetworkCost ), mOwnerSimulationCost( ownerSimulationCost )
- , mGroupRenderCost( groupRenderCost ), mGroupPhysicsCost( groupPhysicsCost )
- , mGroupNetworkCost( groupNetworkCost ), mGroupSimulationCost( groupSimulationCost )
- , mOtherRenderCost( otherRenderCost ), mOtherPhysicsCost( otherPhysicsCost )
- , mOtherNetworkCost( otherNetworkCost ), mOtherSimulationCost( otherSimulationCost )
- , mTempRenderCost( tempRenderCost ), mTempPhysicsCost( tempPhysicsCost )
- , mTempNetworkCost( tempNetworkCost ), mTempSimulationCost( tempSimulationCost )
- , mSelectedRenderCost( tempRenderCost ), mSelectedPhysicsCost( tempPhysicsCost )
- , mSelectedNetworkCost( tempNetworkCost ), mSelectedSimulationCost( selectedSimulationCost )
- , mParcelCapacity( parcelCapacity )
- {
- }
-
- ParcelQuota(){}
- F32 mOwnerRenderCost, mOwnerPhysicsCost, mOwnerNetworkCost, mOwnerSimulationCost;
- F32 mGroupRenderCost, mGroupPhysicsCost, mGroupNetworkCost, mGroupSimulationCost;
- F32 mOtherRenderCost, mOtherPhysicsCost, mOtherNetworkCost, mOtherSimulationCost;
- F32 mTempRenderCost, mTempPhysicsCost, mTempNetworkCost, mTempSimulationCost;
- F32 mSelectedRenderCost, mSelectedPhysicsCost, mSelectedNetworkCost, mSelectedSimulationCost;
- F32 mParcelCapacity;
-};
-
-//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/llcommon/llagentconstants.h b/indra/llcommon/llagentconstants.h
deleted file mode 100755
index cd237da4eb..0000000000
--- a/indra/llcommon/llagentconstants.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/**
- * @file llagentconstants.h
- * @author James Cook, Andrew Meadows, Richard Nelson
- * @brief Shared constants through the system for agents.
- *
- * $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_LLAGENTCONSTANTS_H
-#define LL_LLAGENTCONSTANTS_H
-
-const U32 CONTROL_AT_POS_INDEX = 0;
-const U32 CONTROL_AT_NEG_INDEX = 1;
-const U32 CONTROL_LEFT_POS_INDEX = 2;
-const U32 CONTROL_LEFT_NEG_INDEX = 3;
-const U32 CONTROL_UP_POS_INDEX = 4;
-const U32 CONTROL_UP_NEG_INDEX = 5;
-const U32 CONTROL_PITCH_POS_INDEX = 6;
-const U32 CONTROL_PITCH_NEG_INDEX = 7;
-const U32 CONTROL_YAW_POS_INDEX = 8;
-const U32 CONTROL_YAW_NEG_INDEX = 9;
-const U32 CONTROL_FAST_AT_INDEX = 10;
-const U32 CONTROL_FAST_LEFT_INDEX = 11;
-const U32 CONTROL_FAST_UP_INDEX = 12;
-const U32 CONTROL_FLY_INDEX = 13;
-const U32 CONTROL_STOP_INDEX = 14;
-const U32 CONTROL_FINISH_ANIM_INDEX = 15;
-const U32 CONTROL_STAND_UP_INDEX = 16;
-const U32 CONTROL_SIT_ON_GROUND_INDEX = 17;
-const U32 CONTROL_MOUSELOOK_INDEX = 18;
-const U32 CONTROL_NUDGE_AT_POS_INDEX = 19;
-const U32 CONTROL_NUDGE_AT_NEG_INDEX = 20;
-const U32 CONTROL_NUDGE_LEFT_POS_INDEX = 21;
-const U32 CONTROL_NUDGE_LEFT_NEG_INDEX = 22;
-const U32 CONTROL_NUDGE_UP_POS_INDEX = 23;
-const U32 CONTROL_NUDGE_UP_NEG_INDEX = 24;
-const U32 CONTROL_TURN_LEFT_INDEX = 25;
-const U32 CONTROL_TURN_RIGHT_INDEX = 26;
-const U32 CONTROL_AWAY_INDEX = 27;
-const U32 CONTROL_LBUTTON_DOWN_INDEX = 28;
-const U32 CONTROL_LBUTTON_UP_INDEX = 29;
-const U32 CONTROL_ML_LBUTTON_DOWN_INDEX = 30;
-const U32 CONTROL_ML_LBUTTON_UP_INDEX = 31;
-const U32 TOTAL_CONTROLS = 32;
-
-const U32 AGENT_CONTROL_AT_POS = 0x1 << CONTROL_AT_POS_INDEX; // 0x00000001
-const U32 AGENT_CONTROL_AT_NEG = 0x1 << CONTROL_AT_NEG_INDEX; // 0x00000002
-const U32 AGENT_CONTROL_LEFT_POS = 0x1 << CONTROL_LEFT_POS_INDEX; // 0x00000004
-const U32 AGENT_CONTROL_LEFT_NEG = 0x1 << CONTROL_LEFT_NEG_INDEX; // 0x00000008
-const U32 AGENT_CONTROL_UP_POS = 0x1 << CONTROL_UP_POS_INDEX; // 0x00000010
-const U32 AGENT_CONTROL_UP_NEG = 0x1 << CONTROL_UP_NEG_INDEX; // 0x00000020
-const U32 AGENT_CONTROL_PITCH_POS = 0x1 << CONTROL_PITCH_POS_INDEX; // 0x00000040
-const U32 AGENT_CONTROL_PITCH_NEG = 0x1 << CONTROL_PITCH_NEG_INDEX; // 0x00000080
-const U32 AGENT_CONTROL_YAW_POS = 0x1 << CONTROL_YAW_POS_INDEX; // 0x00000100
-const U32 AGENT_CONTROL_YAW_NEG = 0x1 << CONTROL_YAW_NEG_INDEX; // 0x00000200
-
-const U32 AGENT_CONTROL_FAST_AT = 0x1 << CONTROL_FAST_AT_INDEX; // 0x00000400
-const U32 AGENT_CONTROL_FAST_LEFT = 0x1 << CONTROL_FAST_LEFT_INDEX; // 0x00000800
-const U32 AGENT_CONTROL_FAST_UP = 0x1 << CONTROL_FAST_UP_INDEX; // 0x00001000
-
-const U32 AGENT_CONTROL_FLY = 0x1 << CONTROL_FLY_INDEX; // 0x00002000
-const U32 AGENT_CONTROL_STOP = 0x1 << CONTROL_STOP_INDEX; // 0x00004000
-const U32 AGENT_CONTROL_FINISH_ANIM = 0x1 << CONTROL_FINISH_ANIM_INDEX; // 0x00008000
-const U32 AGENT_CONTROL_STAND_UP = 0x1 << CONTROL_STAND_UP_INDEX; // 0x00010000
-const U32 AGENT_CONTROL_SIT_ON_GROUND = 0x1 << CONTROL_SIT_ON_GROUND_INDEX; // 0x00020000
-const U32 AGENT_CONTROL_MOUSELOOK = 0x1 << CONTROL_MOUSELOOK_INDEX; // 0x00040000
-
-const U32 AGENT_CONTROL_NUDGE_AT_POS = 0x1 << CONTROL_NUDGE_AT_POS_INDEX; // 0x00080000
-const U32 AGENT_CONTROL_NUDGE_AT_NEG = 0x1 << CONTROL_NUDGE_AT_NEG_INDEX; // 0x00100000
-const U32 AGENT_CONTROL_NUDGE_LEFT_POS = 0x1 << CONTROL_NUDGE_LEFT_POS_INDEX; // 0x00200000
-const U32 AGENT_CONTROL_NUDGE_LEFT_NEG = 0x1 << CONTROL_NUDGE_LEFT_NEG_INDEX; // 0x00400000
-const U32 AGENT_CONTROL_NUDGE_UP_POS = 0x1 << CONTROL_NUDGE_UP_POS_INDEX; // 0x00800000
-const U32 AGENT_CONTROL_NUDGE_UP_NEG = 0x1 << CONTROL_NUDGE_UP_NEG_INDEX; // 0x01000000
-const U32 AGENT_CONTROL_TURN_LEFT = 0x1 << CONTROL_TURN_LEFT_INDEX; // 0x02000000
-const U32 AGENT_CONTROL_TURN_RIGHT = 0x1 << CONTROL_TURN_RIGHT_INDEX; // 0x04000000
-
-const U32 AGENT_CONTROL_AWAY = 0x1 << CONTROL_AWAY_INDEX; // 0x08000000
-
-const U32 AGENT_CONTROL_LBUTTON_DOWN = 0x1 << CONTROL_LBUTTON_DOWN_INDEX; // 0x10000000
-const U32 AGENT_CONTROL_LBUTTON_UP = 0x1 << CONTROL_LBUTTON_UP_INDEX; // 0x20000000
-const U32 AGENT_CONTROL_ML_LBUTTON_DOWN = 0x1 << CONTROL_ML_LBUTTON_DOWN_INDEX; // 0x40000000
-const U32 AGENT_CONTROL_ML_LBUTTON_UP = ((U32)0x1) << CONTROL_ML_LBUTTON_UP_INDEX; // 0x80000000
-
-const U32 AGENT_CONTROL_AT = AGENT_CONTROL_AT_POS
- | AGENT_CONTROL_AT_NEG
- | AGENT_CONTROL_NUDGE_AT_POS
- | AGENT_CONTROL_NUDGE_AT_NEG;
-
-const U32 AGENT_CONTROL_LEFT = AGENT_CONTROL_LEFT_POS
- | AGENT_CONTROL_LEFT_NEG
- | AGENT_CONTROL_NUDGE_LEFT_POS
- | AGENT_CONTROL_NUDGE_LEFT_NEG;
-
-const U32 AGENT_CONTROL_UP = AGENT_CONTROL_UP_POS
- | AGENT_CONTROL_UP_NEG
- | AGENT_CONTROL_NUDGE_UP_POS
- | AGENT_CONTROL_NUDGE_UP_NEG;
-
-const U32 AGENT_CONTROL_HORIZONTAL = AGENT_CONTROL_AT
- | AGENT_CONTROL_LEFT;
-
-const U32 AGENT_CONTROL_NOT_USED_BY_LSL = AGENT_CONTROL_FLY
- | AGENT_CONTROL_STOP
- | AGENT_CONTROL_FINISH_ANIM
- | AGENT_CONTROL_STAND_UP
- | AGENT_CONTROL_SIT_ON_GROUND
- | AGENT_CONTROL_MOUSELOOK
- | AGENT_CONTROL_AWAY;
-
-const U32 AGENT_CONTROL_MOVEMENT = AGENT_CONTROL_AT
- | AGENT_CONTROL_LEFT
- | AGENT_CONTROL_UP;
-
-const U32 AGENT_CONTROL_ROTATION = AGENT_CONTROL_PITCH_POS
- | AGENT_CONTROL_PITCH_NEG
- | AGENT_CONTROL_YAW_POS
- | AGENT_CONTROL_YAW_NEG;
-
-const U32 AGENT_CONTROL_NUDGE = AGENT_CONTROL_NUDGE_AT_POS
- | AGENT_CONTROL_NUDGE_AT_NEG
- | AGENT_CONTROL_NUDGE_LEFT_POS
- | AGENT_CONTROL_NUDGE_LEFT_NEG;
-
-
-// move these up so that we can hide them in "State" for object updates
-// (for now)
-const U32 AGENT_ATTACH_OFFSET = 4;
-const U32 AGENT_ATTACH_MASK = 0xf << AGENT_ATTACH_OFFSET;
-const U32 AGENT_ATTACH_CLEAR = 0x00;
-
-// RN: this method swaps the upper and lower nibbles to maintain backward
-// compatibility with old objects that only used the upper nibble
-#define ATTACHMENT_ID_FROM_STATE(state) ((S32)((((U8)state & AGENT_ATTACH_MASK) >> 4) | (((U8)state & ~AGENT_ATTACH_MASK) << 4)))
-
-// test state for use in testing grabbing the camera
-const U32 AGENT_CAMERA_OBJECT = 0x1 << 3;
-
-const F32 MAX_ATTACHMENT_DIST = 3.5f; // meters?
-
-#endif
diff --git a/indra/llcommon/llapp.h b/indra/llcommon/llapp.h
index afa06df23e..82df78a335 100755
--- a/indra/llcommon/llapp.h
+++ b/indra/llcommon/llapp.h
@@ -30,7 +30,6 @@
#include <map>
#include "llrun.h"
#include "llsd.h"
-#include "lloptioninterface.h"
// Forward declarations
template <typename Type> class LLAtomic32;
@@ -64,7 +63,7 @@ namespace google_breakpad {
class ExceptionHandler; // See exception_handler.h
}
-class LL_COMMON_API LLApp : public LLOptionInterface
+class LL_COMMON_API LLApp
{
friend class LLErrorThread;
public:
@@ -113,7 +112,7 @@ public:
* @param name The name of the option.
* @return Returns the option data.
*/
- virtual LLSD getOption(const std::string& name) const;
+ LLSD getOption(const std::string& name) const;
/**
* @brief Parse command line options and insert them into
diff --git a/indra/llcommon/llassettype.h b/indra/llcommon/llassettype.h
index 69b01731e5..5a95a58d93 100755
--- a/indra/llcommon/llassettype.h
+++ b/indra/llcommon/llassettype.h
@@ -29,8 +29,6 @@
#include <string>
-#include "stdenums.h" // for EDragAndDropType
-
class LL_COMMON_API LLAssetType
{
public:
diff --git a/indra/llcommon/llavatarconstants.h b/indra/llcommon/llavatarconstants.h
deleted file mode 100755
index f47f447b45..0000000000
--- a/indra/llcommon/llavatarconstants.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * @file llavatarconstants.h
- * @brief some useful short term constants for Indra
- *
- * $LicenseInfo:firstyear=2001&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_AVATAR_CONSTANTS_H
-#define LL_AVATAR_CONSTANTS_H
-
-// If this string is passed to dataserver in AvatarPropertiesUpdate
-// then no change is made to user.profile_web
-const char* const BLACKLIST_PROFILE_WEB_STR = "featureWebProfilesDisabled";
-
-// If profile web pages are feature blacklisted then this URL is
-// shown in the profile instead of the user's set URL
-const char* const BLACKLIST_PROFILE_WEB_URL = "http://secondlife.com/app/webdisabled";
-
-// Maximum number of avatar picks
-const S32 MAX_AVATAR_PICKS = 10;
-
-// 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
-
-char const* const VISIBILITY_DEFAULT = "default";
-char const* const VISIBILITY_HIDDEN = "hidden";
-char const* const VISIBILITY_VISIBLE = "visible";
-char const* const VISIBILITY_INVISIBLE = "invisible";
-
-#endif
-
diff --git a/indra/llcommon/bitpack.cpp b/indra/llcommon/llbitpack.cpp
index cdcaba0765..622a099945 100755
--- a/indra/llcommon/bitpack.cpp
+++ b/indra/llcommon/llbitpack.cpp
@@ -27,4 +27,4 @@
#include "linden_common.h"
// implementation is all in the header, this include dep ensures the unit test is rerun if the implementation changes.
-#include "bitpack.h"
+#include "llbitpack.h"
diff --git a/indra/llcommon/bitpack.h b/indra/llcommon/llbitpack.h
index 037300dd14..fea56a4f1f 100755
--- a/indra/llcommon/bitpack.h
+++ b/indra/llcommon/llbitpack.h
@@ -1,5 +1,5 @@
/**
- * @file bitpack.h
+ * @file llbitpack.h
* @brief Convert data to packed bit stream
*
* $LicenseInfo:firstyear=2000&license=viewerlgpl$
@@ -79,7 +79,7 @@ public:
*(mBuffer + mBufferSize++) = mLoad;
if (mBufferSize > mMaxSize)
{
- llerror("mBufferSize exceeding mMaxSize!", 0);
+ LL_ERRS() << "mBufferSize exceeding mMaxSize!" << LL_ENDL;
}
mLoadSize = 0;
mLoad = 0x00;
@@ -122,7 +122,7 @@ public:
*(mBuffer + mBufferSize++) = mLoad;
if (mBufferSize > mMaxSize)
{
- llerror("mBufferSize exceeding mMaxSize!", 0);
+ LL_ERRS() << "mBufferSize exceeding mMaxSize!" << LL_ENDL;
}
mLoadSize = 0;
mLoad = 0x00;
@@ -190,7 +190,7 @@ public:
*(mBuffer + mBufferSize++) = mLoad;
if (mBufferSize > mMaxSize)
{
- llerror("mBufferSize exceeding mMaxSize!", 0);
+ LL_ERRS() << "mBufferSize exceeding mMaxSize!" << LL_ENDL;
}
mLoadSize = 0;
}
diff --git a/indra/llcommon/llclickaction.h b/indra/llcommon/llclickaction.h
index 1f87d8eec3..2f83113af9 100755..100644
--- a/indra/llcommon/llclickaction.h
+++ b/indra/llcommon/llclickaction.h
@@ -27,15 +27,4 @@
#ifndef LL_LLCLICKACTION_H
#define LL_LLCLICKACTION_H
-// DO NOT CHANGE THE SEQUENCE OF THIS LIST!!
-const U8 CLICK_ACTION_NONE = 0;
-const U8 CLICK_ACTION_TOUCH = 0;
-const U8 CLICK_ACTION_SIT = 1;
-const U8 CLICK_ACTION_BUY = 2;
-const U8 CLICK_ACTION_PAY = 3;
-const U8 CLICK_ACTION_OPEN = 4;
-const U8 CLICK_ACTION_PLAY = 5;
-const U8 CLICK_ACTION_OPEN_MEDIA = 6;
-const U8 CLICK_ACTION_ZOOM = 7;
-// DO NOT CHANGE THE SEQUENCE OF THIS LIST!!
#endif
diff --git a/indra/llcommon/lldarray.h b/indra/llcommon/lldarray.h
deleted file mode 100755
index 131b819c99..0000000000
--- a/indra/llcommon/lldarray.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/**
- * @file lldarray.h
- * @brief Wrapped std::vector for backward compatibility.
- *
- * $LicenseInfo:firstyear=2001&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_LLDARRAY_H
-#define LL_LLDARRAY_H
-
-#include "llerror.h"
-
-#include <vector>
-#include <map>
-
-// class LLDynamicArray<>; // = std::vector + reserves <BlockSize> elements
-// class LLDynamicArrayIndexed<>; // = std::vector + std::map if indices, only supports operator[] and begin(),end()
-
-//--------------------------------------------------------
-// LLDynamicArray declaration
-//--------------------------------------------------------
-// NOTE: BlockSize is used to reserve a minimal initial amount
-template <typename Type, int BlockSize = 32>
-class LLDynamicArray : public std::vector<Type>
-{
-public:
- enum
- {
- OKAY = 0,
- FAIL = -1
- };
-
- LLDynamicArray(S32 size=0) : std::vector<Type>(size) { if (size < BlockSize) std::vector<Type>::reserve(BlockSize); }
-
- void reset() { std::vector<Type>::clear(); }
-
- // ACCESSORS
- const Type& get(S32 index) const { return std::vector<Type>::operator[](index); }
- Type& get(S32 index) { return std::vector<Type>::operator[](index); }
- S32 find(const Type &obj) const;
-
- S32 count() const { return std::vector<Type>::size(); }
- S32 getLength() const { return std::vector<Type>::size(); }
- S32 getMax() const { return std::vector<Type>::capacity(); }
-
- // MANIPULATE
- S32 put(const Type &obj); // add to end of array, returns index
-// Type* reserve(S32 num); // reserve a block of indices in advance
- Type* reserve_block(U32 num); // reserve a block of indices in advance
-
- S32 remove(S32 index); // remove by index, no bounds checking
- S32 removeObj(const Type &obj); // remove by object
- S32 removeLast();
-
- void operator+=(const LLDynamicArray<Type,BlockSize> &other);
-};
-
-//--------------------------------------------------------
-// LLDynamicArray implementation
-//--------------------------------------------------------
-
-template <typename Type,int BlockSize>
-inline S32 LLDynamicArray<Type,BlockSize>::find(const Type &obj) const
-{
- typename std::vector<Type>::const_iterator iter = std::find(this->begin(), this->end(), obj);
- if (iter != this->end())
- {
- return iter - this->begin();
- }
- return FAIL;
-}
-
-
-template <typename Type,int BlockSize>
-inline S32 LLDynamicArray<Type,BlockSize>::remove(S32 i)
-{
- // This is a fast removal by swapping with the last element
- S32 sz = this->size();
- if (i < 0 || i >= sz)
- {
- return FAIL;
- }
- if (i < sz-1)
- {
- this->operator[](i) = this->back();
- }
- this->pop_back();
- return i;
-}
-
-template <typename Type,int BlockSize>
-inline S32 LLDynamicArray<Type,BlockSize>::removeObj(const Type& obj)
-{
- typename std::vector<Type>::iterator iter = std::find(this->begin(), this->end(), obj);
- if (iter != this->end())
- {
- S32 res = iter - this->begin();
- typename std::vector<Type>::iterator last = this->end();
- --last;
- *iter = *last;
- this->pop_back();
- return res;
- }
- return FAIL;
-}
-
-template <typename Type,int BlockSize>
-inline S32 LLDynamicArray<Type,BlockSize>::removeLast()
-{
- if (!this->empty())
- {
- this->pop_back();
- return OKAY;
- }
- return FAIL;
-}
-
-template <typename Type,int BlockSize>
-inline Type* LLDynamicArray<Type,BlockSize>::reserve_block(U32 num)
-{
- U32 sz = this->size();
- this->resize(sz+num);
- return &(this->operator[](sz));
-}
-
-template <typename Type,int BlockSize>
-inline S32 LLDynamicArray<Type,BlockSize>::put(const Type &obj)
-{
- this->push_back(obj);
- return this->size() - 1;
-}
-
-template <typename Type,int BlockSize>
-inline void LLDynamicArray<Type,BlockSize>::operator+=(const LLDynamicArray<Type,BlockSize> &other)
-{
- insert(this->end(), other.begin(), other.end());
-}
-
-//--------------------------------------------------------
-// LLDynamicArrayIndexed declaration
-//--------------------------------------------------------
-
-template <typename Type, typename Key, int BlockSize = 32>
-class LLDynamicArrayIndexed
-{
-public:
- typedef typename std::vector<Type>::iterator iterator;
- typedef typename std::vector<Type>::const_iterator const_iterator;
- typedef typename std::vector<Type>::reverse_iterator reverse_iterator;
- typedef typename std::vector<Type>::const_reverse_iterator const_reverse_iterator;
- typedef typename std::vector<Type>::size_type size_type;
-protected:
- std::vector<Type> mVector;
- std::map<Key, U32> mIndexMap;
-
-public:
- LLDynamicArrayIndexed() { mVector.reserve(BlockSize); }
-
- iterator begin() { return mVector.begin(); }
- const_iterator begin() const { return mVector.begin(); }
- iterator end() { return mVector.end(); }
- const_iterator end() const { return mVector.end(); }
-
- reverse_iterator rbegin() { return mVector.rbegin(); }
- const_reverse_iterator rbegin() const { return mVector.rbegin(); }
- reverse_iterator rend() { return mVector.rend(); }
- const_reverse_iterator rend() const { return mVector.rend(); }
-
- void reset() { mVector.resize(0); mIndexMap.resize(0); }
- bool empty() const { return mVector.empty(); }
- size_type size() const { return mVector.size(); }
-
- Type& operator[](const Key& k)
- {
- typename std::map<Key, U32>::const_iterator iter = mIndexMap.find(k);
- if (iter == mIndexMap.end())
- {
- U32 n = mVector.size();
- mIndexMap[k] = n;
- mVector.push_back(Type());
- llassert(mVector.size() == mIndexMap.size());
- return mVector[n];
- }
- else
- {
- return mVector[iter->second];
- }
- }
-
- const_iterator find(const Key& k) const
- {
- typename std::map<Key, U32>::const_iterator iter = mIndexMap.find(k);
- if(iter == mIndexMap.end())
- {
- return mVector.end();
- }
- else
- {
- return mVector.begin() + iter->second;
- }
- }
-};
-
-#endif
diff --git a/indra/llcommon/lldeleteutils.h b/indra/llcommon/lldeleteutils.h
deleted file mode 100644
index f250dc3028..0000000000
--- a/indra/llcommon/lldeleteutils.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * @file lldeleteutils.h
- * @brief Utility functions to simplify some common pointer-munging idioms.
- *
- * $LicenseInfo:firstyear=2009&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_DELETE_UTILS_H
-#define LL_DELETE_UTILS_H
-
-// Simple utility functions to eventually replace the common 2-line
-// idiom scattered throughout the viewer codebase. Note that where
-// possible we would rather be using smart pointers of some sort.
-
-template <class T>
-inline void deleteAndClear(T*& ptr)
-{
- delete ptr;
- ptr = NULL;
-}
-
-template <class T>
-inline void deleteAndClearArray(T*& array_ptr)
-{
- delete[] array_ptr;
- array_ptr = NULL;
-}
-
-#endif
diff --git a/indra/llcommon/lldepthstack.h b/indra/llcommon/lldepthstack.h
index ac435a30fa..b65840d342 100755
--- a/indra/llcommon/lldepthstack.h
+++ b/indra/llcommon/lldepthstack.h
@@ -41,8 +41,6 @@ public:
: mCurrentDepth(0), mMaxDepth(0)
{}
- ~LLDepthStack() {}
-
void setDepth(U32 depth)
{
mMaxDepth = depth;
@@ -87,14 +85,7 @@ public:
{
return mStack.empty() ? NULL : mStack.back();
}
-
- void deleteAllData()
- {
- mCurrentDepth = 0;
- std::for_each(mStack.begin(), mStack.end(), DeletePointer());
- mStack.clear();
- }
-
+
void removeAllNodes()
{
mCurrentDepth = 0;
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 5b4be1ac80..947aa11e94 100755
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -96,7 +96,7 @@ namespace {
mFile.open(filename, llofstream::out | llofstream::app);
if (!mFile)
{
- llinfos << "Error setting log file to " << filename << llendl;
+ LL_INFOS() << "Error setting log file to " << filename << LL_ENDL;
}
}
@@ -113,8 +113,6 @@ namespace {
const std::string& message)
{
mFile << message << std::endl;
- // mFile.flush();
- // *FIX: should we do this?
}
private:
@@ -331,7 +329,7 @@ namespace
}
LLError::configure(configuration);
- llinfos << "logging reconfigured from " << filename() << llendl;
+ LL_INFOS() << "logging reconfigured from " << filename() << LL_ENDL;
return true;
}
@@ -495,14 +493,44 @@ namespace LLError
int line,
const std::type_info& class_info,
const char* function,
+ bool printOnce,
const char* broadTag,
- const char* narrowTag,
- bool printOnce)
- : mLevel(level), mFile(file), mLine(line),
- mClassInfo(class_info), mFunction(function),
- mCached(false), mShouldLog(false),
- mBroadTag(broadTag), mNarrowTag(narrowTag), mPrintOnce(printOnce)
- { }
+ const char* narrowTag)
+ : mLevel(level),
+ mFile(file),
+ mLine(line),
+ mClassInfo(class_info),
+ mFunction(function),
+ mCached(false),
+ mShouldLog(false),
+ mPrintOnce(printOnce),
+ mBroadTag(broadTag),
+ mNarrowTag(narrowTag)
+ {}
+
+ CallSite::CallSite(ELevel level,
+ const char* file,
+ int line,
+ const std::type_info& class_info,
+ const char* function,
+ bool printOnce,
+ const char* broadTag,
+ const char* narrowTag,
+ const char*,
+ ...)
+ : mLevel(level),
+ mFile(file),
+ mLine(line),
+ mClassInfo(class_info),
+ mFunction(function),
+ mCached(false),
+ mShouldLog(false),
+ mPrintOnce(printOnce),
+ mBroadTag(broadTag),
+ mNarrowTag(narrowTag)
+ {
+ LL_ERRS() << "No support for more than 2 logging tags" << LL_ENDL;
+ }
void CallSite::invalidate()
@@ -677,7 +705,7 @@ namespace LLError
LevelMap::const_iterator i = level_names.find(name);
if (i == level_names.end())
{
- llwarns << "unrecognized logging level: '" << name << "'" << llendl;
+ LL_WARNS() << "unrecognized logging level: '" << name << "'" << LL_ENDL;
return LLError::LEVEL_INFO;
}
@@ -741,6 +769,12 @@ namespace LLError
return false;
}
+ // virtual
+ bool Recorder::wantsTags()
+ {
+ return false;
+ }
+
void addRecorder(Recorder* recorder)
{
if (recorder == NULL)
@@ -817,11 +851,14 @@ namespace LLError
namespace
{
- void writeToRecorders(LLError::ELevel level, const std::string& message)
+ void writeToRecorders(const LLError::CallSite& site, const std::string& message)
{
+ LLError::ELevel level = site.mLevel;
LLError::Settings& s = LLError::Settings::get();
std::string messageWithTime;
+ std::string messageWithTags;
+ std::string messageWithTagsAndTime;
for (Recorders::const_iterator i = s.recorders.begin();
i != s.recorders.end();
@@ -829,18 +866,47 @@ namespace
{
LLError::Recorder* r = *i;
- if (r->wantsTime() && s.timeFunction != NULL)
+ if (r->wantsTime() && s.timeFunction != NULL)
{
- if (messageWithTime.empty())
+ if (r->wantsTags())
{
- messageWithTime = s.timeFunction() + " " + message;
+ if (messageWithTagsAndTime.empty())
+ {
+ messageWithTagsAndTime = s.timeFunction() + " "
+ + (site.mBroadTag ? (std::string("#") + std::string(site.mBroadTag) + " ") : std::string())
+ + (site.mNarrowTag ? (std::string("#") + std::string(site.mNarrowTag) + " ") : std::string())
+ + message;
+ }
+
+ r->recordMessage(level, messageWithTagsAndTime);
+ }
+ else
+ {
+ if (messageWithTime.empty())
+ {
+ messageWithTime = s.timeFunction() + " " + message;
+ }
+
+ r->recordMessage(level, messageWithTime);
}
-
- r->recordMessage(level, messageWithTime);
}
else
{
- r->recordMessage(level, message);
+ if (r->wantsTags())
+ {
+ if (messageWithTags.empty())
+ {
+ messageWithTags = (site.mBroadTag ? (std::string("#") + std::string(site.mBroadTag) + " ") : std::string())
+ + (site.mNarrowTag ? (std::string("#") + std::string(site.mNarrowTag) + " ") : std::string())
+ + message;
+ }
+
+ r->recordMessage(level, messageWithTags);
+ }
+ else
+ {
+ r->recordMessage(level, message);
+ }
}
}
}
@@ -1017,10 +1083,11 @@ namespace LLError
else
{
strncpy(message, out->str().c_str(), 127);
- message[127] = '\0' ;
+ message[127] = '\0';
}
Globals& g = Globals::get();
+
if (out == &g.messageStream)
{
g.messageStream.clear();
@@ -1031,7 +1098,7 @@ namespace LLError
{
delete out;
}
- return ;
+ return;
}
void Log::flush(std::ostringstream* out, const CallSite& site)
@@ -1063,7 +1130,7 @@ namespace LLError
fatalMessage << abbreviateFile(site.mFile)
<< "(" << site.mLine << ") : error";
- writeToRecorders(site.mLevel, fatalMessage.str());
+ writeToRecorders(site, fatalMessage.str());
}
@@ -1125,7 +1192,7 @@ namespace LLError
prefix << message;
message = prefix.str();
- writeToRecorders(site.mLevel, message);
+ writeToRecorders(site, message);
if (site.mLevel == LEVEL_ERROR && s.crashFunction)
{
@@ -1164,7 +1231,7 @@ namespace LLError
{
std::string::size_type i = 0;
std::string::size_type len = s.length();
- for ( ; i < len; i++ )
+ for (; i < len; i++ )
{
if (s[i] == old)
{
@@ -1235,8 +1302,8 @@ namespace LLError
namespace LLError
{
- char** LLCallStacks::sBuffer = NULL ;
- S32 LLCallStacks::sIndex = 0 ;
+ char** LLCallStacks::sBuffer = NULL;
+ S32 LLCallStacks::sIndex = 0;
#define SINGLE_THREADED 1
@@ -1312,34 +1379,34 @@ namespace LLError
if(!sBuffer)
{
- sBuffer = new char*[512] ;
- sBuffer[0] = new char[512 * 128] ;
- for(S32 i = 1 ; i < 512 ; i++)
+ sBuffer = new char*[512];
+ sBuffer[0] = new char[512 * 128];
+ for(S32 i = 1; i < 512; i++)
{
- sBuffer[i] = sBuffer[i-1] + 128 ;
+ sBuffer[i] = sBuffer[i-1] + 128;
}
- sIndex = 0 ;
+ sIndex = 0;
}
if(sIndex > 511)
{
- clear() ;
+ clear();
}
- strcpy(sBuffer[sIndex], function) ;
- sprintf(sBuffer[sIndex] + strlen(function), " line: %d ", line) ;
- sIndex++ ;
+ strcpy(sBuffer[sIndex], function);
+ sprintf(sBuffer[sIndex] + strlen(function), " line: %d ", line);
+ sIndex++;
- return ;
+ return;
}
//static
std::ostringstream* LLCallStacks::insert(const char* function, const int line)
{
std::ostringstream* _out = LLError::Log::out();
- *_out << function << " line " << line << " " ;
+ *_out << function << " line " << line << " ";
- return _out ;
+ return _out;
}
//static
@@ -1353,21 +1420,21 @@ namespace LLError
if(!sBuffer)
{
- sBuffer = new char*[512] ;
- sBuffer[0] = new char[512 * 128] ;
- for(S32 i = 1 ; i < 512 ; i++)
+ sBuffer = new char*[512];
+ sBuffer[0] = new char[512 * 128];
+ for(S32 i = 1; i < 512; i++)
{
- sBuffer[i] = sBuffer[i-1] + 128 ;
+ sBuffer[i] = sBuffer[i-1] + 128;
}
- sIndex = 0 ;
+ sIndex = 0;
}
if(sIndex > 511)
{
- clear() ;
+ clear();
}
- LLError::Log::flush(_out, sBuffer[sIndex++]) ;
+ LLError::Log::flush(_out, sBuffer[sIndex++]);
}
//static
@@ -1381,27 +1448,27 @@ namespace LLError
if(sIndex > 0)
{
- llinfos << " ************* PRINT OUT LL CALL STACKS ************* " << llendl ;
+ LL_INFOS() << " ************* PRINT OUT LL CALL STACKS ************* " << LL_ENDL;
while(sIndex > 0)
{
- sIndex-- ;
- llinfos << sBuffer[sIndex] << llendl ;
+ sIndex--;
+ LL_INFOS() << sBuffer[sIndex] << LL_ENDL;
}
- llinfos << " *************** END OF LL CALL STACKS *************** " << llendl ;
+ LL_INFOS() << " *************** END OF LL CALL STACKS *************** " << LL_ENDL;
}
if(sBuffer)
{
- delete[] sBuffer[0] ;
- delete[] sBuffer ;
- sBuffer = NULL ;
+ delete[] sBuffer[0];
+ delete[] sBuffer;
+ sBuffer = NULL;
}
}
//static
void LLCallStacks::clear()
{
- sIndex = 0 ;
+ sIndex = 0;
}
#if LL_WINDOWS
diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h
index ceff40e900..d7dc38a4c6 100755
--- a/indra/llcommon/llerror.h
+++ b/indra/llcommon/llerror.h
@@ -31,9 +31,66 @@
#include <sstream>
#include <typeinfo>
-#include "llerrorlegacy.h"
#include "stdtypes.h"
+#include "llpreprocessor.h"
+#include <boost/static_assert.hpp>
+
+const int LL_ERR_NOERR = 0;
+
+// Define one of these for different error levels in release...
+// #define RELEASE_SHOW_DEBUG // Define this if you want your release builds to show lldebug output.
+#define RELEASE_SHOW_INFO // Define this if you want your release builds to show llinfo output
+#define RELEASE_SHOW_WARN // Define this if you want your release builds to show llwarn output.
+
+#ifdef _DEBUG
+#define SHOW_DEBUG
+#define SHOW_WARN
+#define SHOW_INFO
+#define SHOW_ASSERT
+#else // _DEBUG
+
+#ifdef LL_RELEASE_WITH_DEBUG_INFO
+#define SHOW_ASSERT
+#endif // LL_RELEASE_WITH_DEBUG_INFO
+
+#ifdef RELEASE_SHOW_DEBUG
+#define SHOW_DEBUG
+#endif
+
+#ifdef RELEASE_SHOW_WARN
+#define SHOW_WARN
+#endif
+
+#ifdef RELEASE_SHOW_INFO
+#define SHOW_INFO
+#endif
+
+#ifdef RELEASE_SHOW_ASSERT
+#define SHOW_ASSERT
+#endif
+
+#endif // !_DEBUG
+
+#define llassert_always(func) if (LL_UNLIKELY(!(func))) LL_ERRS() << "ASSERT (" << #func << ")" << LL_ENDL;
+
+#ifdef SHOW_ASSERT
+#define llassert(func) llassert_always(func)
+#define llverify(func) llassert_always(func)
+#else
+#define llassert(func)
+#define llverify(func) do {if (func) {}} while(0)
+#endif
+
+#ifdef LL_WINDOWS
+#define LL_STATIC_ASSERT(func, msg) static_assert(func, msg)
+#define LL_BAD_TEMPLATE_INSTANTIATION(type, msg) static_assert(false, msg)
+#else
+#define LL_STATIC_ASSERT(func, msg) BOOST_STATIC_ASSERT(func)
+#define LL_BAD_TEMPLATE_INSTANTIATION(type, msg) BOOST_STATIC_ASSERT(sizeof(type) != 0 && false);
+#endif
+
+
/** Error Logging Facility
Information for most users:
@@ -121,26 +178,25 @@ namespace LLError
They are not intended for general use.
*/
- class CallSite;
+ struct CallSite;
class LL_COMMON_API Log
{
public:
static bool shouldLog(CallSite&);
static std::ostringstream* out();
- static void flush(std::ostringstream* out, char* message) ;
+ static void flush(std::ostringstream* out, char* message);
static void flush(std::ostringstream*, const CallSite&);
};
- class LL_COMMON_API CallSite
+ struct LL_COMMON_API CallSite
{
// Represents a specific place in the code where a message is logged
// This is public because it is used by the macros below. It is not
// intended for public use.
- public:
CallSite(ELevel, const char* file, int line,
- const std::type_info& class_info, const char* function, const char* broadTag, const char* narrowTag, bool printOnce);
-
+ const std::type_info& class_info, const char* function, bool printOnce, const char* broadTag = NULL, const char* narrowTag = NULL );
+
#ifdef LL_LIBRARY_INCLUDE
bool shouldLog();
#else // LL_LIBRARY_INCLUDE
@@ -151,7 +207,6 @@ namespace LLError
void invalidate();
- private:
// these describe the call site and never change
const ELevel mLevel;
const char* const mFile;
@@ -167,6 +222,11 @@ namespace LLError
bool mShouldLog;
friend class Log;
+
+ private:
+ // 3 or more tags not currently supported
+ CallSite(ELevel, const char* file, int line,
+ const std::type_info& class_info, const char* function, bool printOnce, const char* broadTag, const char* narrowTag, const char*, ...);
};
@@ -237,78 +297,64 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG;
// Outside a class declaration, or in class without LOG_CLASS(), this
// typedef causes the messages to not be associated with any class.
+/////////////////////////////////
+// Error Logging Macros
+// See top of file for common usage.
+/////////////////////////////////
+#define lllog(level, once, ...) \
+ do { \
+ static LLError::CallSite _site( \
+ level, __FILE__, __LINE__, typeid(_LL_CLASS_TO_LOG), __FUNCTION__, once, __VA_ARGS__ );\
+ if (LL_UNLIKELY(_site.shouldLog())) \
+ { \
+ std::ostringstream* _out = LLError::Log::out(); \
+ (*_out)
+//Use this construct if you need to do computation in the middle of a
+//message:
+//
+// LL_INFOS("AgentGesture") << "the agent " << agend_id;
+// switch (f)
+// {
+// case FOP_SHRUGS: LL_CONT << "shrugs"; break;
+// case FOP_TAPS: LL_CONT << "points at " << who; break;
+// case FOP_SAYS: LL_CONT << "says " << message; break;
+// }
+// LL_CONT << " for " << t << " seconds" << LL_ENDL;
+//
+//Such computation is done iff the message will be logged.
+#define LL_CONT (*_out)
+#define LL_NEWLINE '\n'
-/*
- Error Logging Macros
- See top of file for common usage.
-*/
-
-#define lllog(level, broadTag, narrowTag, once) \
- do { \
- static LLError::CallSite _site( \
- level, __FILE__, __LINE__, typeid(_LL_CLASS_TO_LOG), __FUNCTION__, broadTag, narrowTag, once);\
- if (LL_UNLIKELY(_site.shouldLog())) \
- { \
- std::ostringstream* _out = LLError::Log::out(); \
- (*_out)
-
-// DEPRECATED: Don't call directly, use LL_ENDL instead, which actually looks like a macro
-#define llendl \
- LLError::End(); \
+#define LL_ENDL \
+ LLError::End(); \
LLError::Log::flush(_out, _site); \
- } \
+ } \
} while(0)
-// DEPRECATED: Use the new macros that allow tags and *look* like macros.
-#define lldebugs lllog(LLError::LEVEL_DEBUG, NULL, NULL, false)
-#define llinfos lllog(LLError::LEVEL_INFO, NULL, NULL, false)
-#define llwarns lllog(LLError::LEVEL_WARN, NULL, NULL, false)
-#define llerrs lllog(LLError::LEVEL_ERROR, NULL, NULL, false)
-#define llcont (*_out)
-
// NEW Macros for debugging, allow the passing of a string tag
-// One Tag
-#define LL_DEBUGS(broadTag) lllog(LLError::LEVEL_DEBUG, broadTag, NULL, false)
-#define LL_INFOS(broadTag) lllog(LLError::LEVEL_INFO, broadTag, NULL, false)
-#define LL_WARNS(broadTag) lllog(LLError::LEVEL_WARN, broadTag, NULL, false)
-#define LL_ERRS(broadTag) lllog(LLError::LEVEL_ERROR, broadTag, NULL, false)
-// Two Tags
-#define LL_DEBUGS2(broadTag, narrowTag) lllog(LLError::LEVEL_DEBUG, broadTag, narrowTag, false)
-#define LL_INFOS2(broadTag, narrowTag) lllog(LLError::LEVEL_INFO, broadTag, narrowTag, false)
-#define LL_WARNS2(broadTag, narrowTag) lllog(LLError::LEVEL_WARN, broadTag, narrowTag, false)
-#define LL_ERRS2(broadTag, narrowTag) lllog(LLError::LEVEL_ERROR, broadTag, narrowTag, false)
+// Pass comma separated list of tags (currently only supports up to 0, 1, or 2)
+#define LL_DEBUGS(...) lllog(LLError::LEVEL_DEBUG, false, __VA_ARGS__)
+#define LL_INFOS(...) lllog(LLError::LEVEL_INFO, false, __VA_ARGS__)
+#define LL_WARNS(...) lllog(LLError::LEVEL_WARN, false, __VA_ARGS__)
+#define LL_ERRS(...) lllog(LLError::LEVEL_ERROR, false, __VA_ARGS__)
// Only print the log message once (good for warnings or infos that would otherwise
// spam the log file over and over, such as tighter loops).
-#define LL_DEBUGS_ONCE(broadTag) lllog(LLError::LEVEL_DEBUG, broadTag, NULL, true)
-#define LL_INFOS_ONCE(broadTag) lllog(LLError::LEVEL_INFO, broadTag, NULL, true)
-#define LL_WARNS_ONCE(broadTag) lllog(LLError::LEVEL_WARN, broadTag, NULL, true)
-#define LL_DEBUGS2_ONCE(broadTag, narrowTag) lllog(LLError::LEVEL_DEBUG, broadTag, narrowTag, true)
-#define LL_INFOS2_ONCE(broadTag, narrowTag) lllog(LLError::LEVEL_INFO, broadTag, narrowTag, true)
-#define LL_WARNS2_ONCE(broadTag, narrowTag) lllog(LLError::LEVEL_WARN, broadTag, narrowTag, true)
-
-#define LL_ENDL llendl
-#define LL_CONT (*_out)
+#define LL_DEBUGS_ONCE(...) lllog(LLError::LEVEL_DEBUG, true, __VA_ARGS__)
+#define LL_INFOS_ONCE(...) lllog(LLError::LEVEL_INFO, true, __VA_ARGS__)
+#define LL_WARNS_ONCE(...) lllog(LLError::LEVEL_WARN, true, __VA_ARGS__)
- /*
- Use this construct if you need to do computation in the middle of a
- message:
-
- LL_INFOS("AgentGesture") << "the agent " << agend_id;
- switch (f)
- {
- case FOP_SHRUGS: LL_CONT << "shrugs"; break;
- case FOP_TAPS: LL_CONT << "points at " << who; break;
- case FOP_SAYS: LL_CONT << "says " << message; break;
- }
- LL_CONT << " for " << t << " seconds" << LL_ENDL;
-
- Such computation is done iff the message will be logged.
- */
+// DEPRECATED: Use the new macros that allow tags and *look* like macros.
+#define lldebugs LL_DEBUGS()
+#define llinfos LL_INFOS()
+#define llwarns LL_WARNS()
+#define llerrs LL_ERRS()
+#define llcont LL_CONT
+#define llendl LL_ENDL
#endif // LL_LLERROR_H
diff --git a/indra/llcommon/llerrorcontrol.h b/indra/llcommon/llerrorcontrol.h
index 480654b1a2..7c9df57115 100755
--- a/indra/llcommon/llerrorcontrol.h
+++ b/indra/llcommon/llerrorcontrol.h
@@ -144,6 +144,10 @@ namespace LLError
virtual bool wantsTime(); // default returns false
// override and return true if the recorder wants the time string
// included in the text of the message
+
+ virtual bool wantsTags(); // default returns false
+ // override ands return true if the recorder wants the tags included
+ // in the text of the message
};
/**
diff --git a/indra/llcommon/llerrorlegacy.h b/indra/llcommon/llerrorlegacy.h
index 50c95339e4..31dd207008 100755
--- a/indra/llcommon/llerrorlegacy.h
+++ b/indra/llcommon/llerrorlegacy.h
@@ -28,100 +28,5 @@
#ifndef LL_LLERRORLEGACY_H
#define LL_LLERRORLEGACY_H
-#include "llpreprocessor.h"
-#include <boost/static_assert.hpp>
-
-/*
- LEGACY -- DO NOT USE THIS STUFF ANYMORE
-*/
-
-// Specific error codes
-const int LL_ERR_NOERR = 0;
-const int LL_ERR_ASSET_REQUEST_FAILED = -1;
-//const int LL_ERR_ASSET_REQUEST_INVALID = -2;
-const int LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE = -3;
-const int LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE = -4;
-const int LL_ERR_INSUFFICIENT_PERMISSIONS = -5;
-const int LL_ERR_EOF = -39;
-const int LL_ERR_CANNOT_OPEN_FILE = -42;
-const int LL_ERR_FILE_NOT_FOUND = -43;
-const int LL_ERR_FILE_EMPTY = -44;
-const int LL_ERR_TCP_TIMEOUT = -23016;
-const int LL_ERR_CIRCUIT_GONE = -23017;
-const int LL_ERR_PRICE_MISMATCH = -23018;
-
-
-
-// Define one of these for different error levels in release...
-// #define RELEASE_SHOW_DEBUG // Define this if you want your release builds to show lldebug output.
-#define RELEASE_SHOW_INFO // Define this if you want your release builds to show llinfo output
-#define RELEASE_SHOW_WARN // Define this if you want your release builds to show llwarn output.
-
-
-//////////////////////////////////////////
-//
-// Implementation - ignore
-//
-//
-#ifdef _DEBUG
-#define SHOW_DEBUG
-#define SHOW_WARN
-#define SHOW_INFO
-#define SHOW_ASSERT
-#else // _DEBUG
-
-#ifdef LL_RELEASE_WITH_DEBUG_INFO
-#define SHOW_ASSERT
-#endif // LL_RELEASE_WITH_DEBUG_INFO
-
-#ifdef RELEASE_SHOW_DEBUG
-#define SHOW_DEBUG
-#endif
-
-#ifdef RELEASE_SHOW_WARN
-#define SHOW_WARN
-#endif
-
-#ifdef RELEASE_SHOW_INFO
-#define SHOW_INFO
-#endif
-
-#ifdef RELEASE_SHOW_ASSERT
-#define SHOW_ASSERT
-#endif
-
-#endif // _DEBUG
-
-
-
-#define lldebugst(type) lldebugs
-#define llendflush llendl
-
-
-#define llerror(msg, num) llerrs << "Error # " << num << ": " << msg << llendl;
-
-#define llwarning(msg, num) llwarns << "Warning # " << num << ": " << msg << llendl;
-
-#define llassert_always(func) if (LL_UNLIKELY(!(func))) llerrs << "ASSERT (" << #func << ")" << llendl;
-
-#ifdef SHOW_ASSERT
-#define llassert(func) llassert_always(func)
-#define llverify(func) llassert_always(func)
-#else
-#define llassert(func)
-#define llverify(func) do {if (func) {}} while(0)
-#endif
-
-#ifdef LL_WINDOWS
-#define LL_STATIC_ASSERT(func, msg) static_assert(func, msg)
-#define LL_BAD_TEMPLATE_INSTANTIATION(type, msg) static_assert(false, msg)
-#else
-#define LL_STATIC_ASSERT(func, msg) BOOST_STATIC_ASSERT(func)
-#define LL_BAD_TEMPLATE_INSTANTIATION(type, msg) BOOST_STATIC_ASSERT(sizeof(type) != 0 && false);
-#endif
-
-// handy compile-time assert - enforce those template parameters!
-#define cassert(expn) typedef char __C_ASSERT__[(expn)?1:-1] /* Flawfinder: ignore */
- //XXX: used in two places in llcommon/llskipmap.h
#endif // LL_LLERRORLEGACY_H
diff --git a/indra/llcommon/llevents.h b/indra/llcommon/llevents.h
index 65b0fef354..0cbd1da32d 100755
--- a/indra/llcommon/llevents.h
+++ b/indra/llcommon/llevents.h
@@ -61,7 +61,7 @@
#include "llsd.h"
#include "llsingleton.h"
#include "lldependencies.h"
-#include "ll_template_cast.h"
+#include "llstl.h"
/*==========================================================================*|
// override this to allow binding free functions with more parameters
diff --git a/indra/llcommon/llframetimer.h b/indra/llcommon/llframetimer.h
index 45754f3785..7f61861072 100755
--- a/indra/llcommon/llframetimer.h
+++ b/indra/llcommon/llframetimer.h
@@ -35,7 +35,6 @@
*/
#include "lltimer.h"
-#include "timing.h"
class LL_COMMON_API LLFrameTimer
{
diff --git a/indra/llcommon/llindexedvector.h b/indra/llcommon/llindexedvector.h
new file mode 100755
index 0000000000..68c3821802
--- /dev/null
+++ b/indra/llcommon/llindexedvector.h
@@ -0,0 +1,100 @@
+/**
+ * @file lldarray.h
+ * @brief Wrapped std::vector for backward compatibility.
+ *
+ * $LicenseInfo:firstyear=2001&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_LLDARRAY_H
+#define LL_LLDARRAY_H
+
+#include "llerror.h"
+
+#include <vector>
+#include <map>
+
+//--------------------------------------------------------
+// LLIndexedVector
+//--------------------------------------------------------
+
+template <typename Type, typename Key, int BlockSize = 32>
+class LLIndexedVector
+{
+public:
+ typedef typename std::vector<Type>::iterator iterator;
+ typedef typename std::vector<Type>::const_iterator const_iterator;
+ typedef typename std::vector<Type>::reverse_iterator reverse_iterator;
+ typedef typename std::vector<Type>::const_reverse_iterator const_reverse_iterator;
+ typedef typename std::vector<Type>::size_type size_type;
+protected:
+ std::vector<Type> mVector;
+ std::map<Key, U32> mIndexMap;
+
+public:
+ LLIndexedVector() { mVector.reserve(BlockSize); }
+
+ iterator begin() { return mVector.begin(); }
+ const_iterator begin() const { return mVector.begin(); }
+ iterator end() { return mVector.end(); }
+ const_iterator end() const { return mVector.end(); }
+
+ reverse_iterator rbegin() { return mVector.rbegin(); }
+ const_reverse_iterator rbegin() const { return mVector.rbegin(); }
+ reverse_iterator rend() { return mVector.rend(); }
+ const_reverse_iterator rend() const { return mVector.rend(); }
+
+ void reset() { mVector.resize(0); mIndexMap.resize(0); }
+ bool empty() const { return mVector.empty(); }
+ size_type size() const { return mVector.size(); }
+
+ Type& operator[](const Key& k)
+ {
+ typename std::map<Key, U32>::const_iterator iter = mIndexMap.find(k);
+ if (iter == mIndexMap.end())
+ {
+ U32 n = mVector.size();
+ mIndexMap[k] = n;
+ mVector.push_back(Type());
+ llassert(mVector.size() == mIndexMap.size());
+ return mVector[n];
+ }
+ else
+ {
+ return mVector[iter->second];
+ }
+ }
+
+ const_iterator find(const Key& k) const
+ {
+ typename std::map<Key, U32>::const_iterator iter = mIndexMap.find(k);
+ if(iter == mIndexMap.end())
+ {
+ return mVector.end();
+ }
+ else
+ {
+ return mVector.begin() + iter->second;
+ }
+ }
+};
+
+#endif
diff --git a/indra/llcommon/llinitparam.cpp b/indra/llcommon/llinitparam.cpp
index dbd4eba7a0..aa2f4eb289 100755
--- a/indra/llcommon/llinitparam.cpp
+++ b/indra/llcommon/llinitparam.cpp
@@ -100,13 +100,13 @@ namespace LLInitParam
void Parser::parserWarning(const std::string& message)
{
if (mParseSilently) return;
- llwarns << message << llendl;
+ LL_WARNS() << message << LL_ENDL;
}
void Parser::parserError(const std::string& message)
{
if (mParseSilently) return;
- llerrs << message << llendl;
+ LL_ERRS() << message << LL_ENDL;
}
@@ -131,7 +131,7 @@ namespace LLInitParam
std::string name(char_name);
if ((size_t)param->mParamHandle > mMaxParamOffset)
{
- llerrs << "Attempted to register param with block defined for parent class, make sure to derive from LLInitParam::Block<YOUR_CLASS, PARAM_BLOCK_BASE_CLASS>" << llendl;
+ LL_ERRS() << "Attempted to register param with block defined for parent class, make sure to derive from LLInitParam::Block<YOUR_CLASS, PARAM_BLOCK_BASE_CLASS>" << LL_ENDL;
}
if (name.empty())
@@ -214,7 +214,7 @@ namespace LLInitParam
{
if (emit_errors)
{
- llwarns << "Invalid param \"" << getParamName(block_data, param) << "\"" << llendl;
+ LL_WARNS() << "Invalid param \"" << getParamName(block_data, param) << "\"" << LL_ENDL;
}
return false;
}
@@ -417,7 +417,7 @@ namespace LLInitParam
// Block<T, Base_Class>
if ((size_t)handle > block_data.mMaxParamOffset)
{
- llerrs << "Attempted to register param with block defined for parent class, make sure to derive from LLInitParam::Block<YOUR_CLASS, PARAM_BLOCK_BASE_CLASS>" << llendl;
+ LL_ERRS() << "Attempted to register param with block defined for parent class, make sure to derive from LLInitParam::Block<YOUR_CLASS, PARAM_BLOCK_BASE_CLASS>" << LL_ENDL;
}
ParamDescriptorPtr param_descriptor = findParamDescriptor(param);
diff --git a/indra/llcommon/llinstancetracker.h b/indra/llcommon/llinstancetracker.h
index f4e37d21fe..349ad530af 100755
--- a/indra/llcommon/llinstancetracker.h
+++ b/indra/llcommon/llinstancetracker.h
@@ -31,7 +31,7 @@
#include <map>
#include <typeinfo>
-#include "string_table.h"
+#include "llstringtable.h"
#include <boost/iterator/transform_iterator.hpp>
#include <boost/iterator/indirect_iterator.hpp>
diff --git a/indra/llcommon/lllinkedqueue.h b/indra/llcommon/lllinkedqueue.h
deleted file mode 100755
index 8336608809..0000000000
--- a/indra/llcommon/lllinkedqueue.h
+++ /dev/null
@@ -1,309 +0,0 @@
-/**
- * @file lllinkedqueue.h
- * @brief Declaration of linked queue classes.
- *
- * $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_LLLINKEDQUEUE_H
-#define LL_LLLINKEDQUEUE_H
-
-#include "llerror.h"
-
-// node that actually contains the data
-template <class DATA_TYPE> class LLLinkedQueueNode
-{
-public:
- DATA_TYPE mData;
- LLLinkedQueueNode *mNextp;
- LLLinkedQueueNode *mPrevp;
-
-
-public:
- LLLinkedQueueNode();
- LLLinkedQueueNode(const DATA_TYPE data);
-
- // destructor does not, by default, destroy associated data
- // however, the mDatap must be NULL to ensure that we aren't causing memory leaks
- ~LLLinkedQueueNode();
-};
-
-
-
-template <class DATA_TYPE> class LLLinkedQueue
-{
-
-public:
- LLLinkedQueue();
-
- // destructor destroys list and nodes, but not data in nodes
- ~LLLinkedQueue();
-
- // Puts at end of FIFO
- void push(const DATA_TYPE data);
-
- // Takes off front of FIFO
- BOOL pop(DATA_TYPE &data);
- BOOL peek(DATA_TYPE &data);
-
- void reset();
-
- S32 getLength() const;
-
- BOOL isEmpty() const;
-
- BOOL remove(const DATA_TYPE data);
-
- BOOL checkData(const DATA_TYPE data) const;
-
-private:
- // add node to end of list
- // set mCurrentp to mQueuep
- void addNodeAtEnd(LLLinkedQueueNode<DATA_TYPE> *nodep);
-
-private:
- LLLinkedQueueNode<DATA_TYPE> mHead; // head node
- LLLinkedQueueNode<DATA_TYPE> mTail; // tail node
- S32 mLength;
-};
-
-
-//
-// Nodes
-//
-
-template <class DATA_TYPE>
-LLLinkedQueueNode<DATA_TYPE>::LLLinkedQueueNode() :
- mData(), mNextp(NULL), mPrevp(NULL)
-{ }
-
-template <class DATA_TYPE>
-LLLinkedQueueNode<DATA_TYPE>::LLLinkedQueueNode(const DATA_TYPE data) :
- mData(data), mNextp(NULL), mPrevp(NULL)
-{ }
-
-template <class DATA_TYPE>
-LLLinkedQueueNode<DATA_TYPE>::~LLLinkedQueueNode()
-{ }
-
-
-//
-// Queue itself
-//
-
-template <class DATA_TYPE>
-LLLinkedQueue<DATA_TYPE>::LLLinkedQueue()
-: mHead(),
- mTail(),
- mLength(0)
-{ }
-
-
-// destructor destroys list and nodes, but not data in nodes
-template <class DATA_TYPE>
-LLLinkedQueue<DATA_TYPE>::~LLLinkedQueue()
-{
- reset();
-}
-
-
-// put data into a node and stick it at the end of the list
-template <class DATA_TYPE>
-void LLLinkedQueue<DATA_TYPE>::push(const DATA_TYPE data)
-{
- // make the new node
- LLLinkedQueueNode<DATA_TYPE> *nodep = new LLLinkedQueueNode<DATA_TYPE>(data);
-
- addNodeAtEnd(nodep);
-}
-
-
-// search the list starting at mHead.mNextp and remove the link with mDatap == data
-// set mCurrentp to mQueuep, or NULL if mQueuep points to node with mDatap == data
-// return TRUE if found, FALSE if not found
-template <class DATA_TYPE>
-BOOL LLLinkedQueue<DATA_TYPE>::remove(const DATA_TYPE data)
-{
- BOOL b_found = FALSE;
-
- LLLinkedQueueNode<DATA_TYPE> *currentp = mHead.mNextp;
-
- while (currentp)
- {
- if (currentp->mData == data)
- {
- b_found = TRUE;
-
- // if there is a next one, fix it
- if (currentp->mNextp)
- {
- currentp->mNextp->mPrevp = currentp->mPrevp;
- }
- else // we are at end of list
- {
- mTail.mPrevp = currentp->mPrevp;
- }
-
- // if there is a previous one, fix it
- if (currentp->mPrevp)
- {
- currentp->mPrevp->mNextp = currentp->mNextp;
- }
- else // we are at beginning of list
- {
- mHead.mNextp = currentp->mNextp;
- }
-
- // remove the node
- delete currentp;
- mLength--;
- break;
- }
- currentp = currentp->mNextp;
- }
-
- return b_found;
-}
-
-
-// remove all nodes from the list but do not delete associated data
-template <class DATA_TYPE>
-void LLLinkedQueue<DATA_TYPE>::reset()
-{
- LLLinkedQueueNode<DATA_TYPE> *currentp;
- LLLinkedQueueNode<DATA_TYPE> *nextp;
- currentp = mHead.mNextp;
-
- while (currentp)
- {
- nextp = currentp->mNextp;
- delete currentp;
- currentp = nextp;
- }
-
- // reset mHead and mCurrentp
- mHead.mNextp = NULL;
- mTail.mPrevp = NULL;
- mLength = 0;
-}
-
-template <class DATA_TYPE>
-S32 LLLinkedQueue<DATA_TYPE>::getLength() const
-{
- return mLength;
-}
-
-template <class DATA_TYPE>
-BOOL LLLinkedQueue<DATA_TYPE>::isEmpty() const
-{
- return mLength <= 0;
-}
-
-// check to see if data is in list
-// set mCurrentp and mQueuep to the target of search if found, otherwise set mCurrentp to mQueuep
-// return TRUE if found, FALSE if not found
-template <class DATA_TYPE>
-BOOL LLLinkedQueue<DATA_TYPE>::checkData(const DATA_TYPE data) const
-{
- LLLinkedQueueNode<DATA_TYPE> *currentp = mHead.mNextp;
-
- while (currentp)
- {
- if (currentp->mData == data)
- {
- return TRUE;
- }
- currentp = currentp->mNextp;
- }
- return FALSE;
-}
-
-template <class DATA_TYPE>
-BOOL LLLinkedQueue<DATA_TYPE>::pop(DATA_TYPE &data)
-{
- LLLinkedQueueNode<DATA_TYPE> *currentp;
-
- currentp = mHead.mNextp;
- if (!currentp)
- {
- return FALSE;
- }
-
- mHead.mNextp = currentp->mNextp;
- if (currentp->mNextp)
- {
- currentp->mNextp->mPrevp = currentp->mPrevp;
- }
- else
- {
- mTail.mPrevp = currentp->mPrevp;
- }
-
- data = currentp->mData;
- delete currentp;
- mLength--;
- return TRUE;
-}
-
-template <class DATA_TYPE>
-BOOL LLLinkedQueue<DATA_TYPE>::peek(DATA_TYPE &data)
-{
- LLLinkedQueueNode<DATA_TYPE> *currentp;
-
- currentp = mHead.mNextp;
- if (!currentp)
- {
- return FALSE;
- }
- data = currentp->mData;
- return TRUE;
-}
-
-
-//////////////////////////////////////////////////////////////////////////////////////////
-// private members
-//////////////////////////////////////////////////////////////////////////////////////////
-
-
-// add node to end of list
-// set mCurrentp to mQueuep
-template <class DATA_TYPE>
-void LLLinkedQueue<DATA_TYPE>::addNodeAtEnd(LLLinkedQueueNode<DATA_TYPE> *nodep)
-{
- // add the node to the end of the list
- nodep->mNextp = NULL;
- nodep->mPrevp = mTail.mPrevp;
- mTail.mPrevp = nodep;
-
- // if there's something in the list, fix its back pointer
- if (nodep->mPrevp)
- {
- nodep->mPrevp->mNextp = nodep;
- }
- else // otherwise fix the head node
- {
- mHead.mNextp = nodep;
- }
- mLength++;
-}
-
-#endif
diff --git a/indra/llcommon/lllog.cpp b/indra/llcommon/lllog.cpp
deleted file mode 100755
index fc4058b5c9..0000000000
--- a/indra/llcommon/lllog.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * @file lllog.cpp
- * @author Don
- * @date 2007-11-27
- * @brief Class to log messages to syslog for streambase to process.
- *
- * $LicenseInfo:firstyear=2007&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$
- */
-
-#include "linden_common.h"
-#include "lllog.h"
-
-#include "llapp.h"
-#include "llsd.h"
-#include "llsdserialize.h"
-
-
-class LLLogImpl
-{
-public:
- LLLogImpl(LLApp* app) : mApp(app) {}
- ~LLLogImpl() {}
-
- void log(const std::string &message, LLSD& info);
- bool useLegacyLogMessage(const std::string &message);
-
-private:
- LLApp* mApp;
-};
-
-
-//@brief Function to log a message to syslog for streambase to collect.
-void LLLogImpl::log(const std::string &message, LLSD& info)
-{
- static S32 sequence = 0;
- LLSD log_config = mApp->getOption("log-messages");
- if (log_config.has(message))
- {
- LLSD message_config = log_config[message];
- if (message_config.has("use-syslog"))
- {
- if (! message_config["use-syslog"].asBoolean())
- {
- return;
- }
- }
- }
- llinfos << "LLLOGMESSAGE (" << (sequence++) << ") " << message
- << " " << LLSDNotationStreamer(info) << llendl;
-}
-
-//@brief Function to check if specified legacy log message should be sent.
-bool LLLogImpl::useLegacyLogMessage(const std::string &message)
-{
- LLSD log_config = mApp->getOption("log-messages");
- if (log_config.has(message))
- {
- LLSD message_config = log_config[message];
- if (message_config.has("use-legacy"))
- {
- return message_config["use-legacy"].asBoolean();
- }
- }
- return true;
-}
-
-
-LLLog::LLLog(LLApp* app)
-{
- mImpl = new LLLogImpl(app);
-}
-
-LLLog::~LLLog()
-{
- delete mImpl;
- mImpl = NULL;
-}
-
-void LLLog::log(const std::string &message, LLSD& info)
-{
- if (mImpl) mImpl->log(message, info);
-}
-
-bool LLLog::useLegacyLogMessage(const std::string &message)
-{
- if (mImpl)
- {
- return mImpl->useLegacyLogMessage(message);
- }
- return true;
-}
-
diff --git a/indra/llcommon/lllog.h b/indra/llcommon/lllog.h
deleted file mode 100755
index 7964412e83..0000000000
--- a/indra/llcommon/lllog.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * @file lllog.h
- * @author Don
- * @date 2007-11-27
- * @brief Class to log messages to syslog for streambase to process.
- *
- * $LicenseInfo:firstyear=2007&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_LLLOG_H
-#define LL_LLLOG_H
-
-#include <string>
-
-class LLLogImpl;
-class LLApp;
-class LLSD;
-
-class LL_COMMON_API LLLog
-{
-public:
- LLLog(LLApp* app);
- virtual ~LLLog();
-
- virtual void log(const std::string &message, LLSD& info);
- virtual bool useLegacyLogMessage(const std::string &message);
-
-private:
- LLLogImpl* mImpl;
-};
-
-#endif /* LL_LLLOG_H */
-
diff --git a/indra/llcommon/llmap.h b/indra/llcommon/llmap.h
deleted file mode 100755
index 6294a15d3b..0000000000
--- a/indra/llcommon/llmap.h
+++ /dev/null
@@ -1,245 +0,0 @@
-/**
- * @file llmap.h
- * @brief LLMap class header file
- *
- * $LicenseInfo:firstyear=2001&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_LLMAP_H
-#define LL_LLMAP_H
-
-// llmap uses the fast stl library code in a manner consistant with LLSkipMap, et. al.
-
-template<class INDEX_TYPE, class MAPPED_TYPE> class LLMap
-{
-private:
- typedef typename std::map<INDEX_TYPE, MAPPED_TYPE> stl_map_t;
- typedef typename stl_map_t::iterator stl_iter_t;
- typedef typename stl_map_t::value_type stl_value_t;
-
- stl_map_t mStlMap;
- stl_iter_t mCurIter; // *iterator = pair<const INDEX_TYPE, MAPPED_TYPE>
- MAPPED_TYPE dummy_data;
- INDEX_TYPE dummy_index;
-
-public:
- LLMap() : mStlMap()
- {
- memset((void*)(&dummy_data), 0x0, sizeof(MAPPED_TYPE));
- memset((void*)(&dummy_index), 0x0, sizeof(INDEX_TYPE));
- mCurIter = mStlMap.begin();
- }
- ~LLMap()
- {
- mStlMap.clear();
- }
-
- // use these functions to itterate through a list
- void resetMap()
- {
- mCurIter = mStlMap.begin();
- }
-
- // get the current data and bump mCurrentp
- // This is kind of screwy since it returns a reference;
- // We have to have a dummy value for when we reach the end
- // or in case we have an empty list. Presumably, this value
- // will initialize to some NULL value that will end the iterator.
- // We really shouldn't be using getNextData() or getNextKey() anyway...
- MAPPED_TYPE &getNextData()
- {
- if (mCurIter == mStlMap.end())
- {
- return dummy_data;
- }
- else
- {
- return (*mCurIter++).second;
- }
- }
-
- const INDEX_TYPE &getNextKey()
- {
- if (mCurIter == mStlMap.end())
- {
- return dummy_index;
- }
- else
- {
- return (*mCurIter++).first;
- }
- }
-
- MAPPED_TYPE &getFirstData()
- {
- resetMap();
- return getNextData();
- }
-
- const INDEX_TYPE &getFirstKey()
- {
- resetMap();
- return getNextKey();
- }
-
- S32 getLength()
- {
- return mStlMap.size();
- }
-
- void addData(const INDEX_TYPE &index, MAPPED_TYPE pointed_to)
- {
- mStlMap.insert(stl_value_t(index, pointed_to));
- }
-
- void addData(const INDEX_TYPE &index)
- {
- mStlMap.insert(stl_value_t(index, dummy_data));
- }
-
- // if index doesn't exist, then insert a new node and return it
- MAPPED_TYPE &getData(const INDEX_TYPE &index)
- {
- std::pair<stl_iter_t, bool> res;
- res = mStlMap.insert(stl_value_t(index, dummy_data));
- return res.first->second;
- }
-
- // if index doesn't exist, then insert a new node, return it, and set b_new_entry to true
- MAPPED_TYPE &getData(const INDEX_TYPE &index, BOOL &b_new_entry)
- {
- std::pair<stl_iter_t, bool> res;
- res = mStlMap.insert(stl_value_t(index, dummy_data));
- b_new_entry = res.second;
- return res.first->second;
- }
-
- // If there, returns the data.
- // If not, returns NULL.
- // Never adds entries to the map.
- MAPPED_TYPE getIfThere(const INDEX_TYPE &index)
- {
- stl_iter_t iter;
- iter = mStlMap.find(index);
- if (iter == mStlMap.end())
- {
- return (MAPPED_TYPE)0;
- }
- else
- {
- return (*iter).second;
- }
- }
-
-
- // if index doesn't exist, then make a new node and return it
- MAPPED_TYPE &operator[](const INDEX_TYPE &index)
- {
- return getData(index);
- }
-
- // do a reverse look-up, return NULL if failed
- INDEX_TYPE reverseLookup(const MAPPED_TYPE data)
- {
- stl_iter_t iter;
- stl_iter_t end_iter;
- iter = mStlMap.begin();
- end_iter = mStlMap.end();
- while (iter != end_iter)
- {
- if ((*iter).second == data)
- return (*iter).first;
- iter++;
- }
- return (INDEX_TYPE)0;
- }
-
- BOOL removeData(const INDEX_TYPE &index)
- {
- mCurIter = mStlMap.find(index);
- if (mCurIter == mStlMap.end())
- {
- return FALSE;
- }
- else
- {
- stl_iter_t iter = mCurIter++; // incrament mCurIter to the next element
- mStlMap.erase(iter);
- return TRUE;
- }
- }
-
- // does this index exist?
- BOOL checkData(const INDEX_TYPE &index)
- {
- stl_iter_t iter;
- iter = mStlMap.find(index);
- if (iter == mStlMap.end())
- {
- return FALSE;
- }
- else
- {
- mCurIter = iter;
- return TRUE;
- }
- }
-
- BOOL deleteData(const INDEX_TYPE &index)
- {
- mCurIter = mStlMap.find(index);
- if (mCurIter == mStlMap.end())
- {
- return FALSE;
- }
- else
- {
- stl_iter_t iter = mCurIter++; // incrament mCurIter to the next element
- delete (*iter).second;
- mStlMap.erase(iter);
- return TRUE;
- }
- }
-
- void deleteAllData()
- {
- stl_iter_t iter;
- stl_iter_t end_iter;
- iter = mStlMap.begin();
- end_iter = mStlMap.end();
- while (iter != end_iter)
- {
- delete (*iter).second;
- iter++;
- }
- mStlMap.clear();
- mCurIter = mStlMap.end();
- }
-
- void removeAllData()
- {
- mStlMap.clear();
- }
-};
-
-
-#endif
diff --git a/indra/llcommon/llnametable.h b/indra/llcommon/llnametable.h
deleted file mode 100755
index d3283543f3..0000000000
--- a/indra/llcommon/llnametable.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * @file llnametable.h
- * @brief LLNameTable class is a table to associate pointers with string names
- *
- * $LicenseInfo:firstyear=2000&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_LLNAMETABLE_H
-#define LL_LLNAMETABLE_H
-
-#include <map>
-
-#include "string_table.h"
-
-template <class DATA>
-class LLNameTable
-{
-public:
- LLNameTable()
- : mNameMap()
- {
- }
-
- ~LLNameTable()
- {
- }
-
- void addEntry(const std::string& name, DATA data)
- {
- addEntry(name.c_str(), data);
- }
-
- void addEntry(const char *name, DATA data)
- {
- char *tablename = gStringTable.addString(name);
- mNameMap[tablename] = data;
- }
-
- BOOL checkName(const std::string& name) const
- {
- return checkName(name.c_str());
- }
-
- // "logically const" even though it modifies the global nametable
- BOOL checkName(const char *name) const
- {
- char *tablename = gStringTable.addString(name);
- return mNameMap.count(tablename) ? TRUE : FALSE;
- }
-
- DATA resolveName(const std::string& name) const
- {
- return resolveName(name.c_str());
- }
-
- // "logically const" even though it modifies the global nametable
- DATA resolveName(const char *name) const
- {
- char *tablename = gStringTable.addString(name);
- const_iter_t iter = mNameMap.find(tablename);
- if (iter != mNameMap.end())
- return iter->second;
- else
- return 0;
- }
-
- // O(N)! (currently only used in one place... (newsim/llstate.cpp))
- const char *resolveData(const DATA &data) const
- {
- const_iter_t iter = mNameMap.begin();
- const_iter_t end = mNameMap.end();
- for (; iter != end; ++iter)
- {
- if (iter->second == data)
- return iter->first;
- }
- return NULL;
- }
-
- typedef std::map<const char *, DATA> name_map_t;
- typedef typename std::map<const char *,DATA>::iterator iter_t;
- typedef typename std::map<const char *,DATA>::const_iterator const_iter_t;
- name_map_t mNameMap;
-};
-
-#endif
diff --git a/indra/llcommon/lloptioninterface.cpp b/indra/llcommon/lloptioninterface.cpp
deleted file mode 100755
index 23fae76dc0..0000000000
--- a/indra/llcommon/lloptioninterface.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * @file lloptioninterface.cpp
- * @brief
- *
- * $LicenseInfo:firstyear=2009&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$
- */
-
-#include "lloptioninterface.h"
-
-
-LLOptionInterface::~LLOptionInterface()
-{
-
-}
diff --git a/indra/llcommon/lloptioninterface.h b/indra/llcommon/lloptioninterface.h
deleted file mode 100755
index 93b465db32..0000000000
--- a/indra/llcommon/lloptioninterface.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * @file lloptioninterface.h
- * @brief
- *
- * $LicenseInfo:firstyear=2009&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_LLOPTIONINTERFACE_H
-#define LL_LLOPTIONINTERFACE_H
-
-#include "linden_common.h"
-
-class LLSD;
-class LLOptionInterface
-{
-public:
- virtual ~LLOptionInterface() = 0;
- virtual LLSD getOption(const std::string& name) const = 0;
-};
-
-#endif
diff --git a/indra/llcommon/llsecondlifeurls.cpp b/indra/llcommon/llsecondlifeurls.cpp
deleted file mode 100755
index 9154e05e43..0000000000
--- a/indra/llcommon/llsecondlifeurls.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * @file llsecondlifeurls.cpp
- * @brief Urls used in the product
- *
- * $LicenseInfo:firstyear=2005&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$
- */
-
-#include "linden_common.h"
-#include "llsecondlifeurls.h"
-/*
-const std::string CREATE_ACCOUNT_URL (
- "http://join.secondlife.com/");
-
-const std::string MANAGE_ACCOUNT (
- "http://secondlife.com/account/"); // *TODO: NOT USED
-
-const std::string AUCTION_URL (
- "http://secondlife.com/auctions/auction-detail.php?id=");
-
-const std::string EVENTS_URL (
- "http://secondlife.com/events/");
-*/
-const std::string TIER_UP_URL (
- "http://secondlife.com/app/landtier"); // *TODO: Translate (simulator)
-
-const std::string DIRECTX_9_URL (
- "http://secondlife.com/support/"); // *TODO: NOT USED
-/*
-const std::string LAND_URL (
- "http://secondlife.com/app/landtier"); // *TODO: NOT USED
-
-const std::string UPGRADE_TO_PREMIUM_URL (
- "http://secondlife.com/app/upgrade/"); // *TODO: NOT USED
-
-const std::string AMD_AGP_URL (
- "http://secondlife.com/support/"); // *TODO: NOT USED
-
-const std::string VIA_URL (
- "http://secondlife.com/support/"); // *TODO: NOT USED
-
-const std::string SUPPORT_URL (
- "http://secondlife.com/support/");
-
-const std::string INTEL_CHIPSET_URL (
- "http://secondlife.com/support/"); // *TODO: NOT USED
-
-const std::string SIS_CHIPSET_URL (
- "http://secondlife.com/support/"); // *TODO: NOT USED
-
-const std::string BLOGS_URL (
- "http://blog.secondlife.com/"); // *TODO: NOT USED
-
-const std::string BUY_CURRENCY_URL (
- "http://secondlife.com/app/currency/");
-
-const std::string LSL_DOC_URL (
- "http://secondlife.com/app/lsldoc/"); // *TODO: NOT USED
-
-const std::string SL_KB_URL (
- "http://secondlife.com/knowledgebase/"); // *TODO: NOT USED
-
-const std::string RELEASE_NOTES_BASE_URL (
- "http://secondlife.com/app/releasenotes/");
-*/
-
diff --git a/indra/llcommon/llsecondlifeurls.h b/indra/llcommon/llsecondlifeurls.h
deleted file mode 100755
index 62f357ffed..0000000000
--- a/indra/llcommon/llsecondlifeurls.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * @file llsecondlifeurls.h
- * @brief Global URLs to pages on our web site
- *
- * $LicenseInfo:firstyear=2004&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_LLSECONDLIFEURLS_H
-#define LL_LLSECONDLIFEURLS_H
-/*
-// Account registration web page
-LL_COMMON_API extern const std::string CREATE_ACCOUNT_URL;
-
-// Manage Account
-LL_COMMON_API extern const std::string MANAGE_ACCOUNT;
-
-LL_COMMON_API extern const std::string AUCTION_URL;
-
-LL_COMMON_API extern const std::string EVENTS_URL;
-*/
-// Tier up to a new land level.
-LL_COMMON_API extern const std::string TIER_UP_URL;
-
-
-// Tier up to a new land level.
-LL_COMMON_API extern const std::string LAND_URL;
-
-// How to get DirectX 9
-LL_COMMON_API extern const std::string DIRECTX_9_URL;
-
-/*
-// Upgrade from basic membership to premium membership
-LL_COMMON_API extern const std::string UPGRADE_TO_PREMIUM_URL;
-
-
-// Out of date VIA chipset
-LL_COMMON_API extern const std::string VIA_URL;
-
-// Support URL
-LL_COMMON_API extern const std::string SUPPORT_URL;
-
-// Linden Blogs page
-LL_COMMON_API extern const std::string BLOGS_URL;
-
-// Currency page
-LL_COMMON_API extern const std::string BUY_CURRENCY_URL;
-
-// LSL script wiki
-LL_COMMON_API extern const std::string LSL_DOC_URL;
-
-// SL KnowledgeBase page
-LL_COMMON_API extern const std::string SL_KB_URL;
-
-// Release Notes Redirect URL for Server and Viewer
-LL_COMMON_API extern const std::string RELEASE_NOTES_BASE_URL;
-*/
-#endif
diff --git a/indra/llcommon/llstatenums.h b/indra/llcommon/llstatenums.h
index ab9b6709e8..6515a3e3cb 100755..100644
--- a/indra/llcommon/llstatenums.h
+++ b/indra/llcommon/llstatenums.h
@@ -26,50 +26,6 @@
#ifndef LL_LLSTATENUMS_H
#define LL_LLSTATENUMS_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
-};
#endif
diff --git a/indra/llcommon/llstl.h b/indra/llcommon/llstl.h
index 424138dad1..143e71f40c 100755
--- a/indra/llcommon/llstl.h
+++ b/indra/llcommon/llstl.h
@@ -33,7 +33,6 @@
#include <vector>
#include <list>
#include <set>
-#include <deque>
#include <typeinfo>
// Use to compare the first element only of a pair
@@ -125,7 +124,7 @@ struct DeletePairedPointerArray
// compiler, the second unary_function template parameter can be set
// to void.
//
-// Here's a snippit showing how you use this object:
+// Here's a snippet showing how you use this object:
//
// typedef std::map<int, widget*> map_type;
// map_type widget_map;
@@ -170,6 +169,49 @@ struct CopyNewPointer
}
};
+template<typename T, typename ALLOC>
+void delete_and_clear(std::list<T*, ALLOC>& list)
+{
+ std::for_each(list.begin(), list.end(), DeletePointer());
+ list.clear();
+}
+
+template<typename T, typename ALLOC>
+void delete_and_clear(std::vector<T*, ALLOC>& vector)
+{
+ std::for_each(vector.begin(), vector.end(), DeletePointer());
+ vector.clear();
+}
+
+template<typename T, typename COMPARE, typename ALLOC>
+void delete_and_clear(std::set<T*, COMPARE, ALLOC>& set)
+{
+ std::for_each(set.begin(), set.end(), DeletePointer());
+ set.clear();
+}
+
+template<typename K, typename V, typename COMPARE, typename ALLOC>
+void delete_and_clear(std::map<K, V*, COMPARE, ALLOC>& map)
+{
+ std::for_each(map.begin(), map.end(), DeletePairedPointer());
+ map.clear();
+}
+
+template<typename T>
+void delete_and_clear(T*& ptr)
+{
+ delete ptr;
+ ptr = NULL;
+}
+
+
+template<typename T>
+void delete_and_clear_array(T*& ptr)
+{
+ delete[] ptr;
+ ptr = NULL;
+}
+
// Simple function to help with finding pointers in maps.
// For example:
// typedef map_t;
@@ -229,7 +271,6 @@ inline T get_if_there(const std::map<K,T>& inmap, const K& key, T default_value)
}
};
-// Useful for replacing the removeObj() functionality of LLDynamicArray
// Example:
// for (std::vector<T>::iterator iter = mList.begin(); iter != mList.end(); )
// {
@@ -238,8 +279,8 @@ inline T get_if_there(const std::map<K,T>& inmap, const K& key, T default_value)
// else
// ++iter;
// }
-template <typename T, typename Iter>
-inline Iter vector_replace_with_last(std::vector<T>& invec, Iter iter)
+template <typename T>
+inline typename std::vector<T>::iterator vector_replace_with_last(std::vector<T>& invec, typename std::vector<T>::iterator iter)
{
typename std::vector<T>::iterator last = invec.end(); --last;
if (iter == invec.end())
@@ -259,7 +300,6 @@ inline Iter vector_replace_with_last(std::vector<T>& invec, Iter iter)
}
};
-// Useful for replacing the removeObj() functionality of LLDynamicArray
// Example:
// vector_replace_with_last(mList, x);
template <typename T>
@@ -522,4 +562,151 @@ namespace std
};
} // std
+
+/**
+ * Implementation for ll_template_cast() (q.v.).
+ *
+ * Default implementation: trying to cast two completely unrelated types
+ * returns 0. Typically you'd specify T and U as pointer types, but in fact T
+ * can be any type that can be initialized with 0.
+ */
+template <typename T, typename U>
+struct ll_template_cast_impl
+{
+ T operator()(U)
+ {
+ return 0;
+ }
+};
+
+/**
+ * ll_template_cast<T>(some_value) is for use in a template function when
+ * some_value might be of arbitrary type, but you want to recognize type T
+ * specially.
+ *
+ * It's designed for use with pointer types. Example:
+ * @code
+ * struct SpecialClass
+ * {
+ * void someMethod(const std::string&) const;
+ * };
+ *
+ * template <class REALCLASS>
+ * void somefunc(const REALCLASS& instance)
+ * {
+ * const SpecialClass* ptr = ll_template_cast<const SpecialClass*>(&instance);
+ * if (ptr)
+ * {
+ * ptr->someMethod("Call method only available on SpecialClass");
+ * }
+ * }
+ * @endcode
+ *
+ * Why is this better than dynamic_cast<>? Because unless OtherClass is
+ * polymorphic, the following won't even compile (gcc 4.0.1):
+ * @code
+ * OtherClass other;
+ * SpecialClass* ptr = dynamic_cast<SpecialClass*>(&other);
+ * @endcode
+ * to say nothing of this:
+ * @code
+ * void function(int);
+ * SpecialClass* ptr = dynamic_cast<SpecialClass*>(&function);
+ * @endcode
+ * ll_template_cast handles these kinds of cases by returning 0.
+ */
+template <typename T, typename U>
+T ll_template_cast(U value)
+{
+ return ll_template_cast_impl<T, U>()(value);
+}
+
+/**
+ * Implementation for ll_template_cast() (q.v.).
+ *
+ * Implementation for identical types: return same value.
+ */
+template <typename T>
+struct ll_template_cast_impl<T, T>
+{
+ T operator()(T value)
+ {
+ return value;
+ }
+};
+
+/**
+ * LL_TEMPLATE_CONVERTIBLE(dest, source) asserts that, for a value @c s of
+ * type @c source, <tt>ll_template_cast<dest>(s)</tt> will return @c s --
+ * presuming that @c source can be converted to @c dest by the normal rules of
+ * C++.
+ *
+ * By default, <tt>ll_template_cast<dest>(s)</tt> will return 0 unless @c s's
+ * type is literally identical to @c dest. (This is because of the
+ * straightforward application of template specialization rules.) That can
+ * lead to surprising results, e.g.:
+ *
+ * @code
+ * Foo myFoo;
+ * const Foo* fooptr = ll_template_cast<const Foo*>(&myFoo);
+ * @endcode
+ *
+ * Here @c fooptr will be 0 because <tt>&myFoo</tt> is of type <tt>Foo*</tt>
+ * -- @em not <tt>const Foo*</tt>. (Declaring <tt>const Foo myFoo;</tt> would
+ * force the compiler to do the right thing.)
+ *
+ * More disappointingly:
+ * @code
+ * struct Base {};
+ * struct Subclass: public Base {};
+ * Subclass object;
+ * Base* ptr = ll_template_cast<Base*>(&object);
+ * @endcode
+ *
+ * Here @c ptr will be 0 because <tt>&object</tt> is of type
+ * <tt>Subclass*</tt> rather than <tt>Base*</tt>. We @em want this cast to
+ * succeed, but without our help ll_template_cast can't recognize it.
+ *
+ * The following would suffice:
+ * @code
+ * LL_TEMPLATE_CONVERTIBLE(Base*, Subclass*);
+ * ...
+ * Base* ptr = ll_template_cast<Base*>(&object);
+ * @endcode
+ *
+ * However, as noted earlier, this is easily fooled:
+ * @code
+ * const Base* ptr = ll_template_cast<const Base*>(&object);
+ * @endcode
+ * would still produce 0 because we haven't yet seen:
+ * @code
+ * LL_TEMPLATE_CONVERTIBLE(const Base*, Subclass*);
+ * @endcode
+ *
+ * @TODO
+ * This macro should use Boost type_traits facilities for stripping and
+ * re-adding @c const and @c volatile qualifiers so that invoking
+ * LL_TEMPLATE_CONVERTIBLE(dest, source) will automatically generate all
+ * permitted permutations. It's really not fair to the coder to require
+ * separate:
+ * @code
+ * LL_TEMPLATE_CONVERTIBLE(Base*, Subclass*);
+ * LL_TEMPLATE_CONVERTIBLE(const Base*, Subclass*);
+ * LL_TEMPLATE_CONVERTIBLE(const Base*, const Subclass*);
+ * @endcode
+ *
+ * (Naturally we omit <tt>LL_TEMPLATE_CONVERTIBLE(Base*, const Subclass*)</tt>
+ * because that's not permitted by normal C++ assignment anyway.)
+ */
+#define LL_TEMPLATE_CONVERTIBLE(DEST, SOURCE) \
+template <> \
+struct ll_template_cast_impl<DEST, SOURCE> \
+{ \
+ DEST operator()(SOURCE wrapper) \
+ { \
+ return wrapper; \
+ } \
+}
+
+
#endif // LL_LLSTL_H
diff --git a/indra/llcommon/llstringtable.cpp b/indra/llcommon/llstringtable.cpp
index 7ad3805351..f288999964 100755
--- a/indra/llcommon/llstringtable.cpp
+++ b/indra/llcommon/llstringtable.cpp
@@ -317,7 +317,7 @@ void LLStringTable::removeString(const char *str)
mUniqueEntries--;
if (mUniqueEntries < 0)
{
- llerror("LLStringTable:removeString trying to remove too many strings!", 0);
+ LL_ERRS() << "LLStringTable:removeString trying to remove too many strings!" << LL_ENDL;
}
delete iter->second;
mStringHash.erase(iter);
@@ -343,7 +343,7 @@ void LLStringTable::removeString(const char *str)
mUniqueEntries--;
if (mUniqueEntries < 0)
{
- llerror("LLStringTable:removeString trying to remove too many strings!", 0);
+ LL_ERRS() << "LLStringTable:removeString trying to remove too many strings!" << LL_ENDL;
}
strlist->remove(entry);
delete entry;
diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp
index 25383fc4d8..8f5a886a37 100755
--- a/indra/llcommon/lltimer.cpp
+++ b/indra/llcommon/lltimer.cpp
@@ -43,7 +43,6 @@
//
// Locally used constants
//
-const U32 SEC_PER_DAY = 86400;
const F64 SEC_TO_MICROSEC = 1000000.f;
const U64 SEC_TO_MICROSEC_U64 = 1000000;
const F64 USEC_TO_SEC_F64 = 0.000001;
@@ -204,6 +203,8 @@ F64 calc_clock_frequency(unsigned int uiMeasureMSecs)
return 1000000.0; // microseconds, so 1 MHz.
}
+const U64 SEC_TO_MICROSEC_U64 = 1000000;
+
U64 get_clock_count()
{
// Linux clocks are in microseconds
@@ -226,7 +227,7 @@ void update_clock_frequencies()
// returns a U64 number that represents the number of
// microseconds since the unix epoch - Jan 1, 1970
-U64 totalTime()
+LLUnitImplicit<U64, LLUnits::Microseconds> totalTime()
{
U64 current_clock_count = get_clock_count();
if (!gTotalTimeClockCount)
@@ -263,7 +264,7 @@ U64 totalTime()
}
// Return the total clock tick count in microseconds.
- return (U64)(gTotalTimeClockCount*gClocksToMicroseconds);
+ return LLUnits::Microseconds::fromValue(gTotalTimeClockCount*gClocksToMicroseconds);
}
@@ -375,7 +376,7 @@ LLUnitImplicit<F32, LLUnits::Seconds> LLTimer::getElapsedTimeAndResetF32()
///////////////////////////////////////////////////////////////////////////////
-void LLTimer::setTimerExpirySec(F32 expiration)
+void LLTimer::setTimerExpirySec(LLUnitImplicit<F32, LLUnits::Seconds> expiration)
{
mExpirationTicks = get_clock_count()
+ (U64)((F32)(expiration * gClockFrequency));
diff --git a/indra/llcommon/lltimer.h b/indra/llcommon/lltimer.h
index f2dc59e405..1f2c56432b 100755
--- a/indra/llcommon/lltimer.h
+++ b/indra/llcommon/lltimer.h
@@ -91,7 +91,7 @@ public:
void stop() { mStarted = FALSE; }
void reset(); // Resets the timer
void setLastClockCount(U64 current_count); // Sets the timer so that the next elapsed call will be relative to this time
- void setTimerExpirySec(F32 expiration);
+ void setTimerExpirySec(LLUnitImplicit<F32, LLUnits::Seconds> expiration);
BOOL checkExpirationAndReset(F32 expiration);
BOOL hasExpired() const;
LLUnitImplicit<F32, LLUnits::Seconds> getElapsedTimeAndResetF32(); // Returns elapsed time in seconds with reset
@@ -171,6 +171,6 @@ LL_COMMON_API struct tm* utc_to_pacific_time(time_t utc_time, BOOL pacific_dayli
LL_COMMON_API void microsecondsToTimecodeString(U64 current_time, std::string& tcstring);
LL_COMMON_API void secondsToTimecodeString(F32 current_time, std::string& tcstring);
-U64 LL_COMMON_API totalTime(); // Returns current system time in microseconds
+LLUnitImplicit<U64, LLUnits::Microseconds> LL_COMMON_API totalTime(); // Returns current system time in microseconds
#endif
diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h
index d6d8d9da6a..781a4ab731 100644
--- a/indra/llcommon/llunit.h
+++ b/indra/llcommon/llunit.h
@@ -29,7 +29,7 @@
#include "stdtypes.h"
#include "llpreprocessor.h"
-#include "llerrorlegacy.h"
+#include "llerror.h"
template<typename STORAGE_TYPE, typename UNIT_TYPE>
struct LLUnit
@@ -266,13 +266,29 @@ LLUnit<STORAGE_TYPE, UNIT_TYPE> operator + (SCALAR_TYPE first, LLUnit<STORAGE_TY
}
template<typename STORAGE_TYPE1, typename UNIT_TYPE1, typename STORAGE_TYPE2, typename UNIT_TYPE2>
-LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1> operator + (LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1> first, LLUnit<STORAGE_TYPE2, UNIT_TYPE2> second)
+LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1> operator + (LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1> first, LLUnitImplicit<STORAGE_TYPE2, UNIT_TYPE2> second)
+{
+ LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1> result(first);
+ result += second;
+ return result;
+}
+
+template<typename STORAGE_TYPE1, typename UNIT_TYPE1, typename STORAGE_TYPE2, typename UNIT_TYPE2>
+LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1> operator + (LLUnit<STORAGE_TYPE1, UNIT_TYPE1> first, LLUnitImplicit<STORAGE_TYPE2, UNIT_TYPE2> second)
{
LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1> result(first);
result += second;
return result;
}
+template<typename STORAGE_TYPE1, typename UNIT_TYPE1, typename STORAGE_TYPE2, typename UNIT_TYPE2>
+LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1> operator + (LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1> first, LLUnit<STORAGE_TYPE2, UNIT_TYPE2> second)
+{
+ LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1> result(first);
+ result += LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1>(second);
+ return result;
+}
+
template<typename STORAGE_TYPE, typename UNIT_TYPE, typename SCALAR_TYPE>
LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE> operator + (LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE> first, SCALAR_TYPE second)
{
@@ -281,10 +297,10 @@ LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE> operator + (LLUnitImplicit<STORAGE_TYPE,
return result;
}
-template<typename STORAGE_TYPE1, typename UNIT_TYPE1, typename STORAGE_TYPE2, typename UNIT_TYPE2>
-LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1> operator + (LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1> first, LLUnitImplicit<STORAGE_TYPE2, UNIT_TYPE2> second)
+template<typename STORAGE_TYPE, typename UNIT_TYPE, typename SCALAR_TYPE>
+LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE> operator + (SCALAR_TYPE first, LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE> second)
{
- LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1> result(first);
+ LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE> result(first);
result += second;
return result;
}
@@ -324,6 +340,22 @@ LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1> operator - (LLUnitImplicit<STORAGE_TYP
return result;
}
+template<typename STORAGE_TYPE1, typename UNIT_TYPE1, typename STORAGE_TYPE2, typename UNIT_TYPE2>
+LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1> operator - (LLUnit<STORAGE_TYPE1, UNIT_TYPE1> first, LLUnitImplicit<STORAGE_TYPE2, UNIT_TYPE2> second)
+{
+ LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1> result(first);
+ result -= second;
+ return result;
+}
+
+template<typename STORAGE_TYPE1, typename UNIT_TYPE1, typename STORAGE_TYPE2, typename UNIT_TYPE2>
+LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1> operator - (LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1> first, LLUnit<STORAGE_TYPE2, UNIT_TYPE2> second)
+{
+ LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1> result(first);
+ result -= LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1>(second);
+ return result;
+}
+
template<typename STORAGE_TYPE, typename UNIT_TYPE, typename SCALAR_TYPE>
LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE> operator - (LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE> first, SCALAR_TYPE second)
{
@@ -343,18 +375,6 @@ LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE> operator - (SCALAR_TYPE first, LLUnitImp
//
// operator *
//
-template<typename STORAGE_TYPE, typename UNIT_TYPE, typename SCALAR_TYPE>
-LLUnit<STORAGE_TYPE, UNIT_TYPE> operator * (SCALAR_TYPE first, LLUnit<STORAGE_TYPE, UNIT_TYPE> second)
-{
- return LLUnit<STORAGE_TYPE, UNIT_TYPE>((STORAGE_TYPE)(first * second.value()));
-}
-
-template<typename STORAGE_TYPE, typename UNIT_TYPE, typename SCALAR_TYPE>
-LLUnit<STORAGE_TYPE, UNIT_TYPE> operator * (LLUnit<STORAGE_TYPE, UNIT_TYPE> first, SCALAR_TYPE second)
-{
- return LLUnit<STORAGE_TYPE, UNIT_TYPE>((STORAGE_TYPE)(first.value() * second));
-}
-
template<typename STORAGE_TYPE1, typename UNIT_TYPE1, typename STORAGE_TYPE2, typename UNIT_TYPE2>
LLUnit<STORAGE_TYPE1, UNIT_TYPE1> operator * (LLUnit<STORAGE_TYPE1, UNIT_TYPE1>, LLUnit<STORAGE_TYPE2, UNIT_TYPE2>)
{
@@ -364,15 +384,15 @@ LLUnit<STORAGE_TYPE1, UNIT_TYPE1> operator * (LLUnit<STORAGE_TYPE1, UNIT_TYPE1>,
}
template<typename STORAGE_TYPE, typename UNIT_TYPE, typename SCALAR_TYPE>
-LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE> operator * (SCALAR_TYPE first, LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE> second)
+LLUnit<STORAGE_TYPE, UNIT_TYPE> operator * (LLUnit<STORAGE_TYPE, UNIT_TYPE> first, SCALAR_TYPE second)
{
- return LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE>(first * second.value());
+ return LLUnit<STORAGE_TYPE, UNIT_TYPE>((STORAGE_TYPE)(first.value() * second));
}
template<typename STORAGE_TYPE, typename UNIT_TYPE, typename SCALAR_TYPE>
-LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE> operator * (LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE> first, SCALAR_TYPE second)
+LLUnit<STORAGE_TYPE, UNIT_TYPE> operator * (SCALAR_TYPE first, LLUnit<STORAGE_TYPE, UNIT_TYPE> second)
{
- return LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE>(first.value() * second);
+ return LLUnit<STORAGE_TYPE, UNIT_TYPE>((STORAGE_TYPE)(first * second.value()));
}
template<typename STORAGE_TYPE1, typename UNIT_TYPE1, typename STORAGE_TYPE2, typename UNIT_TYPE2>
@@ -383,6 +403,19 @@ LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1> operator * (LLUnitImplicit<STORAGE_TYP
return LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1>();
}
+template<typename STORAGE_TYPE, typename UNIT_TYPE, typename SCALAR_TYPE>
+LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE> operator * (LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE> first, SCALAR_TYPE second)
+{
+ return LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE>(first.value() * second);
+}
+
+template<typename STORAGE_TYPE, typename UNIT_TYPE, typename SCALAR_TYPE>
+LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE> operator * (SCALAR_TYPE first, LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE> second)
+{
+ return LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE>(first * second.value());
+}
+
+
//
// operator /
//
@@ -416,6 +449,18 @@ STORAGE_TYPE1 operator / (LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1> first, LLUni
return STORAGE_TYPE1(first.value() / first.convert(second));
}
+template<typename STORAGE_TYPE1, typename UNIT_TYPE1, typename STORAGE_TYPE2, typename UNIT_TYPE2>
+STORAGE_TYPE1 operator / (LLUnit<STORAGE_TYPE1, UNIT_TYPE1> first, LLUnitImplicit<STORAGE_TYPE2, UNIT_TYPE2> second)
+{
+ return STORAGE_TYPE1(first.value() / first.convert(second));
+}
+
+template<typename STORAGE_TYPE1, typename UNIT_TYPE1, typename STORAGE_TYPE2, typename UNIT_TYPE2>
+STORAGE_TYPE1 operator / (LLUnitImplicit<STORAGE_TYPE1, UNIT_TYPE1> first, LLUnit<STORAGE_TYPE2, UNIT_TYPE2> second)
+{
+ return STORAGE_TYPE1(first.value() / first.convert(second));
+}
+
#define COMPARISON_OPERATORS(op) \
template<typename STORAGE_TYPE, typename UNIT_TYPE, typename SCALAR_TYPE> \
bool operator op (SCALAR_TYPE first, LLUnit<STORAGE_TYPE, UNIT_TYPE> second) \
@@ -591,6 +636,7 @@ LL_DECLARE_DERIVED_UNIT(Mibibits, * 1024, Gibibits, "Gib");
LL_DECLARE_BASE_UNIT(Seconds, "s");
LL_DECLARE_DERIVED_UNIT(Seconds, * 60, Minutes, "min");
LL_DECLARE_DERIVED_UNIT(Minutes, * 60, Hours, "h");
+LL_DECLARE_DERIVED_UNIT(Hours, * 24, Days, "d");
LL_DECLARE_DERIVED_UNIT(Seconds, / 1000, Milliseconds, "ms");
LL_DECLARE_DERIVED_UNIT(Milliseconds, / 1000, Microseconds, "\x09\x3cs");
LL_DECLARE_DERIVED_UNIT(Microseconds, / 1000, Nanoseconds, "ns");
diff --git a/indra/llcommon/llversionserver.h b/indra/llcommon/llversionserver.h
deleted file mode 100755
index ef68a0eaf5..0000000000
--- a/indra/llcommon/llversionserver.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * @file llversionserver.h
- * @brief
- *
- * $LicenseInfo:firstyear=2002&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_LLVERSIONSERVER_H
-#define LL_LLVERSIONSERVER_H
-
-const S32 LL_VERSION_MAJOR = 2;
-const S32 LL_VERSION_MINOR = 1;
-const S32 LL_VERSION_PATCH = 0;
-const S32 LL_VERSION_BUILD = 264760;
-
-const char * const LL_CHANNEL = "Second Life Server";
-
-
-#endif
diff --git a/indra/llcommon/stdenums.h b/indra/llcommon/stdenums.h
deleted file mode 100755
index efcbe76795..0000000000
--- a/indra/llcommon/stdenums.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/**
- * @file stdenums.h
- * @brief Enumerations for indra.
- *
- * $LicenseInfo:firstyear=2002&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_STDENUMS_H
-#define LL_STDENUMS_H
-
-//----------------------------------------------------------------------------
-// DEPRECATED - create new, more specific files for shared enums/constants
-//----------------------------------------------------------------------------
-
-// this enum is used by the llview.h (viewer) and the llassetstorage.h (viewer and sim)
-enum EDragAndDropType
-{
- DAD_NONE = 0,
- DAD_TEXTURE = 1,
- DAD_SOUND = 2,
- DAD_CALLINGCARD = 3,
- DAD_LANDMARK = 4,
- DAD_SCRIPT = 5,
- DAD_CLOTHING = 6,
- DAD_OBJECT = 7,
- DAD_NOTECARD = 8,
- DAD_CATEGORY = 9,
- DAD_ROOT_CATEGORY = 10,
- DAD_BODYPART = 11,
- DAD_ANIMATION = 12,
- DAD_GESTURE = 13,
- DAD_LINK = 14,
- DAD_MESH = 15,
- DAD_WIDGET = 16,
- DAD_PERSON = 17,
- DAD_COUNT = 18, // number of types in this enum
-};
-
-// Reasons for drags to be denied.
-// ordered by priority for multi-drag
-enum EAcceptance
-{
- ACCEPT_POSTPONED, // we are asynchronously determining acceptance
- ACCEPT_NO, // Uninformative, general purpose denial.
- ACCEPT_NO_LOCKED, // Operation would be valid, but permissions are set to disallow it.
- ACCEPT_YES_COPY_SINGLE, // We'll take a copy of a single item
- ACCEPT_YES_SINGLE, // Accepted. OK to drag and drop single item here.
- ACCEPT_YES_COPY_MULTI, // We'll take a copy of multiple items
- ACCEPT_YES_MULTI // Accepted. OK to drag and drop multiple items here.
-};
-
-// 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
-};
-
-
-// This is used by the return to owner code to determine the reason
-// that this object is being returned.
-enum EReturnReason
-{
- RR_GENERIC = 0,
- RR_SANDBOX = 1,
- RR_PARCEL_OWNER = 2,
- RR_PARCEL_AUTO = 3,
- RR_PARCEL_FULL = 4,
- RR_OFF_WORLD = 5,
-
- RR_COUNT = 6
-};
-
-// This is used for filling in the first byte of the ExtraID field of
-// the ObjectProperties message.
-enum EObjectPropertiesExtraID
-{
- OPEID_NONE = 0,
- OPEID_ASSET_ID = 1,
- OPEID_FROM_TASK_ID = 2,
-
- OPEID_COUNT = 3
-};
-
-enum EAddPosition
-{
- ADD_TOP,
- ADD_BOTTOM,
- ADD_DEFAULT
-};
-
-enum LLGroupChange
-{
- GC_PROPERTIES,
- GC_MEMBER_DATA,
- GC_ROLE_DATA,
- GC_ROLE_MEMBER_DATA,
- GC_TITLES,
- GC_ALL
-};
-
-//----------------------------------------------------------------------------
-// DEPRECATED - create new, more specific files for shared enums/constants
-//----------------------------------------------------------------------------
-
-#endif
diff --git a/indra/llcommon/string_table.h b/indra/llcommon/string_table.h
deleted file mode 100755
index fe6416fb50..0000000000
--- a/indra/llcommon/string_table.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * @file string_table.h
- * @brief Legacy wrapper header.
- *
- * $LicenseInfo:firstyear=2000&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$
- */
-#include "llstringtable.h"
diff --git a/indra/llcommon/tests/bitpack_test.cpp b/indra/llcommon/tests/bitpack_test.cpp
index afc0c18cd0..9bfd567068 100755
--- a/indra/llcommon/tests/bitpack_test.cpp
+++ b/indra/llcommon/tests/bitpack_test.cpp
@@ -28,7 +28,7 @@
#include "linden_common.h"
-#include "../bitpack.h"
+#include "../llbitpack.h"
#include "../test/lltut.h"
diff --git a/indra/llcommon/timing.h b/indra/llcommon/timing.h
deleted file mode 100755
index c408d4c446..0000000000
--- a/indra/llcommon/timing.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * @file timing.h
- * @brief Cross-platform routines for doing timing.
- *
- * $LicenseInfo:firstyear=2000&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_TIMING_H
-#define LL_TIMING_H
-
-
-#if LL_LINUX || LL_DARWIN || LL_SOLARIS
-#include <sys/time.h>
-#endif
-
-
-const F32 SEC_TO_MICROSEC = 1000000.f;
-const U64 SEC_TO_MICROSEC_U64 = 1000000;
-const U32 SEC_PER_DAY = 86400;
-
-// functionality has been moved lltimer.{cpp,h}. This file will be deprecated in the future.
-
-#endif
diff --git a/indra/llcrashlogger/llcrashlogger.h b/indra/llcrashlogger/llcrashlogger.h
index 1510d7e0b3..abd6426d68 100755
--- a/indra/llcrashlogger/llcrashlogger.h
+++ b/indra/llcrashlogger/llcrashlogger.h
@@ -34,6 +34,11 @@
#include "llsd.h"
#include "llcontrol.h"
+// Crash reporter behavior
+const S32 CRASH_BEHAVIOR_ASK = 0;
+const S32 CRASH_BEHAVIOR_ALWAYS_SEND = 1;
+const S32 CRASH_BEHAVIOR_NEVER_SEND = 2;
+
class LLCrashLogger : public LLApp
{
public:
diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt
index e45c809e7e..0a1f93bd80 100755
--- a/indra/llinventory/CMakeLists.txt
+++ b/indra/llinventory/CMakeLists.txt
@@ -19,6 +19,7 @@ include_directories(
set(llinventory_SOURCE_FILES
llcategory.cpp
lleconomy.cpp
+ llfoldertype.cpp
llinventory.cpp
llinventorydefines.cpp
llinventorytype.cpp
@@ -36,6 +37,7 @@ set(llinventory_HEADER_FILES
llcategory.h
lleconomy.h
+ llfoldertype.h
llinventory.h
llinventorydefines.h
llinventorytype.h
diff --git a/indra/llcommon/llfoldertype.cpp b/indra/llinventory/llfoldertype.cpp
index f6d0f5bce8..f6d0f5bce8 100755
--- a/indra/llcommon/llfoldertype.cpp
+++ b/indra/llinventory/llfoldertype.cpp
diff --git a/indra/llcommon/llfoldertype.h b/indra/llinventory/llfoldertype.h
index a0c847914f..a0c847914f 100755
--- a/indra/llcommon/llfoldertype.h
+++ b/indra/llinventory/llfoldertype.h
diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h
index 99716ed7be..47b06af5b8 100755
--- a/indra/llinventory/llinventory.h
+++ b/indra/llinventory/llinventory.h
@@ -27,7 +27,6 @@
#ifndef LL_LLINVENTORY_H
#define LL_LLINVENTORY_H
-#include "lldarray.h"
#include "llfoldertype.h"
#include "llinventorytype.h"
#include "llpermissions.h"
@@ -124,7 +123,7 @@ protected:
class LLInventoryItem : public LLInventoryObject
{
public:
- typedef LLDynamicArray<LLPointer<LLInventoryItem> > item_array_t;
+ typedef std::vector<LLPointer<LLInventoryItem> > item_array_t;
//--------------------------------------------------------------------
// Initialization
@@ -235,7 +234,7 @@ protected:
class LLInventoryCategory : public LLInventoryObject
{
public:
- typedef LLDynamicArray<LLPointer<LLInventoryCategory> > cat_array_t;
+ typedef std::vector<LLPointer<LLInventoryCategory> > cat_array_t;
//--------------------------------------------------------------------
// Initialization
diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp
index 37c603348e..23a4e4b077 100755
--- a/indra/llinventory/llparcel.cpp
+++ b/indra/llinventory/llparcel.cpp
@@ -136,7 +136,7 @@ LLParcel::LLParcel(const LLUUID &owner_id,
// virtual
LLParcel::~LLParcel()
{
- // user list cleaned up by LLDynamicArray destructor.
+ // user list cleaned up by std::vector destructor.
}
void LLParcel::init(const LLUUID &owner_id,
@@ -1082,7 +1082,7 @@ void LLParcel::startSale(const LLUUID& buyer_id, BOOL is_buyer_group)
mGroupID.setNull();
}
mSaleTimerExpires.start();
- mSaleTimerExpires.setTimerExpirySec(DEFAULT_USEC_SALE_TIMEOUT / SEC_TO_MICROSEC);
+ mSaleTimerExpires.setTimerExpirySec(LLUnits::Microseconds::fromValue(DEFAULT_USEC_SALE_TIMEOUT));
mStatus = OS_LEASE_PENDING;
mClaimDate = time(NULL);
setAuctionID(0);
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 41914446d1..e4ab46929f 100755
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -44,7 +44,6 @@
#include "m3math.h"
#include "llmatrix3a.h"
#include "lloctree.h"
-#include "lldarray.h"
#include "llvolume.h"
#include "llvolumeoctree.h"
#include "llstl.h"
diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h
index 164b8d6652..a4291df7db 100755
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -42,7 +42,6 @@ class LLVolumeFace;
class LLVolume;
class LLVolumeTriangle;
-#include "lldarray.h"
#include "lluuid.h"
#include "v4color.h"
//#include "vmath.h"
diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt
index d193e367eb..ca48e613d2 100755
--- a/indra/llmessage/CMakeLists.txt
+++ b/indra/llmessage/CMakeLists.txt
@@ -27,6 +27,7 @@ set(llmessage_SOURCE_FILES
llares.cpp
llareslistener.cpp
llassetstorage.cpp
+ llavatarname.cpp
llavatarnamecache.cpp
llblowfishcipher.cpp
llbuffer.cpp
@@ -114,6 +115,7 @@ set(llmessage_HEADER_FILES
llares.h
llareslistener.h
llassetstorage.h
+ llavatarname.h
llavatarnamecache.h
llblowfishcipher.h
llbuffer.h
@@ -128,6 +130,7 @@ set(llmessage_HEADER_FILES
lldbstrings.h
lldispatcher.h
lleventflags.h
+ llextendedstatus.h
llfiltersd2xmlrpc.h
llfollowcamparams.h
llhost.h
diff --git a/indra/llmessage/llassetstorage.h b/indra/llmessage/llassetstorage.h
index 563ff9e077..6ffd7ad309 100755
--- a/indra/llmessage/llassetstorage.h
+++ b/indra/llmessage/llassetstorage.h
@@ -34,11 +34,11 @@
#include "lltimer.h"
#include "llnamevalue.h"
#include "llhost.h"
-#include "stdenums.h" // for EDragAndDropType
#include "lltransfermanager.h" // For LLTSCode enum
#include "llassettype.h"
#include "llstring.h"
#include "llextendedstatus.h"
+#include "llxfer.h"
// Forward declarations
class LLMessageSystem;
@@ -51,6 +51,15 @@ class LLSD;
// HTTP Uploads also timeout if they take longer than this.
const F32 LL_ASSET_STORAGE_TIMEOUT = 5 * 60.0f;
+
+// Specific error codes
+const int LL_ERR_ASSET_REQUEST_FAILED = -1;
+//const int LL_ERR_ASSET_REQUEST_INVALID = -2;
+const int LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE = -3;
+const int LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE = -4;
+const int LL_ERR_INSUFFICIENT_PERMISSIONS = -5;
+const int LL_ERR_PRICE_MISMATCH = -23018;
+
class LLAssetInfo
{
protected:
diff --git a/indra/llcommon/llavatarname.cpp b/indra/llmessage/llavatarname.cpp
index 642bd82e90..642bd82e90 100755
--- a/indra/llcommon/llavatarname.cpp
+++ b/indra/llmessage/llavatarname.cpp
diff --git a/indra/llcommon/llavatarname.h b/indra/llmessage/llavatarname.h
index 5d2fccc5ba..5d2fccc5ba 100755
--- a/indra/llcommon/llavatarname.h
+++ b/indra/llmessage/llavatarname.h
diff --git a/indra/llmessage/llcircuit.h b/indra/llmessage/llcircuit.h
index 430d6358f7..11d4e1b11c 100755
--- a/indra/llmessage/llcircuit.h
+++ b/indra/llmessage/llcircuit.h
@@ -34,7 +34,6 @@
#include "llerror.h"
#include "lltimer.h"
-#include "timing.h"
#include "net.h"
#include "llhost.h"
#include "llpacketack.h"
@@ -51,6 +50,8 @@ const F32 LL_AVERAGED_PING_MIN = 100; // msec // IW: increased to avoid ret
const U32 INITIAL_PING_VALUE_MSEC = 1000; // initial value for the ping delay, or for ping delay for an unknown circuit
const TPACKETID LL_MAX_OUT_PACKET_ID = 0x01000000;
+const int LL_ERR_CIRCUIT_GONE = -23017;
+const int LL_ERR_TCP_TIMEOUT = -23016;
// 0 - flags
// [1,4] - packetid
diff --git a/indra/llcommon/llextendedstatus.h b/indra/llmessage/llextendedstatus.h
index 8ce173d1ff..8ce173d1ff 100755
--- a/indra/llcommon/llextendedstatus.h
+++ b/indra/llmessage/llextendedstatus.h
diff --git a/indra/llmessage/llhttpassetstorage.cpp b/indra/llmessage/llhttpassetstorage.cpp
index 7dcf160c9b..9a4d22ab0b 100755
--- a/indra/llmessage/llhttpassetstorage.cpp
+++ b/indra/llmessage/llhttpassetstorage.cpp
@@ -36,6 +36,7 @@
#include "llproxy.h"
#include "llvfile.h"
#include "llvfs.h"
+#include "llxfer.h"
#ifdef LL_STANDALONE
# include <zlib.h>
@@ -43,6 +44,8 @@
# include "zlib/zlib.h"
#endif
+const char* const LOCAL_ASSET_URL_FORMAT = "http://%s:12041/asset";
+
const U32 MAX_RUNNING_REQUESTS = 1;
const F32 MAX_PROCESSING_TIME = 0.005f;
const S32 CURL_XFER_BUFFER_SIZE = 65536;
diff --git a/indra/llmessage/llmessagetemplate.h b/indra/llmessage/llmessagetemplate.h
index ae8e0087c1..70a91d8a6f 100755
--- a/indra/llmessage/llmessagetemplate.h
+++ b/indra/llmessage/llmessagetemplate.h
@@ -27,9 +27,9 @@
#ifndef LL_LLMESSAGETEMPLATE_H
#define LL_LLMESSAGETEMPLATE_H
-#include "lldarray.h"
#include "message.h" // TODO: babbage: Remove...
#include "llstl.h"
+#include "llindexedvector.h"
class LLMsgVarData
{
@@ -102,7 +102,7 @@ public:
}
S32 mBlockNumber;
- typedef LLDynamicArrayIndexed<LLMsgVarData, const char *, 8> msg_var_data_map_t;
+ typedef LLIndexedVector<LLMsgVarData, const char *, 8> msg_var_data_map_t;
msg_var_data_map_t mMemberVarData;
char *mName;
S32 mTotalSize;
@@ -225,7 +225,7 @@ public:
friend std::ostream& operator<<(std::ostream& s, LLMessageBlock &msg);
- typedef LLDynamicArrayIndexed<LLMessageVariable*, const char *, 8> message_variable_map_t;
+ typedef LLIndexedVector<LLMessageVariable*, const char *, 8> message_variable_map_t;
message_variable_map_t mMemberVariables;
char *mName;
EMsgBlockType mType;
@@ -391,7 +391,7 @@ public:
}
public:
- typedef LLDynamicArrayIndexed<LLMessageBlock*, char*, 8> message_block_map_t;
+ typedef LLIndexedVector<LLMessageBlock*, char*, 8> message_block_map_t;
message_block_map_t mMemberBlocks;
char *mName;
EMsgFrequency mFrequency;
diff --git a/indra/llmessage/llnamevalue.cpp b/indra/llmessage/llnamevalue.cpp
index d799403029..f2bdcfad53 100755
--- a/indra/llmessage/llnamevalue.cpp
+++ b/indra/llmessage/llnamevalue.cpp
@@ -33,7 +33,7 @@
#include "u64.h"
#include "llstring.h"
-#include "string_table.h"
+#include "llstringtable.h"
// Anonymous enumeration to provide constants in this file.
// *NOTE: These values may be used in sscanf statements below as their
diff --git a/indra/llmessage/llnamevalue.h b/indra/llmessage/llnamevalue.h
index 273de475f8..f8b556b5fe 100755
--- a/indra/llmessage/llnamevalue.h
+++ b/indra/llmessage/llnamevalue.h
@@ -41,7 +41,7 @@
// SitObject STRING
// SitPosition VEC3
-#include "string_table.h"
+#include "llstringtable.h"
#include "llmath.h"
#include "v3math.h"
#include "lldbstrings.h"
diff --git a/indra/llmessage/llpacketbuffer.cpp b/indra/llmessage/llpacketbuffer.cpp
index e69631eb3b..22e4dc1e8d 100755
--- a/indra/llmessage/llpacketbuffer.cpp
+++ b/indra/llmessage/llpacketbuffer.cpp
@@ -29,7 +29,7 @@
#include "llpacketbuffer.h"
#include "net.h"
-#include "timing.h"
+#include "lltimer.h"
#include "llhost.h"
///////////////////////////////////////////////////////////
diff --git a/indra/llmessage/llpacketring.cpp b/indra/llmessage/llpacketring.cpp
index fc6e9c5193..a8c568a365 100755
--- a/indra/llmessage/llpacketring.cpp
+++ b/indra/llmessage/llpacketring.cpp
@@ -41,7 +41,6 @@
#include "llproxy.h"
#include "llrand.h"
#include "message.h"
-#include "timing.h"
#include "u64.h"
///////////////////////////////////////////////////////////
diff --git a/indra/llmessage/llxfer.h b/indra/llmessage/llxfer.h
index f9348eb11f..edf5eeb82d 100755
--- a/indra/llmessage/llxfer.h
+++ b/indra/llmessage/llxfer.h
@@ -32,6 +32,10 @@
#include "llextendedstatus.h"
const S32 LL_XFER_LARGE_PAYLOAD = 7680;
+const S32 LL_ERR_FILE_EMPTY = -44;
+const int LL_ERR_FILE_NOT_FOUND = -43;
+const int LL_ERR_CANNOT_OPEN_FILE = -42;
+const int LL_ERR_EOF = -39;
typedef enum ELLXferStatus {
e_LL_XFER_UNINITIALIZED,
diff --git a/indra/llmessage/llxfermanager.cpp b/indra/llmessage/llxfermanager.cpp
index 00b9d81611..e74eb74763 100755
--- a/indra/llmessage/llxfermanager.cpp
+++ b/indra/llmessage/llxfermanager.cpp
@@ -677,7 +677,7 @@ void LLXferManager::processReceiveData (LLMessageSystem *mesgsys, void ** /*user
ack_info.mID = id;
ack_info.mPacketNum = decodePacketNum(packetnum);
ack_info.mRemoteHost = mesgsys->getSender();
- mXferAckQueue.push(ack_info);
+ mXferAckQueue.push_back(ack_info);
}
if (isLastPacket(packetnum))
@@ -1088,15 +1088,15 @@ void LLXferManager::retransmitUnackedPackets ()
// so we don't blow through bandwidth.
//
- while (mXferAckQueue.getLength())
+ while (mXferAckQueue.size())
{
if (mAckThrottle.checkOverflow(1000.0f*8.0f))
{
break;
}
- //llinfos << "Confirm packet queue length:" << mXferAckQueue.getLength() << llendl;
- LLXferAckInfo ack_info;
- mXferAckQueue.pop(ack_info);
+ //llinfos << "Confirm packet queue length:" << mXferAckQueue.size() << llendl;
+ LLXferAckInfo ack_info = mXferAckQueue.front();
+ mXferAckQueue.pop_front();
//llinfos << "Sending confirm packet" << llendl;
sendConfirmPacket(gMessageSystem, ack_info.mID, ack_info.mPacketNum, ack_info.mRemoteHost);
mAckThrottle.throttleOverflow(1000.f*8.f); // Assume 1000 bytes/packet
diff --git a/indra/llmessage/llxfermanager.h b/indra/llmessage/llxfermanager.h
index b84bccb5b7..b3d110e7a1 100755
--- a/indra/llmessage/llxfermanager.h
+++ b/indra/llmessage/llxfermanager.h
@@ -41,7 +41,7 @@ class LLVFS;
#include "message.h"
#include "llassetstorage.h"
#include "lldir.h"
-#include "lllinkedqueue.h"
+#include <deque>
#include "llthrottle.h"
class LLHostStatus
@@ -80,7 +80,7 @@ class LLXferManager
S32 mMaxIncomingXfers;
BOOL mUseAckThrottling; // Use ack throttling to cap file xfer bandwidth
- LLLinkedQueue<LLXferAckInfo> mXferAckQueue;
+ std::deque<LLXferAckInfo> mXferAckQueue;
LLThrottle mAckThrottle;
public:
diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp
index ae95087377..4a4cc57e20 100755
--- a/indra/llmessage/message.cpp
+++ b/indra/llmessage/message.cpp
@@ -47,10 +47,8 @@
// linden library headers
#include "indra_constants.h"
-#include "lldarray.h"
#include "lldir.h"
#include "llerror.h"
-#include "llerrorlegacy.h"
#include "llfasttimer.h"
#include "llhttpclient.h"
#include "llhttpnodeadapter.h"
@@ -73,7 +71,6 @@
#include "lltransfermanager.h"
#include "lluuid.h"
#include "llxfermanager.h"
-#include "timing.h"
#include "llquaternion.h"
#include "u64.h"
#include "v3dmath.h"
@@ -120,7 +117,7 @@ namespace
{
LL_WARNS("Messaging") << "error status " << status
<< " for message " << mMessageName
- << " reason " << reason << llendl;
+ << " reason " << reason << LL_ENDL;
}
// TODO: Map status in to useful error code.
if(NULL != mCallback) mCallback(mCallbackData, LL_ERR_TCP_TIMEOUT);
@@ -155,7 +152,7 @@ void LLMessageHandlerBridge::post(LLHTTPNode::ResponsePtr response,
std::string name = context["request"]["wildcard"]["message-name"];
char* namePtr = LLMessageStringTable::getInstance()->getString(name.c_str());
- lldebugs << "Setting mLastSender " << input["sender"].asString() << llendl;
+ lldebugs << "Setting mLastSender " << input["sender"].asString() << LL_ENDL;
gMessageSystem->mLastSender = LLHost(input["sender"].asString());
gMessageSystem->mPacketsIn += 1;
gMessageSystem->mLLSDMessageReader->setMessage(namePtr, input["body"]);
@@ -284,14 +281,14 @@ LLMessageSystem::LLMessageSystem(const std::string& filename, U32 port,
mbError = TRUE;
mErrorCode = error;
}
-// LL_DEBUGS("Messaging") << << "*** port: " << mPort << llendl;
+// LL_DEBUGS("Messaging") << << "*** port: " << mPort << LL_ENDL;
//
// Create the data structure that we can poll on
//
if (!gAPRPoolp)
{
- LL_ERRS("Messaging") << "No APR pool before message system initialization!" << llendl;
+ LL_ERRS("Messaging") << "No APR pool before message system initialization!" << LL_ENDL;
ll_init_apr();
}
apr_socket_t *aprSocketp = NULL;
@@ -329,7 +326,7 @@ void LLMessageSystem::loadTemplateFile(const std::string& filename, bool failure
{
if(filename.empty())
{
- LL_ERRS("Messaging") << "No template filename specified" << llendl;
+ LL_ERRS("Messaging") << "No template filename specified" << LL_ENDL;
mbError = TRUE;
return;
}
@@ -338,9 +335,9 @@ void LLMessageSystem::loadTemplateFile(const std::string& filename, bool failure
if(!_read_file_into_string(template_body, filename))
{
if (failure_is_fatal) {
- LL_ERRS("Messaging") << "Failed to open template: " << filename << llendl;
+ LL_ERRS("Messaging") << "Failed to open template: " << filename << LL_ENDL;
} else {
- LL_WARNS("Messaging") << "Failed to open template: " << filename << llendl;
+ LL_WARNS("Messaging") << "Failed to open template: " << filename << LL_ENDL;
}
mbError = TRUE;
return;
@@ -566,7 +563,7 @@ BOOL LLMessageSystem::checkMessages( S64 frame_count )
// Ones that are non-zero but below the minimum packet size are worrisome.
if (receive_size > 0)
{
- LL_WARNS("Messaging") << "Invalid (too short) packet discarded " << receive_size << llendl;
+ LL_WARNS("Messaging") << "Invalid (too short) packet discarded " << receive_size << LL_ENDL;
callExceptionFunc(MX_PACKET_TOO_SHORT);
}
// no data in packet receive buffer
@@ -592,7 +589,7 @@ BOOL LLMessageSystem::checkMessages( S64 frame_count )
// the next one
LL_WARNS("Messaging") << "Malformed packet received. Packet size "
<< receive_size << " with invalid no. of acks " << acks
- << llendl;
+ << LL_ENDL;
valid_packet = FALSE;
continue;
}
@@ -620,7 +617,7 @@ BOOL LLMessageSystem::checkMessages( S64 frame_count )
memcpy(&mem_id, &mTrueReceiveBuffer[true_rcv_size], /* Flawfinder: ignore*/
sizeof(TPACKETID));
packet_id = ntohl(mem_id);
- //LL_INFOS("Messaging") << "got ack: " << packet_id << llendl;
+ //LL_INFOS("Messaging") << "got ack: " << packet_id << LL_ENDL;
cdp->ackReliablePacket(packet_id);
}
if (!cdp->getUnackedPacketCount())
@@ -652,14 +649,14 @@ BOOL LLMessageSystem::checkMessages( S64 frame_count )
// LL_WARNS("Messaging") << "DISCARDED PACKET HOST MISMATCH! HOST: "
// << host << " CIRCUIT: "
// << mCircuitInfo.mCurrentCircuit->mHost
- // << llendl;
+ // << LL_ENDL;
//}
// ***************************************
//mCircuitInfo.mCurrentCircuit->mAcks.put(mCurrentRecvPacketID);
cdp->collectRAck(mCurrentRecvPacketID);
}
- LL_DEBUGS("Messaging") << "Discarding duplicate resend from " << host << llendl;
+ LL_DEBUGS("Messaging") << "Discarding duplicate resend from " << host << LL_ENDL;
if(mVerboseLog)
{
std::ostringstream str;
@@ -671,7 +668,7 @@ BOOL LLMessageSystem::checkMessages( S64 frame_count )
<< " resent "
<< ((acks > 0) ? "acks" : "")
<< " DISCARD DUPLICATE";
- LL_INFOS("Messaging") << str.str() << llendl;
+ LL_INFOS("Messaging") << str.str() << LL_ENDL;
}
mPacketsIn++;
valid_packet = FALSE;
@@ -750,7 +747,7 @@ BOOL LLMessageSystem::checkMessages( S64 frame_count )
{
if (mbProtected && (!cdp))
{
- LL_WARNS("Messaging") << "Invalid Packet from invalid circuit " << host << llendl;
+ LL_WARNS("Messaging") << "Invalid Packet from invalid circuit " << host << LL_ENDL;
mOffCircuitPackets++;
}
else
@@ -820,7 +817,7 @@ void LLMessageSystem::processAcks()
if (!mDenyTrustedCircuitSet.empty())
{
- LL_INFOS("Messaging") << "Sending queued DenyTrustedCircuit messages." << llendl;
+ LL_INFOS("Messaging") << "Sending queued DenyTrustedCircuit messages." << LL_ENDL;
for (host_set_t::iterator hostit = mDenyTrustedCircuitSet.begin(); hostit != mDenyTrustedCircuitSet.end(); ++hostit)
{
reallySendDenyTrustedCircuit(*hostit);
@@ -894,7 +891,7 @@ LLSD LLMessageSystem::getBuiltMessageLLSD() const
else
{
// TODO: implement as below?
- llerrs << "Message not built as LLSD." << llendl;
+ llerrs << "Message not built as LLSD." << LL_ENDL;
}
return result;
}
@@ -1147,7 +1144,7 @@ LLHTTPClient::ResponderPtr LLMessageSystem::createResponder(const std::string& n
// explicitly sent as reliable, so they don't have a callback
// LL_WARNS("Messaging") << "LLMessageSystem::sendMessage: Sending unreliable "
// << mMessageBuilder->getMessageName() << " message via HTTP"
-// << llendl;
+// << LL_ENDL;
return new LLFnPtrResponder(
NULL,
NULL,
@@ -1183,11 +1180,11 @@ S32 LLMessageSystem::sendMessage(const LLHost &host)
if(mVerboseLog)
{
LL_INFOS_ONCE("Messaging") << "MSG: -> " << host << "\tUNKNOWN CIRCUIT:\t"
- << mMessageBuilder->getMessageName() << llendl;
+ << mMessageBuilder->getMessageName() << LL_ENDL;
}
LL_WARNS_ONCE("Messaging") << "sendMessage - Trying to send "
<< mMessageBuilder->getMessageName() << " on unknown circuit "
- << host << llendl;
+ << host << LL_ENDL;
return 0;
}
else
@@ -1206,11 +1203,11 @@ S32 LLMessageSystem::sendMessage(const LLHost &host)
if(mVerboseLog)
{
LL_INFOS("Messaging") << "MSG: -> " << host << "\tDEAD CIRCUIT\t\t"
- << mMessageBuilder->getMessageName() << llendl;
+ << mMessageBuilder->getMessageName() << LL_ENDL;
}
LL_WARNS("Messaging") << "sendMessage - Trying to send message "
<< mMessageBuilder->getMessageName() << " to dead circuit "
- << host << llendl;
+ << host << LL_ENDL;
return 0;
}
}
@@ -1255,7 +1252,7 @@ S32 LLMessageSystem::sendMessage(const LLHost &host)
LL_WARNS("Messaging") << "sendMessage - Trying to send "
<< ((buffer_length > 4000) ? "EXTRA " : "")
<< "BIG message " << mMessageBuilder->getMessageName() << " - "
- << buffer_length << llendl;
+ << buffer_length << LL_ENDL;
}
}
if (mSendReliable)
@@ -1317,7 +1314,7 @@ S32 LLMessageSystem::sendMessage(const LLHost &host)
// append_acout_count is incorrect or that
// MAX_BUFFER_SIZE has fallen below MTU which is bad
// and probably programmer error.
- LL_ERRS("Messaging") << "Buffer packing failed due to size.." << llendl;
+ LL_ERRS("Messaging") << "Buffer packing failed due to size.." << LL_ENDL;
}
}
@@ -1358,7 +1355,7 @@ S32 LLMessageSystem::sendMessage(const LLHost &host)
std::ostream_iterator<TPACKETID> append(str, " ");
std::copy(acks.begin(), acks.end(), append);
}
- LL_INFOS("Messaging") << str.str() << llendl;
+ LL_INFOS("Messaging") << str.str() << LL_ENDL;
}
@@ -1382,7 +1379,7 @@ void LLMessageSystem::logMsgFromInvalidCircuit( const LLHost& host, BOOL recv_re
<< nullToEmpty(mMessageReader->getMessageName())
<< (recv_reliable ? " reliable" : "")
<< " REJECTED";
- LL_INFOS("Messaging") << str.str() << llendl;
+ LL_INFOS("Messaging") << str.str() << LL_ENDL;
}
// nope!
// cout << "Rejecting unexpected message " << mCurrentMessageTemplate->mName << " from " << hex << ip << " , " << dec << port << endl;
@@ -1390,7 +1387,7 @@ void LLMessageSystem::logMsgFromInvalidCircuit( const LLHost& host, BOOL recv_re
// Keep track of rejected messages as well
if (mNumMessageCounts >= MAX_MESSAGE_COUNT_NUM)
{
- LL_WARNS("Messaging") << "Got more than " << MAX_MESSAGE_COUNT_NUM << " packets without clearing counts" << llendl;
+ LL_WARNS("Messaging") << "Got more than " << MAX_MESSAGE_COUNT_NUM << " packets without clearing counts" << LL_ENDL;
}
else
{
@@ -1409,7 +1406,7 @@ S32 LLMessageSystem::sendMessage(
{
if (!(host.isOk()))
{
- LL_WARNS("Messaging") << "trying to send message to invalid host" << llendl;
+ LL_WARNS("Messaging") << "trying to send message to invalid host" << LL_ENDL;
return 0;
}
@@ -1427,14 +1424,14 @@ void LLMessageSystem::logTrustedMsgFromUntrustedCircuit( const LLHost& host )
LL_WARNS("Messaging") << "Received trusted message on untrusted circuit. "
<< "Will reply with deny. "
<< "Message: " << nullToEmpty(mMessageReader->getMessageName())
- << " Host: " << host << llendl;
+ << " Host: " << host << LL_ENDL;
}
if (mNumMessageCounts >= MAX_MESSAGE_COUNT_NUM)
{
LL_WARNS("Messaging") << "got more than " << MAX_MESSAGE_COUNT_NUM
<< " packets without clearing counts"
- << llendl;
+ << LL_ENDL;
}
else
{
@@ -1452,7 +1449,7 @@ void LLMessageSystem::logValidMsg(LLCircuitData *cdp, const LLHost& host, BOOL r
{
if (mNumMessageCounts >= MAX_MESSAGE_COUNT_NUM)
{
- LL_WARNS("Messaging") << "Got more than " << MAX_MESSAGE_COUNT_NUM << " packets without clearing counts" << llendl;
+ LL_WARNS("Messaging") << "Got more than " << MAX_MESSAGE_COUNT_NUM << " packets without clearing counts" << LL_ENDL;
}
else
{
@@ -1481,7 +1478,7 @@ void LLMessageSystem::logValidMsg(LLCircuitData *cdp, const LLHost& host, BOOL r
<< (recv_reliable ? " reliable" : "")
<< (recv_resent ? " resent" : "")
<< (recv_acks ? " acks" : "");
- LL_INFOS("Messaging") << str.str() << llendl;
+ LL_INFOS("Messaging") << str.str() << LL_ENDL;
}
}
@@ -1491,54 +1488,54 @@ void LLMessageSystem::sanityCheck()
// if (!mCurrentRMessageData)
// {
-// LL_ERRS("Messaging") << "mCurrentRMessageData is NULL" << llendl;
+// LL_ERRS("Messaging") << "mCurrentRMessageData is NULL" << LL_ENDL;
// }
// if (!mCurrentRMessageTemplate)
// {
-// LL_ERRS("Messaging") << "mCurrentRMessageTemplate is NULL" << llendl;
+// LL_ERRS("Messaging") << "mCurrentRMessageTemplate is NULL" << LL_ENDL;
// }
// if (!mCurrentRTemplateBlock)
// {
-// LL_ERRS("Messaging") << "mCurrentRTemplateBlock is NULL" << llendl;
+// LL_ERRS("Messaging") << "mCurrentRTemplateBlock is NULL" << LL_ENDL;
// }
// if (!mCurrentRDataBlock)
// {
-// LL_ERRS("Messaging") << "mCurrentRDataBlock is NULL" << llendl;
+// LL_ERRS("Messaging") << "mCurrentRDataBlock is NULL" << LL_ENDL;
// }
// if (!mCurrentSMessageData)
// {
-// LL_ERRS("Messaging") << "mCurrentSMessageData is NULL" << llendl;
+// LL_ERRS("Messaging") << "mCurrentSMessageData is NULL" << LL_ENDL;
// }
// if (!mCurrentSMessageTemplate)
// {
-// LL_ERRS("Messaging") << "mCurrentSMessageTemplate is NULL" << llendl;
+// LL_ERRS("Messaging") << "mCurrentSMessageTemplate is NULL" << LL_ENDL;
// }
// if (!mCurrentSTemplateBlock)
// {
-// LL_ERRS("Messaging") << "mCurrentSTemplateBlock is NULL" << llendl;
+// LL_ERRS("Messaging") << "mCurrentSTemplateBlock is NULL" << LL_ENDL;
// }
// if (!mCurrentSDataBlock)
// {
-// LL_ERRS("Messaging") << "mCurrentSDataBlock is NULL" << llendl;
+// LL_ERRS("Messaging") << "mCurrentSDataBlock is NULL" << LL_ENDL;
// }
}
void LLMessageSystem::showCircuitInfo()
{
- LL_INFOS("Messaging") << mCircuitInfo << llendl;
+ LL_INFOS("Messaging") << mCircuitInfo << LL_ENDL;
}
void LLMessageSystem::dumpCircuitInfo()
{
- lldebugst(LLERR_CIRCUIT_INFO) << mCircuitInfo << llendl;
+ LL_DEBUGS("Messaging") << mCircuitInfo << LL_ENDL;
}
/* virtual */
@@ -1582,7 +1579,7 @@ void LLMessageSystem::enableCircuit(const LLHost &host, BOOL trusted)
void LLMessageSystem::disableCircuit(const LLHost &host)
{
- LL_INFOS("Messaging") << "LLMessageSystem::disableCircuit for " << host << llendl;
+ LL_INFOS("Messaging") << "LLMessageSystem::disableCircuit for " << host << LL_ENDL;
U32 code = gMessageSystem->findCircuitCode( host );
// Don't need to do this, as we're removing the circuit info anyway - djs 01/28/03
@@ -1595,7 +1592,7 @@ void LLMessageSystem::disableCircuit(const LLHost &host)
code_session_map_t::iterator it = mCircuitCodes.find(code);
if(it != mCircuitCodes.end())
{
- LL_INFOS("Messaging") << "Circuit " << code << " removed from list" << llendl;
+ LL_INFOS("Messaging") << "Circuit " << code << " removed from list" << LL_ENDL;
//mCircuitCodes.removeData(code);
mCircuitCodes.erase(it);
}
@@ -1611,7 +1608,7 @@ void LLMessageSystem::disableCircuit(const LLHost &host)
U32 old_port = (U32)(ip_port & (U64)0xFFFFFFFF);
U32 old_ip = (U32)(ip_port >> 32);
- LL_INFOS("Messaging") << "Host " << LLHost(old_ip, old_port) << " circuit " << code << " removed from lookup table" << llendl;
+ LL_INFOS("Messaging") << "Host " << LLHost(old_ip, old_port) << " circuit " << code << " removed from lookup table" << LL_ENDL;
gMessageSystem->mIPPortToCircuitCode.erase(ip_port);
}
mCircuitInfo.removeCircuitData(host);
@@ -1621,7 +1618,7 @@ void LLMessageSystem::disableCircuit(const LLHost &host)
// Sigh, since we can open circuits which don't have circuit
// codes, it's possible for this to happen...
- LL_WARNS("Messaging") << "Couldn't find circuit code for " << host << llendl;
+ LL_WARNS("Messaging") << "Couldn't find circuit code for " << host << LL_ENDL;
}
}
@@ -1652,7 +1649,7 @@ BOOL LLMessageSystem::checkCircuitBlocked(const U32 circuit)
if (!host.isOk())
{
- LL_DEBUGS("Messaging") << "checkCircuitBlocked: Unknown circuit " << circuit << llendl;
+ LL_DEBUGS("Messaging") << "checkCircuitBlocked: Unknown circuit " << circuit << LL_ENDL;
return TRUE;
}
@@ -1663,7 +1660,7 @@ BOOL LLMessageSystem::checkCircuitBlocked(const U32 circuit)
}
else
{
- LL_INFOS("Messaging") << "checkCircuitBlocked(circuit): Unknown host - " << host << llendl;
+ LL_INFOS("Messaging") << "checkCircuitBlocked(circuit): Unknown host - " << host << LL_ENDL;
return FALSE;
}
}
@@ -1674,7 +1671,7 @@ BOOL LLMessageSystem::checkCircuitAlive(const U32 circuit)
if (!host.isOk())
{
- LL_DEBUGS("Messaging") << "checkCircuitAlive: Unknown circuit " << circuit << llendl;
+ LL_DEBUGS("Messaging") << "checkCircuitAlive: Unknown circuit " << circuit << LL_ENDL;
return FALSE;
}
@@ -1685,7 +1682,7 @@ BOOL LLMessageSystem::checkCircuitAlive(const U32 circuit)
}
else
{
- LL_INFOS("Messaging") << "checkCircuitAlive(circuit): Unknown host - " << host << llendl;
+ LL_INFOS("Messaging") << "checkCircuitAlive(circuit): Unknown host - " << host << LL_ENDL;
return FALSE;
}
}
@@ -1699,7 +1696,7 @@ BOOL LLMessageSystem::checkCircuitAlive(const LLHost &host)
}
else
{
- LL_DEBUGS("Messaging") << "checkCircuitAlive(host): Unknown host - " << host << llendl;
+ LL_DEBUGS("Messaging") << "checkCircuitAlive(host): Unknown host - " << host << LL_ENDL;
return FALSE;
}
}
@@ -1851,18 +1848,18 @@ void LLMessageSystem::processAssignCircuitCode(LLMessageSystem* msg, void**)
{
LL_WARNS("Messaging") << "AssignCircuitCode, bad session id. Expecting "
<< msg->getMySessionID() << " but got " << session_id
- << llendl;
+ << LL_ENDL;
return;
}
U32 code;
msg->getU32Fast(_PREHASH_CircuitCode, _PREHASH_Code, code);
if (!code)
{
- LL_ERRS("Messaging") << "Assigning circuit code of zero!" << llendl;
+ LL_ERRS("Messaging") << "Assigning circuit code of zero!" << LL_ENDL;
}
msg->mOurCircuitCode = code;
- LL_INFOS("Messaging") << "Circuit code " << code << " assigned." << llendl;
+ LL_INFOS("Messaging") << "Circuit code " << code << " assigned." << LL_ENDL;
}
*/
@@ -1886,20 +1883,20 @@ bool LLMessageSystem::addCircuitCode(U32 code, const LLUUID& session_id)
{
if(!code)
{
- LL_WARNS("Messaging") << "addCircuitCode: zero circuit code" << llendl;
+ LL_WARNS("Messaging") << "addCircuitCode: zero circuit code" << LL_ENDL;
return false;
}
code_session_map_t::iterator it = mCircuitCodes.find(code);
if(it == mCircuitCodes.end())
{
- LL_INFOS("Messaging") << "New circuit code " << code << " added" << llendl;
+ LL_INFOS("Messaging") << "New circuit code " << code << " added" << LL_ENDL;
//msg->mCircuitCodes[circuit_code] = circuit_code;
mCircuitCodes.insert(code_session_map_t::value_type(code, session_id));
}
else
{
- LL_INFOS("Messaging") << "Duplicate circuit code " << code << " added" << llendl;
+ LL_INFOS("Messaging") << "Duplicate circuit code " << code << " added" << LL_ENDL;
}
return true;
}
@@ -1933,7 +1930,7 @@ void LLMessageSystem::processUseCircuitCode(LLMessageSystem* msg,
// Whoah, abort! We don't know anything about this circuit code.
LL_WARNS("Messaging") << "UseCircuitCode for " << circuit_code_in
<< " received without AddCircuitCode message - aborting"
- << llendl;
+ << LL_ENDL;
return;
}
@@ -1945,7 +1942,7 @@ void LLMessageSystem::processUseCircuitCode(LLMessageSystem* msg,
{
LL_WARNS("Messaging") << "UseCircuitCode unmatched session id. Got "
<< session_id << " but expected " << (*it).second
- << llendl;
+ << LL_ENDL;
return;
}
@@ -1958,7 +1955,7 @@ void LLMessageSystem::processUseCircuitCode(LLMessageSystem* msg,
if ((ip_port_old == ip_port_in) && (circuit_code_old == circuit_code_in))
{
// Current information is the same as incoming info, ignore
- LL_INFOS("Messaging") << "Got duplicate UseCircuitCode for circuit " << circuit_code_in << " to " << msg->getSender() << llendl;
+ LL_INFOS("Messaging") << "Got duplicate UseCircuitCode for circuit " << circuit_code_in << " to " << msg->getSender() << LL_ENDL;
return;
}
@@ -1968,27 +1965,27 @@ void LLMessageSystem::processUseCircuitCode(LLMessageSystem* msg,
msg->mIPPortToCircuitCode.erase(ip_port_old);
U32 old_port = (U32)(ip_port_old & (U64)0xFFFFFFFF);
U32 old_ip = (U32)(ip_port_old >> 32);
- LL_INFOS("Messaging") << "Removing derelict lookup entry for circuit " << circuit_code_old << " to " << LLHost(old_ip, old_port) << llendl;
+ LL_INFOS("Messaging") << "Removing derelict lookup entry for circuit " << circuit_code_old << " to " << LLHost(old_ip, old_port) << LL_ENDL;
}
if (circuit_code_old)
{
LLHost cur_host(ip, port);
- LL_WARNS("Messaging") << "Disabling existing circuit for " << cur_host << llendl;
+ LL_WARNS("Messaging") << "Disabling existing circuit for " << cur_host << LL_ENDL;
msg->disableCircuit(cur_host);
if (circuit_code_old == circuit_code_in)
{
- LL_WARNS("Messaging") << "Asymmetrical circuit to ip/port lookup!" << llendl;
- LL_WARNS("Messaging") << "Multiple circuit codes for " << cur_host << " probably!" << llendl;
- LL_WARNS("Messaging") << "Permanently disabling circuit" << llendl;
+ LL_WARNS("Messaging") << "Asymmetrical circuit to ip/port lookup!" << LL_ENDL;
+ LL_WARNS("Messaging") << "Multiple circuit codes for " << cur_host << " probably!" << LL_ENDL;
+ LL_WARNS("Messaging") << "Permanently disabling circuit" << LL_ENDL;
return;
}
else
{
LL_WARNS("Messaging") << "Circuit code changed for " << msg->getSender()
<< " from " << circuit_code_old << " to "
- << circuit_code_in << llendl;
+ << circuit_code_in << LL_ENDL;
}
}
@@ -2030,7 +2027,7 @@ void LLMessageSystem::processUseCircuitCode(LLMessageSystem* msg,
LL_INFOS("Messaging") << "Circuit code " << circuit_code_in << " from "
<< msg->getSender() << " for agent " << id << " in session "
- << session_id << llendl;
+ << session_id << LL_ENDL;
const LLUseCircuitCodeResponder* responder =
(const LLUseCircuitCodeResponder*) user;
@@ -2041,7 +2038,7 @@ void LLMessageSystem::processUseCircuitCode(LLMessageSystem* msg,
}
else
{
- LL_WARNS("Messaging") << "Got zero circuit code in use_circuit_code" << llendl;
+ LL_WARNS("Messaging") << "Got zero circuit code in use_circuit_code" << LL_ENDL;
}
}
@@ -2063,7 +2060,7 @@ void LLMessageSystem::processError(LLMessageSystem* msg, void**)
LL_WARNS("Messaging") << "Message error from " << msg->getSender() << " - "
<< error_code << " " << error_token << " " << error_id << " \""
- << error_system << "\" \"" << error_message << "\"" << llendl;
+ << error_system << "\" \"" << error_message << "\"" << LL_ENDL;
}
@@ -2099,7 +2096,7 @@ void LLMessageSystem::dispatch(
gMessageSystem->mMessageTemplates.end()) &&
!LLMessageConfig::isValidMessage(msg_name))
{
- LL_WARNS("Messaging") << "Ignoring unknown message " << msg_name << llendl;
+ LL_WARNS("Messaging") << "Ignoring unknown message " << msg_name << LL_ENDL;
responsep->notFound("Invalid message name");
return;
}
@@ -2110,12 +2107,12 @@ void LLMessageSystem::dispatch(
if (!handler)
{
LL_WARNS("Messaging") << "LLMessageService::dispatch > no handler for "
- << path << llendl;
+ << path << LL_ENDL;
return;
}
// enable this for output of message names
- //LL_INFOS("Messaging") << "< \"" << msg_name << "\"" << llendl;
- //lldebugs << "data: " << LLSDNotationStreamer(message) << llendl;
+ //LL_INFOS("Messaging") << "< \"" << msg_name << "\"" << LL_ENDL;
+ //LL_DEBUGS() << "data: " << LLSDNotationStreamer(message) << LL_ENDL;
handler->post(responsep, context, message);
}
@@ -2233,7 +2230,7 @@ S32 LLMessageSystem::sendError(
else
{
LL_WARNS("Messaging") << "Data and message were too large -- data removed."
- << llendl;
+ << LL_ENDL;
addBinaryData("Data", NULL, 0);
}
return sendReliable(host);
@@ -2253,7 +2250,7 @@ void process_packet_ack(LLMessageSystem *msgsystem, void** /*user_data*/)
for (S32 i = 0; i < ack_count; i++)
{
msgsystem->getU32Fast(_PREHASH_Packets, _PREHASH_ID, packet_id, i);
-// LL_DEBUGS("Messaging") << "ack recvd' from " << host << " for packet " << (TPACKETID)packet_id << llendl;
+// LL_DEBUGS("Messaging") << "ack recvd' from " << host << " for packet " << (TPACKETID)packet_id << LL_ENDL;
cdp->ackReliablePacket(packet_id);
}
if (!cdp->getUnackedPacketCount())
@@ -2274,12 +2271,12 @@ void process_log_messages(LLMessageSystem* msg, void**)
if (log_message)
{
- LL_INFOS("Messaging") << "Starting logging via message" << llendl;
+ LL_INFOS("Messaging") << "Starting logging via message" << LL_ENDL;
msg->startLogging();
}
else
{
- LL_INFOS("Messaging") << "Stopping logging via message" << llendl;
+ LL_INFOS("Messaging") << "Stopping logging via message" << LL_ENDL;
msg->stopLogging();
}
}*/
@@ -2299,7 +2296,7 @@ void process_create_trusted_circuit(LLMessageSystem *msg, void **)
if (!cdp)
{
LL_WARNS("Messaging") << "Attempt to create trusted circuit without circuit data: "
- << msg->getSender() << llendl;
+ << msg->getSender() << LL_ENDL;
return;
}
@@ -2318,13 +2315,13 @@ void process_create_trusted_circuit(LLMessageSystem *msg, void **)
if( msg->getBlockUntrustedInterface() )
{
LL_WARNS("Messaging") << "Ignoring CreateTrustedCircuit on public interface from host: "
- << msg->getSender() << llendl;
+ << msg->getSender() << LL_ENDL;
return;
}
else
{
LL_WARNS("Messaging") << "Processing CreateTrustedCircuit on public interface from host: "
- << msg->getSender() << llendl;
+ << msg->getSender() << LL_ENDL;
}
}
@@ -2340,7 +2337,7 @@ void process_create_trusted_circuit(LLMessageSystem *msg, void **)
if(msg->isMatchingDigestForWindowAndUUIDs(their_digest, TRUST_TIME_WINDOW, local_id, remote_id))
{
cdp->setTrusted(TRUE);
- LL_INFOS("Messaging") << "Trusted digest from " << msg->getSender() << llendl;
+ LL_INFOS("Messaging") << "Trusted digest from " << msg->getSender() << LL_ENDL;
return;
}
else if (cdp->getTrusted())
@@ -2350,13 +2347,13 @@ void process_create_trusted_circuit(LLMessageSystem *msg, void **)
// the message system is being slow. Don't bother sending the deny, as it may continually
// ping-pong back and forth on a very hosed circuit.
LL_WARNS("Messaging") << "Ignoring bad digest from known trusted circuit: " << their_digest
- << " host: " << msg->getSender() << llendl;
+ << " host: " << msg->getSender() << LL_ENDL;
return;
}
else
{
LL_WARNS("Messaging") << "Bad digest from known circuit: " << their_digest
- << " host: " << msg->getSender() << llendl;
+ << " host: " << msg->getSender() << LL_ENDL;
msg->sendDenyTrustedCircuit(msg->getSender());
return;
}
@@ -2392,13 +2389,13 @@ void process_deny_trusted_circuit(LLMessageSystem *msg, void **)
if( msg->getBlockUntrustedInterface() )
{
LL_WARNS("Messaging") << "Ignoring DenyTrustedCircuit on public interface from host: "
- << msg->getSender() << llendl;
+ << msg->getSender() << LL_ENDL;
return;
}
else
{
LL_WARNS("Messaging") << "Processing DenyTrustedCircuit on public interface from host: "
- << msg->getSender() << llendl;
+ << msg->getSender() << LL_ENDL;
}
}
@@ -2411,7 +2408,7 @@ void process_deny_trusted_circuit(LLMessageSystem *msg, void **)
// *TODO: probably should keep a count of number of resends
// per circuit, and stop resending after a while.
LL_INFOS("Messaging") << "Got DenyTrustedCircuit. Sending CreateTrustedCircuit to "
- << msg->getSender() << llendl;
+ << msg->getSender() << LL_ENDL;
msg->sendCreateTrustedCircuit(msg->getSender(), local_id, remote_id);
}
@@ -2527,11 +2524,11 @@ bool start_messaging_system(
if (gMessageSystem->mMessageFileVersionNumber != gPrehashVersionNumber)
{
LL_INFOS("AppInit") << "Message template version does not match prehash version number" << LL_ENDL;
- LL_INFOS("AppInit") << "Run simulator with -prehash command line option to rebuild prehash data" << llendl;
+ LL_INFOS("AppInit") << "Run simulator with -prehash command line option to rebuild prehash data" << LL_ENDL;
}
else
{
- LL_DEBUGS("AppInit") << "Message template version matches prehash version number" << llendl;
+ LL_DEBUGS("AppInit") << "Message template version matches prehash version number" << LL_ENDL;
}
}
@@ -2577,7 +2574,7 @@ void LLMessageSystem::startLogging()
str << "\t<-\tincoming message" <<std::endl;
str << "\t->\toutgoing message" << std::endl;
str << " <> host size zero id name";
- LL_INFOS("Messaging") << str.str() << llendl;
+ LL_INFOS("Messaging") << str.str() << LL_ENDL;
}
void LLMessageSystem::stopLogging()
@@ -2585,7 +2582,7 @@ void LLMessageSystem::stopLogging()
if(mVerboseLog)
{
mVerboseLog = FALSE;
- LL_INFOS("Messaging") << "END MESSAGE LOG" << llendl;
+ LL_INFOS("Messaging") << "END MESSAGE LOG" << LL_ENDL;
}
}
@@ -2693,7 +2690,7 @@ void end_messaging_system(bool print_summary)
{
std::ostringstream str;
gMessageSystem->summarizeLogs(str);
- LL_INFOS("Messaging") << str.str().c_str() << llendl;
+ LL_INFOS("Messaging") << str.str().c_str() << LL_ENDL;
}
delete gMessageSystem;
@@ -2746,7 +2743,7 @@ void LLMessageSystem::dumpReceiveCounts()
if(mNumMessageCounts > 0)
{
- LL_DEBUGS("Messaging") << "Dump: " << mNumMessageCounts << " messages processed in " << mReceiveTime << " seconds" << llendl;
+ LL_DEBUGS("Messaging") << "Dump: " << mNumMessageCounts << " messages processed in " << mReceiveTime << " seconds" << LL_ENDL;
for (message_template_name_map_t::const_iterator iter = mMessageTemplates.begin(),
end = mMessageTemplates.end();
iter != end; iter++)
@@ -2755,7 +2752,7 @@ void LLMessageSystem::dumpReceiveCounts()
if (mt->mReceiveCount > 0)
{
LL_INFOS("Messaging") << "Num: " << std::setw(3) << mt->mReceiveCount << " Bytes: " << std::setw(6) << mt->mReceiveBytes
- << " Invalid: " << std::setw(3) << mt->mReceiveInvalid << " " << mt->mName << " " << llround(100 * mt->mDecodeTimeThisFrame / mReceiveTime) << "%" << llendl;
+ << " Invalid: " << std::setw(3) << mt->mReceiveInvalid << " " << mt->mName << " " << llround(100 * mt->mDecodeTimeThisFrame / mReceiveTime) << "%" << LL_ENDL;
}
}
}
@@ -2872,7 +2869,7 @@ S32 LLMessageSystem::zeroCodeExpand(U8** data, S32* data_size)
if ((*data_size ) < LL_MINIMUM_VALID_PACKET_SIZE)
{
LL_WARNS("Messaging") << "zeroCodeExpand() called with data_size of " << *data_size
- << llendl;
+ << LL_ENDL;
}
mTotalBytesIn += *data_size;
@@ -2911,7 +2908,7 @@ S32 LLMessageSystem::zeroCodeExpand(U8** data, S32* data_size)
{
if (outptr > (&mEncodedRecvBuffer[MAX_BUFFER_SIZE-1]))
{
- LL_WARNS("Messaging") << "attempt to write past reasonable encoded buffer size 1" << llendl;
+ LL_WARNS("Messaging") << "attempt to write past reasonable encoded buffer size 1" << LL_ENDL;
callExceptionFunc(MX_WROTE_PAST_BUFFER_SIZE);
outptr = mEncodedRecvBuffer;
break;
@@ -2923,7 +2920,7 @@ S32 LLMessageSystem::zeroCodeExpand(U8** data, S32* data_size)
*outptr++ = *inptr++;
if (outptr > (&mEncodedRecvBuffer[MAX_BUFFER_SIZE-256]))
{
- LL_WARNS("Messaging") << "attempt to write past reasonable encoded buffer size 2" << llendl;
+ LL_WARNS("Messaging") << "attempt to write past reasonable encoded buffer size 2" << LL_ENDL;
callExceptionFunc(MX_WROTE_PAST_BUFFER_SIZE);
outptr = mEncodedRecvBuffer;
count = -1;
@@ -2942,7 +2939,7 @@ S32 LLMessageSystem::zeroCodeExpand(U8** data, S32* data_size)
{
if (outptr > (&mEncodedRecvBuffer[MAX_BUFFER_SIZE-(*inptr)]))
{
- LL_WARNS("Messaging") << "attempt to write past reasonable encoded buffer size 3" << llendl;
+ LL_WARNS("Messaging") << "attempt to write past reasonable encoded buffer size 3" << LL_ENDL;
callExceptionFunc(MX_WROTE_PAST_BUFFER_SIZE);
outptr = mEncodedRecvBuffer;
}
@@ -2966,7 +2963,7 @@ void LLMessageSystem::addTemplate(LLMessageTemplate *templatep)
if (mMessageTemplates.count(templatep->mName) > 0)
{
LL_ERRS("Messaging") << templatep->mName << " already used as a template name!"
- << llendl;
+ << LL_ENDL;
}
mMessageTemplates[templatep->mName] = templatep;
mMessageNumbers[templatep->mMessageNumber] = templatep;
@@ -2982,7 +2979,7 @@ void LLMessageSystem::setHandlerFuncFast(const char *name, void (*handler_func)(
}
else
{
- LL_ERRS("Messaging") << name << " is not a known message name!" << llendl;
+ LL_ERRS("Messaging") << name << " is not a known message name!" << LL_ENDL;
}
}
@@ -2995,7 +2992,7 @@ bool LLMessageSystem::callHandler(const char *name,
if(iter == mMessageTemplates.end())
{
LL_WARNS("Messaging") << "LLMessageSystem::callHandler: unknown message "
- << name << llendl;
+ << name << LL_ENDL;
return false;
}
@@ -3006,7 +3003,7 @@ bool LLMessageSystem::callHandler(const char *name,
<< name
<< " from "
<< (trustedSource ? "trusted " : "untrusted ")
- << "source" << llendl;
+ << "source" << LL_ENDL;
return false;
}
@@ -3142,7 +3139,7 @@ bool LLMessageSystem::generateDigestForWindowAndUUIDs(char* digest, const S32 wi
std::string shared_secret = get_shared_secret();
if(shared_secret.empty())
{
- LL_ERRS("Messaging") << "Trying to generate complex digest on a machine without a shared secret!" << llendl;
+ LL_ERRS("Messaging") << "Trying to generate complex digest on a machine without a shared secret!" << LL_ENDL;
}
U32 now = (U32)time(NULL);
@@ -3161,7 +3158,7 @@ bool LLMessageSystem::isMatchingDigestForWindowAndUUIDs(const char* digest, cons
std::string shared_secret = get_shared_secret();
if(shared_secret.empty())
{
- LL_ERRS("Messaging") << "Trying to compare complex digests on a machine without a shared secret!" << llendl;
+ LL_ERRS("Messaging") << "Trying to compare complex digests on a machine without a shared secret!" << LL_ENDL;
}
char our_digest[MD5HEX_STR_SIZE]; /* Flawfinder: ignore */
@@ -3208,7 +3205,7 @@ bool LLMessageSystem::generateDigestForWindow(char* digest, const S32 window) co
std::string shared_secret = get_shared_secret();
if(shared_secret.empty())
{
- LL_ERRS("Messaging") << "Trying to generate simple digest on a machine without a shared secret!" << llendl;
+ LL_ERRS("Messaging") << "Trying to generate simple digest on a machine without a shared secret!" << LL_ENDL;
}
U32 now = (U32)time(NULL);
@@ -3227,7 +3224,7 @@ bool LLMessageSystem::isMatchingDigestForWindow(const char* digest, S32 const wi
std::string shared_secret = get_shared_secret();
if(shared_secret.empty())
{
- LL_ERRS("Messaging") << "Trying to compare simple digests on a machine without a shared secret!" << llendl;
+ LL_ERRS("Messaging") << "Trying to compare simple digests on a machine without a shared secret!" << LL_ENDL;
}
char our_digest[MD5HEX_STR_SIZE]; /* Flawfinder: ignore */
@@ -3261,12 +3258,12 @@ void LLMessageSystem::sendCreateTrustedCircuit(const LLHost &host, const LLUUID
char digest[MD5HEX_STR_SIZE]; /* Flawfinder: ignore */
if (id1.isNull())
{
- LL_WARNS("Messaging") << "Can't send CreateTrustedCircuit to " << host << " because we don't have the local end point ID" << llendl;
+ LL_WARNS("Messaging") << "Can't send CreateTrustedCircuit to " << host << " because we don't have the local end point ID" << LL_ENDL;
return;
}
if (id2.isNull())
{
- LL_WARNS("Messaging") << "Can't send CreateTrustedCircuit to " << host << " because we don't have the remote end point ID" << llendl;
+ LL_WARNS("Messaging") << "Can't send CreateTrustedCircuit to " << host << " because we don't have the remote end point ID" << LL_ENDL;
return;
}
generateDigestForWindowAndUUIDs(digest, TRUST_TIME_WINDOW, id1, id2);
@@ -3274,7 +3271,7 @@ void LLMessageSystem::sendCreateTrustedCircuit(const LLHost &host, const LLUUID
nextBlockFast(_PREHASH_DataBlock);
addUUIDFast(_PREHASH_EndPointID, id1);
addBinaryDataFast(_PREHASH_Digest, digest, MD5HEX_STR_BYTES);
- LL_INFOS("Messaging") << "xmitting digest: " << digest << " Host: " << host << llendl;
+ LL_INFOS("Messaging") << "xmitting digest: " << digest << " Host: " << host << LL_ENDL;
sendMessage(host);
}
@@ -3288,10 +3285,10 @@ void LLMessageSystem::reallySendDenyTrustedCircuit(const LLHost &host)
LLCircuitData *cdp = mCircuitInfo.findCircuit(host);
if (!cdp)
{
- LL_WARNS("Messaging") << "Not sending DenyTrustedCircuit to host without a circuit." << llendl;
+ LL_WARNS("Messaging") << "Not sending DenyTrustedCircuit to host without a circuit." << LL_ENDL;
return;
}
- LL_INFOS("Messaging") << "Sending DenyTrustedCircuit to " << host << llendl;
+ LL_INFOS("Messaging") << "Sending DenyTrustedCircuit to " << host << LL_ENDL;
newMessageFast(_PREHASH_DenyTrustedCircuit);
nextBlockFast(_PREHASH_DataBlock);
addUUIDFast(_PREHASH_EndPointID, cdp->getLocalEndPointID());
@@ -3312,7 +3309,7 @@ void LLMessageSystem::establishBidirectionalTrust(const LLHost &host, S64 frame_
std::string shared_secret = get_shared_secret();
if(shared_secret.empty())
{
- LL_ERRS("Messaging") << "Trying to establish bidirectional trust on a machine without a shared secret!" << llendl;
+ LL_ERRS("Messaging") << "Trying to establish bidirectional trust on a machine without a shared secret!" << LL_ENDL;
}
LLTimer timeout;
@@ -3364,8 +3361,8 @@ void LLMessageSystem::establishBidirectionalTrust(const LLHost &host, S64 frame_
void LLMessageSystem::dumpPacketToLog()
{
- LL_WARNS("Messaging") << "Packet Dump from:" << mPacketRing.getLastSender() << llendl;
- LL_WARNS("Messaging") << "Packet Size:" << mTrueReceiveSize << llendl;
+ LL_WARNS("Messaging") << "Packet Dump from:" << mPacketRing.getLastSender() << LL_ENDL;
+ LL_WARNS("Messaging") << "Packet Size:" << mTrueReceiveSize << LL_ENDL;
char line_buffer[256]; /* Flawfinder: ignore */
S32 i;
S32 cur_line_pos = 0;
@@ -3380,13 +3377,13 @@ void LLMessageSystem::dumpPacketToLog()
if (cur_line_pos >= 16)
{
cur_line_pos = 0;
- LL_WARNS("Messaging") << "PD:" << cur_line << "PD:" << line_buffer << llendl;
+ LL_WARNS("Messaging") << "PD:" << cur_line << "PD:" << line_buffer << LL_ENDL;
cur_line++;
}
}
if (cur_line_pos)
{
- LL_WARNS("Messaging") << "PD:" << cur_line << "PD:" << line_buffer << llendl;
+ LL_WARNS("Messaging") << "PD:" << cur_line << "PD:" << line_buffer << LL_ENDL;
}
}
@@ -3930,7 +3927,7 @@ void LLMessageSystem::getStringFast(const char *block, const char *var,
{
if(buffer_size <= 0)
{
- LL_WARNS("Messaging") << "buffer_size <= 0" << llendl;
+ LL_WARNS("Messaging") << "buffer_size <= 0" << LL_ENDL;
}
mMessageReader->getString(block, var, buffer_size, s, blocknum);
}
@@ -4039,7 +4036,7 @@ void LLMessageSystem::banUdpMessage(const std::string& name)
}
else
{
- llwarns << "Attempted to ban an unknown message: " << name << "." << llendl;
+ LL_WARNS() << "Attempted to ban an unknown message: " << name << "." << LL_ENDL;
}
}
const LLHost& LLMessageSystem::getSender() const
diff --git a/indra/llmessage/message.h b/indra/llmessage/message.h
index e94e2282a0..05e384d939 100755
--- a/indra/llmessage/message.h
+++ b/indra/llmessage/message.h
@@ -45,7 +45,7 @@
#include "llerror.h"
#include "net.h"
-#include "string_table.h"
+#include "llstringtable.h"
#include "llcircuit.h"
#include "lltimer.h"
#include "llpacketring.h"
diff --git a/indra/llmessage/net.h b/indra/llmessage/net.h
index 0f2437479d..beb67bae4e 100755
--- a/indra/llmessage/net.h
+++ b/indra/llmessage/net.h
@@ -67,5 +67,8 @@ const S32 ETHERNET_MTU_BYTES = 1500;
const S32 MTUBITS = MTUBYTES*8;
const S32 MTUU32S = MTUBITS/32;
+// For automatic port discovery when running multiple viewers on one host
+const U32 PORT_DISCOVERY_RANGE_MIN = 13000;
+const U32 PORT_DISCOVERY_RANGE_MAX = PORT_DISCOVERY_RANGE_MIN + 50;
#endif
diff --git a/indra/llmessage/partsyspacket.cpp b/indra/llmessage/partsyspacket.cpp
index ad21614258..b07a050617 100755
--- a/indra/llmessage/partsyspacket.cpp
+++ b/indra/llmessage/partsyspacket.cpp
@@ -28,7 +28,7 @@
#include "linden_common.h"
#include "partsyspacket.h"
-#include "imageids.h"
+#include "indra_constants.h"
// this function is global
void gSetInitDataDefaults(LLPartInitData *setMe)
diff --git a/indra/llmessage/patch_code.cpp b/indra/llmessage/patch_code.cpp
index e5d7f19448..cdf5fdb3c6 100755
--- a/indra/llmessage/patch_code.cpp
+++ b/indra/llmessage/patch_code.cpp
@@ -31,7 +31,7 @@
#include "v3math.h"
#include "patch_dct.h"
#include "patch_code.h"
-#include "bitpack.h"
+#include "llbitpack.h"
U32 gPatchSize, gWordBits;
diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt
index 8173083a85..d1475cf734 100755
--- a/indra/llprimitive/CMakeLists.txt
+++ b/indra/llprimitive/CMakeLists.txt
@@ -42,6 +42,7 @@ set(llprimitive_HEADER_FILES
CMakeLists.txt
legacy_object_types.h
+ lllslconstants.h
llmaterial.h
llmaterialid.h
llmaterialtable.h
diff --git a/indra/llcommon/lllslconstants.h b/indra/llprimitive/lllslconstants.h
index 9f32598e61..9f32598e61 100755
--- a/indra/llcommon/lllslconstants.h
+++ b/indra/llprimitive/lllslconstants.h
diff --git a/indra/llprimitive/llmaterialtable.cpp b/indra/llprimitive/llmaterialtable.cpp
index b4539ebee9..4709e769c1 100755
--- a/indra/llprimitive/llmaterialtable.cpp
+++ b/indra/llprimitive/llmaterialtable.cpp
@@ -27,10 +27,10 @@
#include "linden_common.h"
#include "llmaterialtable.h"
+#include "indra_constants.h"
#include "llstl.h"
#include "material_codes.h"
#include "sound_ids.h"
-#include "imageids.h"
LLMaterialTable LLMaterialTable::basic(1);
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index 2fa77177f5..1b4c68481f 100755
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
@@ -38,7 +38,6 @@
#include "lldatapacker.h"
#include "llsdutil_math.h"
#include "llprimtexturelist.h"
-#include "imageids.h"
#include "llmaterialid.h"
/**
diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h
index 47a21beaaf..9edbbff34c 100755
--- a/indra/llprimitive/llprimitive.h
+++ b/indra/llprimitive/llprimitive.h
@@ -540,7 +540,7 @@ void LLPrimitive::setPosition(const F32 x, const F32 y, const F32 z)
}
else
{
- llerrs << "Non Finite in LLPrimitive::setPosition(x,y,z) for " << pCodeToString(mPrimitiveCode) << llendl;
+ LL_ERRS() << "Non Finite in LLPrimitive::setPosition(x,y,z) for " << pCodeToString(mPrimitiveCode) << LL_ENDL;
}
}
@@ -553,7 +553,7 @@ void LLPrimitive::setPosition(const LLVector3& pos)
}
else
{
- llerrs << "Non Finite in LLPrimitive::setPosition(LLVector3) for " << pCodeToString(mPrimitiveCode) << llendl;
+ LL_ERRS() << "Non Finite in LLPrimitive::setPosition(LLVector3) for " << pCodeToString(mPrimitiveCode) << LL_ENDL;
}
}
@@ -565,7 +565,7 @@ void LLPrimitive::setAngularVelocity(const LLVector3& avel)
}
else
{
- llerror("Non Finite in LLPrimitive::setAngularVelocity", 0);
+ LL_ERRS() << "Non Finite in LLPrimitive::setAngularVelocity" << LL_ENDL;
}
}
@@ -577,7 +577,7 @@ void LLPrimitive::setAngularVelocity(const F32 x, const F32 y, const F32 z)
}
else
{
- llerror("Non Finite in LLPrimitive::setAngularVelocity", 0);
+ LL_ERRS() << "Non Finite in LLPrimitive::setAngularVelocity" << LL_ENDL;
}
}
@@ -589,7 +589,7 @@ void LLPrimitive::setVelocity(const LLVector3& vel)
}
else
{
- llerrs << "Non Finite in LLPrimitive::setVelocity(LLVector3) for " << pCodeToString(mPrimitiveCode) << llendl;
+ LL_ERRS() << "Non Finite in LLPrimitive::setVelocity(LLVector3) for " << pCodeToString(mPrimitiveCode) << LL_ENDL;
}
}
@@ -601,7 +601,7 @@ void LLPrimitive::setVelocity(const F32 x, const F32 y, const F32 z)
}
else
{
- llerrs << "Non Finite in LLPrimitive::setVelocity(F32,F32,F32) for " << pCodeToString(mPrimitiveCode) << llendl;
+ LL_ERRS() << "Non Finite in LLPrimitive::setVelocity(F32,F32,F32) for " << pCodeToString(mPrimitiveCode) << LL_ENDL;
}
}
@@ -613,7 +613,7 @@ void LLPrimitive::setVelocityX(const F32 x)
}
else
{
- llerror("Non Finite in LLPrimitive::setVelocityX", 0);
+ LL_ERRS() << "Non Finite in LLPrimitive::setVelocityX" << LL_ENDL;
}
}
@@ -625,7 +625,7 @@ void LLPrimitive::setVelocityY(const F32 y)
}
else
{
- llerror("Non Finite in LLPrimitive::setVelocityY", 0);
+ LL_ERRS() << "Non Finite in LLPrimitive::setVelocityY" << LL_ENDL;
}
}
@@ -637,7 +637,7 @@ void LLPrimitive::setVelocityZ(const F32 z)
}
else
{
- llerror("Non Finite in LLPrimitive::setVelocityZ", 0);
+ LL_ERRS() << "Non Finite in LLPrimitive::setVelocityZ" << LL_ENDL;
}
}
@@ -649,7 +649,7 @@ void LLPrimitive::addVelocity(const LLVector3& vel)
}
else
{
- llerror("Non Finite in LLPrimitive::addVelocity", 0);
+ LL_ERRS() << Non Finite in LLPrimitive::addVelocity" << LL_ENDL;
}
}
@@ -661,7 +661,7 @@ void LLPrimitive::setAcceleration(const LLVector3& accel)
}
else
{
- llerrs << "Non Finite in LLPrimitive::setAcceleration(LLVector3) for " << pCodeToString(mPrimitiveCode) << llendl;
+ LL_ERRS() << "Non Finite in LLPrimitive::setAcceleration(LLVector3) for " << pCodeToString(mPrimitiveCode) << LL_ENDL;
}
}
@@ -673,7 +673,7 @@ void LLPrimitive::setAcceleration(const F32 x, const F32 y, const F32 z)
}
else
{
- llerrs << "Non Finite in LLPrimitive::setAcceleration(F32,F32,F32) for " << pCodeToString(mPrimitiveCode) << llendl;
+ LL_ERRS() << "Non Finite in LLPrimitive::setAcceleration(F32,F32,F32) for " << pCodeToString(mPrimitiveCode) << LL_ENDL;
}
}
#endif // CHECK_FOR_FINITE
diff --git a/indra/llprimitive/tests/llmediaentry_test.cpp b/indra/llprimitive/tests/llmediaentry_test.cpp
index 16e5f894e2..b072ce3964 100755
--- a/indra/llprimitive/tests/llmediaentry_test.cpp
+++ b/indra/llprimitive/tests/llmediaentry_test.cpp
@@ -39,7 +39,7 @@
#include "llsdserialize.h"
#include "../llmediaentry.h"
-#include "lllslconstants.h"
+#include "indra_constants.h"
#define DEFAULT_MEDIA_ENTRY "<llsd>\n\
<map>\n\
diff --git a/indra/llrender/llpostprocess.cpp b/indra/llrender/llpostprocess.cpp
index c0045c8044..e4279ea1e0 100755
--- a/indra/llrender/llpostprocess.cpp
+++ b/indra/llrender/llpostprocess.cpp
@@ -58,7 +58,7 @@ LLPostProcess::LLPostProcess(void) :
/* Do nothing. Needs to be updated to use our current shader system, and to work with the move into llrender.
std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight", XML_FILENAME));
- LL_DEBUGS2("AppInit", "Shaders") << "Loading PostProcess Effects settings from " << pathName << LL_ENDL;
+ LL_DEBUGS("AppInit", "Shaders") << "Loading PostProcess Effects settings from " << pathName << LL_ENDL;
llifstream effectsXML(pathName);
diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt
index c4270a62bd..b3864b3711 100755
--- a/indra/llui/CMakeLists.txt
+++ b/indra/llui/CMakeLists.txt
@@ -142,6 +142,7 @@ set(llui_HEADER_FILES
llbutton.h
llcallbackmap.h
llchatentry.h
+ llchat.h
llcheckboxctrl.h
llclipboard.h
llcombobox.h
@@ -281,7 +282,9 @@ if(LL_TESTS)
include(LLAddBuildTest)
SET(llui_TEST_SOURCE_FILES
llurlmatch.cpp
- llurlentry.cpp
)
LL_ADD_PROJECT_UNIT_TESTS(llui "${llui_TEST_SOURCE_FILES}")
+ # INTEGRATION TESTS
+ set(test_libs llui llmessage llcommon ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES})
+ LL_ADD_INTEGRATION_TEST(llurlentry llurlentry.cpp "${test_libs}")
endif(LL_TESTS)
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index ce4d137478..ed12f686a1 100755
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -591,7 +591,7 @@ BOOL LLButton::handleHover(S32 x, S32 y, MASK mask)
// We only handle the click if the click both started and ended within us
getWindow()->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << llendl;
}
return TRUE;
}
diff --git a/indra/llcommon/llchat.h b/indra/llui/llchat.h
index f5b242fdfc..f5b242fdfc 100755
--- a/indra/llcommon/llchat.h
+++ b/indra/llui/llchat.h
diff --git a/indra/llui/llclipboard.cpp b/indra/llui/llclipboard.cpp
index 14173fdbb0..1d18cb2bb0 100755
--- a/indra/llui/llclipboard.cpp
+++ b/indra/llui/llclipboard.cpp
@@ -88,6 +88,7 @@ bool LLClipboard::pasteFromClipboard(std::vector<LLUUID>& inv_objects) const
{
bool res = false;
S32 count = mObjects.size();
+ inv_objects.reserve(inv_objects.size() + count);
if (count > 0)
{
res = true;
diff --git a/indra/llui/llclipboard.h b/indra/llui/llclipboard.h
index fd2e7610df..58d80e2687 100755
--- a/indra/llui/llclipboard.h
+++ b/indra/llui/llclipboard.h
@@ -31,7 +31,6 @@
#include "llstring.h"
#include "lluuid.h"
-#include "stdenums.h"
#include "llsingleton.h"
#include "llassettype.h"
#include "llinventory.h"
diff --git a/indra/llui/llctrlselectioninterface.h b/indra/llui/llctrlselectioninterface.h
index 2cdcbd88fe..a7b089c8f9 100755
--- a/indra/llui/llctrlselectioninterface.h
+++ b/indra/llui/llctrlselectioninterface.h
@@ -28,8 +28,8 @@
#define LLCTRLSELECTIONINTERFACE_H
#include "stdtypes.h"
-#include "stdenums.h"
#include "llstring.h"
+#include "llui.h"
class LLSD;
class LLUUID;
diff --git a/indra/llui/lldraghandle.cpp b/indra/llui/lldraghandle.cpp
index 5f69c6af31..a36bc4743e 100755
--- a/indra/llui/lldraghandle.cpp
+++ b/indra/llui/lldraghandle.cpp
@@ -365,13 +365,13 @@ BOOL LLDragHandle::handleHover(S32 x, S32 y, MASK mask)
mDragLastScreenY += delta_y;
getWindow()->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" <<llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" <<llendl;
handled = TRUE;
}
else
{
getWindow()->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl;
handled = TRUE;
}
diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp
index 97a52fada4..43c22f8bf3 100755
--- a/indra/llui/llflatlistview.cpp
+++ b/indra/llui/llflatlistview.cpp
@@ -520,7 +520,7 @@ void LLFlatListView::onItemMouseClick(item_pair_t* item_pair, MASK mask)
if (!item_pair->first)
{
- llwarning("Attempt to selet an item pair containing null panel item", 0);
+ LL_WARNS() << "Attempt to selet an item pair containing null panel item" << LL_ENDL;
return;
}
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index d06e2c9334..11802904e4 100755
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -653,7 +653,7 @@ void LLFloater::onVisibilityChange ( BOOL new_visibility )
void LLFloater::openFloater(const LLSD& key)
{
- llinfos << "Opening floater " << getName() << llendl;
+ LL_INFOS() << "Opening floater " << getName() << LL_ENDL;
mKey = key; // in case we need to open ourselves again
if (getSoundFlags() != SILENT
@@ -706,7 +706,7 @@ void LLFloater::openFloater(const LLSD& key)
void LLFloater::closeFloater(bool app_quitting)
{
- llinfos << "Closing floater " << getName() << llendl;
+ LL_INFOS() << "Closing floater " << getName() << LL_ENDL;
if (app_quitting)
{
LLFloater::sQuitting = true;
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index 8aa1eb7cd5..5628baa4a1 100755
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -255,8 +255,6 @@ LLFolderView::~LLFolderView( void )
mRenamer = NULL;
mStatusTextBox = NULL;
- mAutoOpenItems.removeAllNodes();
-
if (mPopupMenuHandle.get()) mPopupMenuHandle.get()->die();
mAutoOpenItems.removeAllNodes();
@@ -736,7 +734,7 @@ void LLFolderView::removeSelectedItems()
}
else
{
- llinfos << "Cannot delete " << item->getName() << llendl;
+ LL_INFOS() << "Cannot delete " << item->getName() << LL_ENDL;
return;
}
}
@@ -762,20 +760,21 @@ void LLFolderView::removeSelectedItems()
}
else if (count > 1)
{
- LLDynamicArray<LLFolderViewModelItem*> listeners;
+ std::vector<LLFolderViewModelItem*> listeners;
LLFolderViewModelItem* listener;
setSelection(item_to_select, item_to_select ? item_to_select->isOpen() : false, mParentPanel->hasFocus());
+ listeners.reserve(count);
for(S32 i = 0; i < count; ++i)
{
listener = items[i]->getViewModelItem();
- if(listener && (listeners.find(listener) == LLDynamicArray<LLFolderViewModelItem*>::FAIL))
+ if(listener && (std::find(listeners.begin(), listeners.end(), listener) == listeners.end()))
{
- listeners.put(listener);
+ listeners.push_back(listener);
}
}
- listener = static_cast<LLFolderViewModelItem*>(listeners.get(0));
+ listener = static_cast<LLFolderViewModelItem*>(listeners.at(0));
if(listener)
{
listener->removeBatch(listeners);
@@ -1282,7 +1281,7 @@ BOOL LLFolderView::handleUnicodeCharHere(llwchar uni_char)
if (uni_char > 0x7f)
{
- llwarns << "LLFolderView::handleUnicodeCharHere - Don't handle non-ascii yet, aborting" << llendl;
+ LL_WARNS() << "LLFolderView::handleUnicodeCharHere - Don't handle non-ascii yet, aborting" << LL_ENDL;
return FALSE;
}
@@ -1744,14 +1743,14 @@ void LLFolderView::update()
void LLFolderView::dumpSelectionInformation()
{
- llinfos << "LLFolderView::dumpSelectionInformation()" << llendl;
- llinfos << "****************************************" << llendl;
+ LL_INFOS() << "LLFolderView::dumpSelectionInformation()" << LL_NEWLINE
+ << "****************************************" << LL_ENDL;
selected_items_t::iterator item_it;
for (item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it)
{
- llinfos << " " << (*item_it)->getName() << llendl;
+ LL_INFOS() << " " << (*item_it)->getName() << LL_ENDL;
}
- llinfos << "****************************************" << llendl;
+ LL_INFOS() << "****************************************" << LL_ENDL;
}
void LLFolderView::updateRenamerPosition()
diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h
index 11fccdace4..652e22c7bc 100755
--- a/indra/llui/llfolderview.h
+++ b/indra/llui/llfolderview.h
@@ -39,7 +39,6 @@
#include "lluictrl.h"
#include "v4color.h"
-#include "stdenums.h"
#include "lldepthstack.h"
#include "lleditmenuhandler.h"
#include "llfontgl.h"
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index c7910cb883..b5ac7db4e7 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -636,7 +636,7 @@ BOOL LLFolderViewItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
}
if (handled)
{
- lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLFolderViewItem" << llendl;
+ LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFolderViewItem" << llendl;
}
return handled;
@@ -1753,7 +1753,7 @@ BOOL LLFolderViewFolder::handleDragAndDrop(S32 x, S32 y, MASK mask,
{
handleDragAndDropToThisFolder(mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
- lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLFolderViewFolder" << llendl;
+ LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFolderViewFolder" << llendl;
}
return TRUE;
diff --git a/indra/llui/lliconctrl.h b/indra/llui/lliconctrl.h
index efa0925a4a..a19bb99d9d 100755
--- a/indra/llui/lliconctrl.h
+++ b/indra/llui/lliconctrl.h
@@ -31,7 +31,6 @@
#include "v4color.h"
#include "lluictrl.h"
#include "lluiimage.h"
-#include "stdenums.h"
class LLTextBox;
class LLUICtrlFactory;
diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp
index 795dacdbb0..0d232cc2cf 100755
--- a/indra/llui/llkeywords.cpp
+++ b/indra/llui/llkeywords.cpp
@@ -94,7 +94,7 @@ BOOL LLKeywords::loadFromFile( const std::string& filename )
file.open(filename); /* Flawfinder: ignore */
if( file.fail() )
{
- llinfos << "LLKeywords::loadFromFile() Unable to open file: " << filename << llendl;
+ LL_INFOS() << "LLKeywords::loadFromFile() Unable to open file: " << filename << LL_ENDL;
return mLoaded;
}
@@ -102,7 +102,7 @@ BOOL LLKeywords::loadFromFile( const std::string& filename )
file >> buffer;
if( strcmp( buffer, "llkeywords" ) )
{
- llinfos << filename << " does not appear to be a keyword file" << llendl;
+ LL_INFOS() << filename << " does not appear to be a keyword file" << LL_ENDL;
return mLoaded;
}
@@ -112,7 +112,7 @@ BOOL LLKeywords::loadFromFile( const std::string& filename )
file >> version_num;
if( strcmp(buffer, "version") || version_num != (U32)KEYWORD_FILE_CURRENT_VERSION )
{
- llinfos << filename << " does not appear to be a version " << KEYWORD_FILE_CURRENT_VERSION << " keyword file" << llendl;
+ LL_INFOS() << filename << " does not appear to be a version " << KEYWORD_FILE_CURRENT_VERSION << " keyword file" << LL_ENDL;
return mLoaded;
}
@@ -342,7 +342,7 @@ LLColor3 LLKeywords::readColor( const std::string& s )
S32 values_read = sscanf(s.c_str(), "%f, %f, %f]", &r, &g, &b );
if( values_read != 3 )
{
- llinfos << " poorly formed color in keyword file" << llendl;
+ LL_INFOS() << " poorly formed color in keyword file" << LL_ENDL;
}
return LLColor3( r, g, b );
}
@@ -553,7 +553,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
S32 seg_start = cur - base;
S32 seg_end = seg_start + seg_len;
- // llinfos << "Seg: [" << word.c_str() << "]" << llendl;
+ // LL_INFOS() << "Seg: [" << word.c_str() << "]" << LL_ENDL;
insertSegments(wtext, *seg_list,cur_token, text_len, seg_start, seg_end, defaultColor, editor);
}
@@ -620,10 +620,10 @@ void LLKeywords::insertSegment(std::vector<LLTextSegmentPtr>& seg_list, LLTextSe
#ifdef _DEBUG
void LLKeywords::dump()
{
- llinfos << "LLKeywords" << llendl;
+ LL_INFOS() << "LLKeywords" << LL_ENDL;
- llinfos << "LLKeywords::sWordTokenMap" << llendl;
+ LL_INFOS() << "LLKeywords::sWordTokenMap" << LL_ENDL;
word_token_map_t::iterator word_token_iter = mWordTokenMap.begin();
while( word_token_iter != mWordTokenMap.end() )
{
@@ -632,7 +632,7 @@ void LLKeywords::dump()
++word_token_iter;
}
- llinfos << "LLKeywords::sLineTokenList" << llendl;
+ LL_INFOS() << "LLKeywords::sLineTokenList" << LL_ENDL;
for (token_list_t::iterator iter = mLineTokenList.begin();
iter != mLineTokenList.end(); ++iter)
{
@@ -641,7 +641,7 @@ void LLKeywords::dump()
}
- llinfos << "LLKeywords::sDelimiterTokenList" << llendl;
+ LL_INFOS() << "LLKeywords::sDelimiterTokenList" << LL_ENDL;
for (token_list_t::iterator iter = mDelimiterTokenList.begin();
iter != mDelimiterTokenList.end(); ++iter)
{
@@ -652,12 +652,12 @@ void LLKeywords::dump()
void LLKeywordToken::dump()
{
- llinfos << "[" <<
+ LL_INFOS() << "[" <<
mColor.mV[VX] << ", " <<
mColor.mV[VY] << ", " <<
mColor.mV[VZ] << "] [" <<
wstring_to_utf8str(mToken) << "]" <<
- llendl;
+ LL_ENDL;
}
#endif // DEBUG
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index 5478e85e13..f2e9843bf3 100755
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -855,14 +855,14 @@ BOOL LLLineEditor::handleHover(S32 x, S32 y, MASK mask)
mKeystrokeTimer.reset();
getWindow()->setCursor(UI_CURSOR_IBEAM);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl;
handled = TRUE;
}
if( !handled )
{
getWindow()->setCursor(UI_CURSOR_IBEAM);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl;
handled = TRUE;
}
diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp
index 8c2be44904..8aefef07e2 100755
--- a/indra/llui/llmodaldialog.cpp
+++ b/indra/llui/llmodaldialog.cpp
@@ -181,7 +181,7 @@ BOOL LLModalDialog::handleHover(S32 x, S32 y, MASK mask)
if( childrenHandleHover(x, y, mask) == NULL )
{
getWindow()->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << llendl;
}
return TRUE;
}
diff --git a/indra/llui/llmultislider.cpp b/indra/llui/llmultislider.cpp
index 70bcfb5b4f..17d07f4dae 100755
--- a/indra/llui/llmultislider.cpp
+++ b/indra/llui/llmultislider.cpp
@@ -356,12 +356,12 @@ BOOL LLMultiSlider::handleHover(S32 x, S32 y, MASK mask)
onCommit();
getWindow()->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl;
}
else
{
getWindow()->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl;
}
return TRUE;
}
diff --git a/indra/llui/llresmgr.cpp b/indra/llui/llresmgr.cpp
index 820e7cb26a..7488af2e05 100755
--- a/indra/llui/llresmgr.cpp
+++ b/indra/llui/llresmgr.cpp
@@ -45,33 +45,6 @@ LLResMgr::LLResMgr()
void LLResMgr::setLocale( LLLOCALE_ID locale_id )
{
mLocale = locale_id;
-
- //RN: for now, use normal 'C' locale for everything but specific UI input/output routines
-// switch( locale_id )
-// {
-// case LLLOCALE_USA:
-//#if LL_WINDOWS
-// // Windows doesn't use ISO country codes.
-// llinfos << "Setting locale to " << setlocale( LC_ALL, "english-usa" ) << llendl;
-//#else
-// // posix version should work everywhere else.
-// llinfos << "Setting locale to " << setlocale( LC_ALL, "en_US" ) << llendl;
-//#endif
-// break;
-// case LLLOCALE_UK:
-//#if LL_WINDOWS
-// // Windows doesn't use ISO country codes.
-// llinfos << "Setting locale to " << setlocale( LC_ALL, "english-uk" ) << llendl;
-//#else
-// // posix version should work everywhere else.
-// llinfos << "Setting locale to " << setlocale( LC_ALL, "en_GB" ) << llendl;
-//#endif
-// break;
-// default:
-// llassert(0);
-// setLocale(LLLOCALE_USA);
-// break;
-// }
}
char LLResMgr::getDecimalPoint() const
diff --git a/indra/llui/llscrollbar.cpp b/indra/llui/llscrollbar.cpp
index bef1854748..f92e8f41ea 100755
--- a/indra/llui/llscrollbar.cpp
+++ b/indra/llui/llscrollbar.cpp
@@ -381,7 +381,7 @@ BOOL LLScrollbar::handleHover(S32 x, S32 y, MASK mask)
}
getWindow()->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl;
handled = TRUE;
}
else
@@ -393,7 +393,7 @@ BOOL LLScrollbar::handleHover(S32 x, S32 y, MASK mask)
if( !handled )
{
getWindow()->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl;
handled = TRUE;
}
diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp
index 3b5fb2adfb..93eea75952 100755
--- a/indra/llui/llscrollcontainer.cpp
+++ b/indra/llui/llscrollcontainer.cpp
@@ -155,7 +155,6 @@ LLScrollContainer::~LLScrollContainer( void )
// virtual
void LLScrollContainer::scrollHorizontal( S32 new_pos )
{
- //llinfos << "LLScrollContainer::scrollHorizontal()" << llendl;
if( mScrolledView )
{
LLRect doc_rect = mScrolledView->getRect();
@@ -167,7 +166,6 @@ void LLScrollContainer::scrollHorizontal( S32 new_pos )
// virtual
void LLScrollContainer::scrollVertical( S32 new_pos )
{
- // llinfos << "LLScrollContainer::scrollVertical() " << new_pos << llendl;
if( mScrolledView )
{
LLRect doc_rect = mScrolledView->getRect();
diff --git a/indra/llui/llscrollcontainer.h b/indra/llui/llscrollcontainer.h
index b67236c939..f64cf43a8e 100755
--- a/indra/llui/llscrollcontainer.h
+++ b/indra/llui/llscrollcontainer.h
@@ -31,7 +31,6 @@
#ifndef LL_V4COLOR_H
#include "v4color.h"
#endif
-#include "stdenums.h"
#include "llcoord.h"
#include "llscrollbar.h"
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 7f04c92b27..f335b5dec3 100755
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -1464,8 +1464,6 @@ void LLScrollListCtrl::drawItems()
mLineHeight );
item->setRect(item_rect);
- //llinfos << item_rect.getWidth() << llendl;
-
max_columns = llmax(max_columns, item->getNumColumns());
LLColor4 fg_color;
diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h
index 8fa06cc499..40a49074c1 100755
--- a/indra/llui/llscrolllistctrl.h
+++ b/indra/llui/llscrolllistctrl.h
@@ -34,7 +34,6 @@
#include "lluictrl.h"
#include "llctrlselectioninterface.h"
-//#include "lldarray.h"
#include "llfontgl.h"
#include "llui.h"
#include "llstring.h" // LLWString
diff --git a/indra/llui/llslider.cpp b/indra/llui/llslider.cpp
index db72234f94..ddddbe6f30 100755
--- a/indra/llui/llslider.cpp
+++ b/indra/llui/llslider.cpp
@@ -188,12 +188,12 @@ BOOL LLSlider::handleHover(S32 x, S32 y, MASK mask)
setValueAndCommit(t * (mMaxValue - mMinValue) + mMinValue );
}
getWindow()->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl;
}
else
{
getWindow()->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (inactive)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl;
}
return TRUE;
}
diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp
index 2543bd8f0a..1af36c6fdb 100755
--- a/indra/llui/llstatbar.cpp
+++ b/indra/llui/llstatbar.cpp
@@ -152,9 +152,9 @@ LLStatBar::LLStatBar(const Params& p)
mCurMaxBar(p.bar_max),
mCurMinBar(0),
mDecimalDigits(p.decimal_digits),
- mNumFrames(p.num_frames),
+ mNumHistoryFrames(p.num_frames),
+ mNumShortHistoryFrames(p.num_frames_short),
mMaxHeight(p.max_height),
- mPerSec(p.show_per_sec),
mDisplayBar(p.show_bar),
mDisplayHistory(p.show_history),
mOrientation(p.orientation),
@@ -221,36 +221,28 @@ BOOL LLStatBar::handleMouseDown(S32 x, S32 y, MASK mask)
void LLStatBar::draw()
{
- F32 current = 0,
- min = 0,
- max = 0,
- mean = 0;
+ F32 current = 0,
+ min = 0,
+ max = 0,
+ mean = 0;
bool show_data = false;
LLLocalClipRect _(getLocalRect());
LLTrace::PeriodicRecording& frame_recording = LLTrace::get_frame_recording();
+ S32 num_frames = mDisplayHistory ? mNumHistoryFrames : mNumShortHistoryFrames;
+
std::string unit_label;
if (mCountFloatp)
{
LLTrace::Recording& last_frame_recording = frame_recording.getLastRecording();
unit_label = mUnitLabel.empty() ? mCountFloatp->getUnitLabel() : mUnitLabel;
- if (mPerSec)
- {
- unit_label += "/s";
- current = last_frame_recording.getPerSec(*mCountFloatp);
- min = frame_recording.getPeriodMinPerSec(*mCountFloatp, mNumFrames);
- max = frame_recording.getPeriodMaxPerSec(*mCountFloatp, mNumFrames);
- mean = frame_recording.getPeriodMeanPerSec(*mCountFloatp, mNumFrames);
- }
- else
- {
- current = last_frame_recording.getSum(*mCountFloatp);
- min = frame_recording.getPeriodMin(*mCountFloatp, mNumFrames);
- max = frame_recording.getPeriodMax(*mCountFloatp, mNumFrames);
- mean = frame_recording.getPeriodMean(*mCountFloatp, mNumFrames);
- }
+ unit_label += "/s";
+ current = last_frame_recording.getPerSec(*mCountFloatp);
+ min = frame_recording.getPeriodMinPerSec(*mCountFloatp, num_frames);
+ max = frame_recording.getPeriodMaxPerSec(*mCountFloatp, num_frames);
+ mean = frame_recording.getPeriodMeanPerSec(*mCountFloatp, num_frames);
// always show count-style data
show_data = true;
@@ -262,11 +254,11 @@ void LLStatBar::draw()
// only show data if there is an event in the relevant time period
current = last_frame_recording.getMean(*mEventFloatp);
- min = frame_recording.getPeriodMin(*mEventFloatp, mNumFrames);
- max = frame_recording.getPeriodMax(*mEventFloatp, mNumFrames);
- mean = frame_recording.getPeriodMean(*mEventFloatp, mNumFrames);
-
- show_data = frame_recording.getSampleCount(*mEventFloatp, mNumFrames) != 0;
+ min = frame_recording.getPeriodMin(*mEventFloatp, num_frames);
+ max = frame_recording.getPeriodMax(*mEventFloatp, num_frames);
+ mean = frame_recording.getPeriodMean(*mEventFloatp, num_frames);
+
+ show_data = frame_recording.getSampleCount(*mEventFloatp, num_frames) != 0;
}
else if (mSampleFloatp)
{
@@ -275,9 +267,9 @@ void LLStatBar::draw()
unit_label = mUnitLabel.empty() ? mSampleFloatp->getUnitLabel() : mUnitLabel;
current = last_frame_recording.getMean(*mSampleFloatp);
- min = frame_recording.getPeriodMin(*mSampleFloatp, mNumFrames);
- max = frame_recording.getPeriodMax(*mSampleFloatp, mNumFrames);
- mean = frame_recording.getPeriodMean(*mSampleFloatp, mNumFrames);
+ min = frame_recording.getPeriodMin(*mSampleFloatp, num_frames);
+ max = frame_recording.getPeriodMax(*mSampleFloatp, num_frames);
+ mean = frame_recording.getPeriodMean(*mSampleFloatp, num_frames);
// always show sample data if we've ever grabbed any samples
show_data = mSampleFloatp->getPrimaryAccumulator()->hasValue();
@@ -472,18 +464,16 @@ void LLStatBar::draw()
S32 i;
gGL.color4f( 1.f, 0.f, 0.f, 1.f );
gGL.begin( LLRender::QUADS );
- const S32 max_frame = llmin(mNumFrames, num_values);
+ const S32 max_frame = llmin(num_frames, num_values);
U32 num_samples = 0;
for (i = 1; i <= max_frame; i++)
{
- F32 offset = ((F32)i / (F32)mNumFrames) * span;
+ F32 offset = ((F32)i / (F32)num_frames) * span;
LLTrace::Recording& recording = frame_recording.getPrevRecording(i);
if (mCountFloatp)
{
- value = mPerSec
- ? recording.getPerSec(*mCountFloatp)
- : recording.getSum(*mCountFloatp);
+ value = recording.getPerSec(*mCountFloatp);
num_samples = recording.getSampleCount(*mCountFloatp);
}
else if (mEventFloatp)
diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h
index fc925b1a74..5aed98fecf 100755
--- a/indra/llui/llstatbar.h
+++ b/indra/llui/llstatbar.h
@@ -46,12 +46,12 @@ public:
Optional<U32> decimal_digits;
- Optional<bool> show_per_sec,
- show_bar,
+ Optional<bool> show_bar,
show_history,
scale_range;
Optional<S32> num_frames,
+ num_frames_short,
max_height;
Optional<std::string> stat;
Optional<EOrientation> orientation;
@@ -63,11 +63,11 @@ public:
bar_max("bar_max", 0.f),
tick_spacing("tick_spacing", 0.f),
decimal_digits("decimal_digits", 3),
- show_per_sec("show_per_sec", true),
show_bar("show_bar", false),
show_history("show_history", false),
scale_range("scale_range", true),
num_frames("num_frames", 200),
+ num_frames_short("num_frames_short", 20),
max_height("max_height", 100),
stat("stat"),
orientation("orientation", VERTICAL)
@@ -96,10 +96,10 @@ private:
mLabelSpacing;
F32 mTickValue;
U32 mDecimalDigits;
- S32 mNumFrames;
+ S32 mNumHistoryFrames,
+ mNumShortHistoryFrames;
S32 mMaxHeight;
- bool mPerSec, // Use the per sec stats.
- mDisplayBar, // Display the bar graph.
+ bool mDisplayBar, // Display the bar graph.
mDisplayHistory,
mAutoScaleMax,
mAutoScaleMin;
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 834f213097..eb5a04d8e5 100755
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -781,7 +781,7 @@ BOOL LLTextEditor::handleHover(S32 x, S32 y, MASK mask)
setCursorAtLocalPos( clamped_x, clamped_y, true );
mSelectionEnd = mCursorPos;
}
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl;
getWindow()->setCursor(UI_CURSOR_IBEAM);
handled = TRUE;
}
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h
index 969e072704..49b6980c81 100755
--- a/indra/llui/lltexteditor.h
+++ b/indra/llui/lltexteditor.h
@@ -32,10 +32,8 @@
#include "llrect.h"
#include "llkeywords.h"
#include "llframetimer.h"
-#include "lldarray.h"
#include "llstyle.h"
#include "lleditmenuhandler.h"
-#include "lldarray.h"
#include "llviewborder.h" // for params
#include "lltextbase.h"
#include "lltextvalidate.h"
diff --git a/indra/llui/llui.h b/indra/llui/llui.h
index 4ebfd0fd6e..f3ed3fcb49 100755
--- a/indra/llui/llui.h
+++ b/indra/llui/llui.h
@@ -55,6 +55,52 @@ class LLWindow;
class LLView;
class LLHelp;
+
+// this enum is used by the llview.h (viewer) and the llassetstorage.h (viewer and sim)
+enum EDragAndDropType
+{
+ DAD_NONE = 0,
+ DAD_TEXTURE = 1,
+ DAD_SOUND = 2,
+ DAD_CALLINGCARD = 3,
+ DAD_LANDMARK = 4,
+ DAD_SCRIPT = 5,
+ DAD_CLOTHING = 6,
+ DAD_OBJECT = 7,
+ DAD_NOTECARD = 8,
+ DAD_CATEGORY = 9,
+ DAD_ROOT_CATEGORY = 10,
+ DAD_BODYPART = 11,
+ DAD_ANIMATION = 12,
+ DAD_GESTURE = 13,
+ DAD_LINK = 14,
+ DAD_MESH = 15,
+ DAD_WIDGET = 16,
+ DAD_PERSON = 17,
+ DAD_COUNT = 18, // number of types in this enum
+};
+
+// Reasons for drags to be denied.
+// ordered by priority for multi-drag
+enum EAcceptance
+{
+ ACCEPT_POSTPONED, // we are asynchronously determining acceptance
+ ACCEPT_NO, // Uninformative, general purpose denial.
+ ACCEPT_NO_LOCKED, // Operation would be valid, but permissions are set to disallow it.
+ ACCEPT_YES_COPY_SINGLE, // We'll take a copy of a single item
+ ACCEPT_YES_SINGLE, // Accepted. OK to drag and drop single item here.
+ ACCEPT_YES_COPY_MULTI, // We'll take a copy of multiple items
+ ACCEPT_YES_MULTI // Accepted. OK to drag and drop multiple items here.
+};
+
+enum EAddPosition
+{
+ ADD_TOP,
+ ADD_BOTTOM,
+ ADD_DEFAULT
+};
+
+
void make_ui_sound(const char* name);
void make_ui_sound_deferred(const char * name);
diff --git a/indra/llui/lluistring.h b/indra/llui/lluistring.h
index cb40c85582..07e02de6d8 100755
--- a/indra/llui/lluistring.h
+++ b/indra/llui/lluistring.h
@@ -42,12 +42,12 @@
// LLUIString mMessage("Welcome [USERNAME] to [SECONDLIFE]!");
// mMessage.setArg("[USERNAME]", "Steve");
// mMessage.setArg("[SECONDLIFE]", "Second Life");
-// llinfos << mMessage.getString() << llendl; // outputs "Welcome Steve to Second Life"
+// LL_INFOS() << mMessage.getString() << LL_ENDL; // outputs "Welcome Steve to Second Life"
// mMessage.setArg("[USERNAME]", "Joe");
-// llinfos << mMessage.getString() << llendl; // outputs "Welcome Joe to Second Life"
+// LL_INFOS() << mMessage.getString() << LL_ENDL; // outputs "Welcome Joe to Second Life"
// mMessage = "Bienvenido a la [SECONDLIFE] [USERNAME]"
// mMessage.setArg("[SECONDLIFE]", "Segunda Vida");
-// llinfos << mMessage.getString() << llendl; // outputs "Bienvenido a la Segunda Vida Joe"
+// LL_INFOS() << mMessage.getString() << LL_ENDL; // outputs "Bienvenido a la Segunda Vida Joe"
// Implementation Notes:
// Attempting to have operator[](const std::string& s) return mArgs[s] fails because we have
diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h
index 8c6c32178a..d4684e2e1e 100755
--- a/indra/llui/llurlentry.h
+++ b/indra/llui/llurlentry.h
@@ -32,6 +32,7 @@
#include "lluicolor.h"
#include "llstyle.h"
+#include "llavatarname.h"
#include "llhost.h" // for resolving parcel name by parcel id
#include <boost/signals2.hpp>
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index 0568fa889a..cd23ce7df1 100755
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -42,7 +42,6 @@
#include "llui.h"
#include "lluistring.h"
#include "llviewquery.h"
-#include "stdenums.h"
#include "lluistring.h"
#include "llcursortypes.h"
#include "lluictrlfactory.h"
@@ -67,6 +66,7 @@ const BOOL NOT_MOUSE_OPAQUE = FALSE;
const U32 GL_NAME_UI_RESERVED = 2;
+
// maintains render state during traversal of UI tree
class LLViewDrawContext
{
diff --git a/indra/llui/llviewmodel.h b/indra/llui/llviewmodel.h
index 2c016d2560..a0a13267ac 100755
--- a/indra/llui/llviewmodel.h
+++ b/indra/llui/llviewmodel.h
@@ -37,9 +37,9 @@
#include "llpointer.h"
#include "llsd.h"
#include "llrefcount.h"
-#include "stdenums.h"
#include "llstring.h"
#include "lltrace.h"
+#include "llui.h"
#include <string>
class LLScrollListItem;
diff --git a/indra/llvfs/CMakeLists.txt b/indra/llvfs/CMakeLists.txt
index 67dce8c073..f19fdf4890 100755
--- a/indra/llvfs/CMakeLists.txt
+++ b/indra/llvfs/CMakeLists.txt
@@ -15,7 +15,6 @@ set(llvfs_SOURCE_FILES
lldir.cpp
lldiriterator.cpp
lllfsthread.cpp
- llpidlock.cpp
llvfile.cpp
llvfs.cpp
llvfsthread.cpp
@@ -28,7 +27,6 @@ set(llvfs_HEADER_FILES
lldirguard.h
lldiriterator.h
lllfsthread.h
- llpidlock.h
llvfile.h
llvfs.h
llvfsthread.h
diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp
index 6899e9a44a..b7e71b87a8 100755
--- a/indra/llvfs/lldir.cpp
+++ b/indra/llvfs/lldir.cpp
@@ -926,22 +926,22 @@ bool LLDir::setCacheDir(const std::string &path)
void LLDir::dumpCurrentDirectories()
{
- LL_DEBUGS2("AppInit","Directories") << "Current Directories:" << LL_ENDL;
-
- LL_DEBUGS2("AppInit","Directories") << " CurPath: " << getCurPath() << LL_ENDL;
- LL_DEBUGS2("AppInit","Directories") << " AppName: " << getAppName() << LL_ENDL;
- LL_DEBUGS2("AppInit","Directories") << " ExecutableFilename: " << getExecutableFilename() << LL_ENDL;
- LL_DEBUGS2("AppInit","Directories") << " ExecutableDir: " << getExecutableDir() << LL_ENDL;
- LL_DEBUGS2("AppInit","Directories") << " ExecutablePathAndName: " << getExecutablePathAndName() << LL_ENDL;
- LL_DEBUGS2("AppInit","Directories") << " WorkingDir: " << getWorkingDir() << LL_ENDL;
- LL_DEBUGS2("AppInit","Directories") << " AppRODataDir: " << getAppRODataDir() << LL_ENDL;
- LL_DEBUGS2("AppInit","Directories") << " OSUserDir: " << getOSUserDir() << LL_ENDL;
- LL_DEBUGS2("AppInit","Directories") << " OSUserAppDir: " << getOSUserAppDir() << LL_ENDL;
- LL_DEBUGS2("AppInit","Directories") << " LindenUserDir: " << getLindenUserDir() << LL_ENDL;
- LL_DEBUGS2("AppInit","Directories") << " TempDir: " << getTempDir() << LL_ENDL;
- LL_DEBUGS2("AppInit","Directories") << " CAFile: " << getCAFile() << LL_ENDL;
- LL_DEBUGS2("AppInit","Directories") << " SkinBaseDir: " << getSkinBaseDir() << LL_ENDL;
- LL_DEBUGS2("AppInit","Directories") << " SkinDir: " << getSkinDir() << LL_ENDL;
+ LL_DEBUGS("AppInit","Directories") << "Current Directories:" << LL_ENDL;
+
+ LL_DEBUGS("AppInit","Directories") << " CurPath: " << getCurPath() << LL_ENDL;
+ LL_DEBUGS("AppInit","Directories") << " AppName: " << getAppName() << LL_ENDL;
+ LL_DEBUGS("AppInit","Directories") << " ExecutableFilename: " << getExecutableFilename() << LL_ENDL;
+ LL_DEBUGS("AppInit","Directories") << " ExecutableDir: " << getExecutableDir() << LL_ENDL;
+ LL_DEBUGS("AppInit","Directories") << " ExecutablePathAndName: " << getExecutablePathAndName() << LL_ENDL;
+ LL_DEBUGS("AppInit","Directories") << " WorkingDir: " << getWorkingDir() << LL_ENDL;
+ LL_DEBUGS("AppInit","Directories") << " AppRODataDir: " << getAppRODataDir() << LL_ENDL;
+ LL_DEBUGS("AppInit","Directories") << " OSUserDir: " << getOSUserDir() << LL_ENDL;
+ LL_DEBUGS("AppInit","Directories") << " OSUserAppDir: " << getOSUserAppDir() << LL_ENDL;
+ LL_DEBUGS("AppInit","Directories") << " LindenUserDir: " << getLindenUserDir() << LL_ENDL;
+ LL_DEBUGS("AppInit","Directories") << " TempDir: " << getTempDir() << LL_ENDL;
+ LL_DEBUGS("AppInit","Directories") << " CAFile: " << getCAFile() << LL_ENDL;
+ LL_DEBUGS("AppInit","Directories") << " SkinBaseDir: " << getSkinBaseDir() << LL_ENDL;
+ LL_DEBUGS("AppInit","Directories") << " SkinDir: " << getSkinDir() << LL_ENDL;
}
std::string LLDir::add(const std::string& path, const std::string& name) const
diff --git a/indra/llvfs/llpidlock.cpp b/indra/llvfs/llpidlock.cpp
deleted file mode 100755
index 3b83d1b9e3..0000000000
--- a/indra/llvfs/llpidlock.cpp
+++ /dev/null
@@ -1,276 +0,0 @@
-/**
- * @file llformat.cpp
- * @date January 2007
- * @brief string formatting utility
- *
- * $LicenseInfo:firstyear=2007&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$
- */
-
-#include "linden_common.h"
-
-#include "llpidlock.h"
-#include "lldir.h"
-#include "llsd.h"
-#include "llsdserialize.h"
-#include "llnametable.h"
-#include "llframetimer.h"
-
-#if LL_WINDOWS //For windows platform.
-
-#include "llwin32headerslean.h"
-
-namespace {
- inline DWORD getpid() {
- return GetCurrentProcessId();
- }
-}
-
-bool isProcessAlive(U32 pid)
-{
- return (bool) GetProcessVersion((DWORD)pid);
-}
-
-#else //Everyone Else
-bool isProcessAlive(U32 pid)
-{
- return (bool) kill( (pid_t)pid, 0);
-}
-#endif //Everyone else.
-
-
-
-class LLPidLockFile
-{
- public:
- LLPidLockFile( ) :
- mAutosave(false),
- mSaving(false),
- mWaiting(false),
- mPID(getpid()),
- mNameTable(NULL),
- mClean(true)
- {
- mLockName = gDirUtilp->getTempDir() + gDirUtilp->getDirDelimiter() + "savelock";
- }
- bool requestLock(LLNameTable<void *> *name_table, bool autosave,
- bool force_immediate=FALSE, F32 timeout=300.0);
- bool checkLock();
- void releaseLock();
-
- private:
- void writeLockFile(LLSD pids);
- public:
- static LLPidLockFile& instance(); // return the singleton black list file
-
- bool mAutosave;
- bool mSaving;
- bool mWaiting;
- LLFrameTimer mTimer;
- U32 mPID;
- std::string mLockName;
- std::string mSaveName;
- LLSD mPIDS_sd;
- LLNameTable<void*> *mNameTable;
- bool mClean;
-};
-
-LLPidLockFile& LLPidLockFile::instance()
-{
- static LLPidLockFile the_file;
- return the_file;
-}
-
-void LLPidLockFile::writeLockFile(LLSD pids)
-{
- llofstream ofile(mLockName);
-
- if (!LLSDSerialize::toXML(pids,ofile))
- {
- llwarns << "Unable to write concurrent save lock file." << llendl;
- }
- ofile.close();
-}
-
-bool LLPidLockFile::requestLock(LLNameTable<void *> *name_table, bool autosave,
- bool force_immediate, F32 timeout)
-{
- bool readyToSave = FALSE;
-
- if (mSaving) return FALSE; //Bail out if we're currently saving. Will not queue another save.
-
- if (!mWaiting){
- mNameTable=name_table;
- mAutosave = autosave;
- }
-
- LLSD out_pids;
- out_pids.append( (LLSD::Integer)mPID );
-
- llifstream ifile(mLockName);
-
- if (ifile.is_open())
- { //If file exists, we need to decide whether or not to continue.
- if ( force_immediate
- || mTimer.hasExpired() ) //Only deserialize if we REALLY need to.
- {
-
- LLSD in_pids;
-
- LLSDSerialize::fromXML(in_pids, ifile);
-
- //Clean up any dead PIDS that might be in there.
- for (LLSD::array_iterator i=in_pids.beginArray();
- i !=in_pids.endArray();
- ++i)
- {
- U32 stored_pid=(*i).asInteger();
-
- if (isProcessAlive(stored_pid))
- {
- out_pids.append( (*i) );
- }
- }
-
- readyToSave=TRUE;
- }
- ifile.close();
- }
- else
- {
- readyToSave=TRUE;
- }
-
- if (!mWaiting) //Not presently waiting to save. Queue up.
- {
- mTimer.resetWithExpiry(timeout);
- mWaiting=TRUE;
- }
-
- if (readyToSave)
- { //Potential race condition won't kill us. Ignore it.
- writeLockFile(out_pids);
- mSaving=TRUE;
- }
-
- return readyToSave;
-}
-
-bool LLPidLockFile::checkLock()
-{
- return mWaiting;
-}
-
-void LLPidLockFile::releaseLock()
-{
- llifstream ifile(mLockName);
- LLSD in_pids;
- LLSD out_pids;
- bool write_file=FALSE;
-
- LLSDSerialize::fromXML(in_pids, ifile);
-
- //Clean up this PID and any dead ones.
- for (LLSD::array_iterator i=in_pids.beginArray();
- i !=in_pids.endArray();
- ++i)
- {
- U32 stored_pid=(*i).asInteger();
-
- if (stored_pid != mPID && isProcessAlive(stored_pid))
- {
- out_pids.append( (*i) );
- write_file=TRUE;
- }
- }
- ifile.close();
-
- if (write_file)
- {
- writeLockFile(out_pids);
- }
- else
- {
- unlink(mLockName.c_str());
- }
-
- mSaving=FALSE;
- mWaiting=FALSE;
-}
-
-//LLPidLock
-
-void LLPidLock::initClass() {
- (void) LLPidLockFile::instance();
-}
-
-bool LLPidLock::checkLock()
-{
- return LLPidLockFile::instance().checkLock();
-}
-
-bool LLPidLock::requestLock(LLNameTable<void *> *name_table, bool autosave,
- bool force_immediate, F32 timeout)
-{
- return LLPidLockFile::instance().requestLock(name_table,autosave,force_immediate,timeout);
-}
-
-void LLPidLock::releaseLock()
-{
- return LLPidLockFile::instance().releaseLock();
-}
-
-bool LLPidLock::isClean()
-{
- return LLPidLockFile::instance().mClean;
-}
-
-//getters
-LLNameTable<void *> * LLPidLock::getNameTable()
-{
- return LLPidLockFile::instance().mNameTable;
-}
-
-bool LLPidLock::getAutosave()
-{
- return LLPidLockFile::instance().mAutosave;
-}
-
-bool LLPidLock::getClean()
-{
- return LLPidLockFile::instance().mClean;
-}
-
-std::string LLPidLock::getSaveName()
-{
- return LLPidLockFile::instance().mSaveName;
-}
-
-//setters
-void LLPidLock::setClean(bool clean)
-{
- LLPidLockFile::instance().mClean=clean;
-}
-
-void LLPidLock::setSaveName(std::string savename)
-{
- LLPidLockFile::instance().mSaveName=savename;
-}
diff --git a/indra/llvfs/llvfs.h b/indra/llvfs/llvfs.h
index 63f0f28933..39f31a221b 100755
--- a/indra/llvfs/llvfs.h
+++ b/indra/llvfs/llvfs.h
@@ -29,7 +29,6 @@
#include <deque>
#include "lluuid.h"
-#include "linked_lists.h"
#include "llassettype.h"
#include "llthread.h"
diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt
index 4c6e706119..8713ef21a3 100755
--- a/indra/llwindow/CMakeLists.txt
+++ b/indra/llwindow/CMakeLists.txt
@@ -38,6 +38,7 @@ include_directories(SYSTEM
)
set(llwindow_SOURCE_FILES
+ llcursortypes.cpp
llkeyboard.cpp
llkeyboardheadless.cpp
llwindowheadless.cpp
@@ -48,6 +49,7 @@ set(llwindow_SOURCE_FILES
set(llwindow_HEADER_FILES
CMakeLists.txt
+ llcursortypes.h
llkeyboard.h
llkeyboardheadless.h
llwindowheadless.h
diff --git a/indra/llcommon/llcursortypes.cpp b/indra/llwindow/llcursortypes.cpp
index ec60097195..ec60097195 100755
--- a/indra/llcommon/llcursortypes.cpp
+++ b/indra/llwindow/llcursortypes.cpp
diff --git a/indra/llcommon/llcursortypes.h b/indra/llwindow/llcursortypes.h
index cb6d6636a0..cb6d6636a0 100755
--- a/indra/llcommon/llcursortypes.h
+++ b/indra/llwindow/llcursortypes.h
diff --git a/indra/llwindow/llkeyboard.cpp b/indra/llwindow/llkeyboard.cpp
index 8b356ba138..41d4d41e83 100755
--- a/indra/llwindow/llkeyboard.cpp
+++ b/indra/llwindow/llkeyboard.cpp
@@ -258,7 +258,7 @@ BOOL LLKeyboard::handleTranslatedKeyUp(KEY translated_key, U32 translated_mask)
handled = mCallbacks->handleTranslatedKeyUp(translated_key, translated_mask);
}
- lldebugst(LLERR_USER_INPUT) << "keyup -" << translated_key << "-" << llendl;
+ LL_DEBUGS("UserInput") << "keyup -" << translated_key << "-" << llendl;
return handled;
}
diff --git a/indra/llwindow/llkeyboard.h b/indra/llwindow/llkeyboard.h
index 276074d4ca..c066b89c90 100755
--- a/indra/llwindow/llkeyboard.h
+++ b/indra/llwindow/llkeyboard.h
@@ -30,7 +30,7 @@
#include <map>
#include <boost/function.hpp>
-#include "string_table.h"
+#include "llstringtable.h"
#include "lltimer.h"
#include "indra_constants.h"
diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp
index 93b9d36939..6a8f0b59d1 100755
--- a/indra/llwindow/llwindow.cpp
+++ b/indra/llwindow/llwindow.cpp
@@ -39,7 +39,6 @@
#include "llerror.h"
#include "llkeyboard.h"
-#include "linked_lists.h"
#include "llwindowcallbacks.h"
diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h
index ee7d1d50b7..2b8e449193 100755
--- a/indra/llxml/llcontrol.h
+++ b/indra/llxml/llcontrol.h
@@ -29,8 +29,6 @@
#include "llboost.h"
#include "llevent.h"
-#include "llnametable.h"
-#include "llmap.h"
#include "llstring.h"
#include "llrect.h"
#include "llrefcount.h"
diff --git a/indra/llxml/llxmltree.h b/indra/llxml/llxmltree.h
index bdcb56f1f3..69fbc95bb0 100755
--- a/indra/llxml/llxmltree.h
+++ b/indra/llxml/llxmltree.h
@@ -32,7 +32,7 @@
#include <list>
#include "llstring.h"
#include "llxmlparser.h"
-#include "string_table.h"
+#include "llstringtable.h"
class LLColor4;
class LLColor4U;
diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l
index 1bb38bbf65..019d227842 100755
--- a/indra/lscript/lscript_compile/indra.l
+++ b/indra/lscript/lscript_compile/indra.l
@@ -25,7 +25,6 @@ FS (f|F)
#include "indra.y.hpp"
#include "lltimer.h"
#include "indra_constants.h"
-#include "llagentconstants.h"
#include "lllslconstants.h"
#include "lluuid.h"
#include "llassetstorage.h"
diff --git a/indra/lscript/lscript_compile/lscript_bytecode.cpp b/indra/lscript/lscript_compile/lscript_bytecode.cpp
index 95b2f35a94..b6c3dd3a86 100755
--- a/indra/lscript/lscript_compile/lscript_bytecode.cpp
+++ b/indra/lscript/lscript_compile/lscript_bytecode.cpp
@@ -40,8 +40,8 @@ LLScriptJumpTable::LLScriptJumpTable()
LLScriptJumpTable::~LLScriptJumpTable()
{
- mLabelMap.deleteAllData();
- mJumpMap.deleteAllData();
+ delete_and_clear(mLabelMap);
+ delete_and_clear(mJumpMap);
}
void LLScriptJumpTable::addLabel(char *name, S32 offset)
@@ -203,17 +203,14 @@ void LLScriptByteCodeChunk::addJump(char *name)
void LLScriptByteCodeChunk::connectJumps()
{
- char *jump;
- S32 offset, jumppos;
-
if (mJumpTable)
{
- for (jump = mJumpTable->mJumpMap.getFirstKey();
- jump;
- jump = mJumpTable->mJumpMap.getNextKey())
+ for(std::map<char *, S32 *>::iterator it = mJumpTable->mJumpMap.begin(), end_it = mJumpTable->mJumpMap.end();
+ it != end_it;
+ ++it)
{
- jumppos = *mJumpTable->mJumpMap[jump];
- offset = *mJumpTable->mLabelMap[jump] - jumppos;
+ S32 jumppos = *it->second;
+ S32 offset = *mJumpTable->mLabelMap[it->first] - jumppos;
jumppos = jumppos - 4;
integer2bytestream(mCodeChunk, jumppos, offset);
}
diff --git a/indra/lscript/lscript_compile/lscript_bytecode.h b/indra/lscript/lscript_compile/lscript_bytecode.h
index 0933c78b6f..1908bebcb9 100755
--- a/indra/lscript/lscript_compile/lscript_bytecode.h
+++ b/indra/lscript/lscript_compile/lscript_bytecode.h
@@ -29,6 +29,7 @@
#include "lscript_byteconvert.h"
#include "lscript_scope.h"
+#include <map>
class LLScriptJumpTable
{
@@ -39,8 +40,8 @@ public:
void addLabel(char *name, S32 offset);
void addJump(char *name, S32 offset);
- LLMap<char *, S32 *> mLabelMap;
- LLMap<char *, S32 *> mJumpMap;
+ std::map<char *, S32 *> mLabelMap;
+ std::map<char *, S32 *> mJumpMap;
};
class LLScriptByteCodeChunk
diff --git a/indra/lscript/lscript_compile/lscript_scope.h b/indra/lscript/lscript_compile/lscript_scope.h
index 5b2a73ad92..ffff91c81b 100755
--- a/indra/lscript/lscript_compile/lscript_scope.h
+++ b/indra/lscript/lscript_compile/lscript_scope.h
@@ -27,8 +27,8 @@
#ifndef LL_LSCRIPT_SCOPE_H
#define LL_LSCRIPT_SCOPE_H
-#include "string_table.h"
-#include "llmap.h"
+#include <map>
+#include "llstringtable.h"
#include "lscript_byteformat.h"
typedef enum e_lscript_identifier_type
@@ -301,13 +301,13 @@ public:
~LLScriptScope()
{
- mEntryMap.deleteAllData();
+ delete_and_clear(mEntryMap);
}
LLScriptScopeEntry *addEntry(const char *identifier, LSCRIPTIdentifierType idtype, LSCRIPTType type)
{
const char *name = mSTable->addString(identifier);
- if (!mEntryMap.checkData(name))
+ if (mEntryMap.find(name) == mEntryMap.end())
{
if (idtype == LIT_FUNCTION)
mEntryMap[name] = new LLScriptScopeEntry(name, idtype, type, mFunctionCount++);
@@ -324,18 +324,10 @@ public:
}
}
- BOOL checkEntry(const char *identifier)
+ bool checkEntry(const char *identifier)
{
const char *name = mSTable->addString(identifier);
- if (mEntryMap.checkData(name))
- {
- return TRUE;
- }
- else
- {
- // identifier already exists at this scope
- return FALSE;
- }
+ return mEntryMap.find(name) != mEntryMap.end();
}
LLScriptScopeEntry *findEntry(const char *identifier)
@@ -345,10 +337,11 @@ public:
while (scope)
{
- if (scope->mEntryMap.checkData(name))
+ entry_map_t::iterator found_it = mEntryMap.find(name);
+ if (found_it != mEntryMap.end())
{
// cool, we found it at this scope
- return scope->mEntryMap[name];
+ return found_it->second;
}
scope = scope->mParentScope;
}
@@ -362,24 +355,25 @@ public:
while (scope)
{
- if (scope->mEntryMap.checkData(name))
+ entry_map_t::iterator found_it = scope->mEntryMap.find(name);
+ if (found_it != scope->mEntryMap.end())
{
// need to check type, and if type is function we need to check both types
if (idtype == LIT_FUNCTION)
{
- if (scope->mEntryMap[name]->mIDType == LIT_FUNCTION)
+ if (found_it->second->mIDType == LIT_FUNCTION)
{
- return scope->mEntryMap[name];
+ return (found_it->second);
}
- else if (scope->mEntryMap[name]->mIDType == LIT_LIBRARY_FUNCTION)
+ else if (found_it->second->mIDType == LIT_LIBRARY_FUNCTION)
{
- return scope->mEntryMap[name];
+ return (found_it->second);
}
}
- else if (scope->mEntryMap[name]->mIDType == idtype)
+ else if (found_it->second->mIDType == idtype)
{
// cool, we found it at this scope
- return scope->mEntryMap[name];
+ return (found_it->second);
}
}
scope = scope->mParentScope;
@@ -392,11 +386,12 @@ public:
mParentScope = scope;
}
- LLMap<const char *, LLScriptScopeEntry *> mEntryMap;
- LLScriptScope *mParentScope;
- LLStringTable *mSTable;
- S32 mFunctionCount;
- S32 mStateCount;
+ typedef std::map<const char *, LLScriptScopeEntry *> entry_map_t;
+ entry_map_t mEntryMap;
+ LLScriptScope* mParentScope;
+ LLStringTable* mSTable;
+ S32 mFunctionCount;
+ S32 mStateCount;
};
extern LLStringTable *gScopeStringTable;
diff --git a/indra/lscript/lscript_compile/lscript_tree.h b/indra/lscript/lscript_compile/lscript_tree.h
index bf29f44518..047c220b17 100755
--- a/indra/lscript/lscript_compile/lscript_tree.h
+++ b/indra/lscript/lscript_compile/lscript_tree.h
@@ -29,7 +29,6 @@
#include "v3math.h"
#include "llquaternion.h"
-#include "linked_lists.h"
#include "lscript_error.h"
#include "lscript_typecheck.h"
#include "lscript_byteformat.h"
@@ -2304,20 +2303,20 @@ public:
LLScriptAllocationManager() {}
~LLScriptAllocationManager()
{
- mAllocationList.deleteAllData();
+ deleteAllocations();
}
void addAllocation(LLScriptFilePosition *ptr)
{
- mAllocationList.addData(ptr);
+ mAllocationList.push_front(ptr);
}
void deleteAllocations()
{
- mAllocationList.deleteAllData();
+ delete_and_clear(mAllocationList);
}
- LLLinkedList<LLScriptFilePosition> mAllocationList;
+ std::list<LLScriptFilePosition*> mAllocationList;
};
extern LLScriptAllocationManager *gAllocationManager;
diff --git a/indra/lscript/lscript_execute.h b/indra/lscript/lscript_execute.h
index fc491ead0f..576c2ca2b7 100755
--- a/indra/lscript/lscript_execute.h
+++ b/indra/lscript/lscript_execute.h
@@ -27,9 +27,10 @@
#ifndef LL_LSCRIPT_EXECUTE_H
#define LL_LSCRIPT_EXECUTE_H
+#include "stdtypes.h"
#include "lscript_byteconvert.h"
-#include "linked_lists.h"
#include "lscript_library.h"
+#include "llstl.h"
class LLTimer;
@@ -262,7 +263,7 @@ public:
S32 i, number = bytestream2integer(src, offset);
for (i = 0; i < number; i++)
{
- mEventDataList.addData(new LLScriptDataCollection(src, offset));
+ mEventDataList.push_front(new LLScriptDataCollection(src, offset));
}
}
@@ -271,32 +272,32 @@ public:
S32 i, number = bytestream2integer(src, offset);
for (i = 0; i < number; i++)
{
- mEventDataList.addData(new LLScriptDataCollection(src, offset));
+ mEventDataList.push_front(new LLScriptDataCollection(src, offset));
}
}
~LLScriptEventData()
{
- mEventDataList.deleteAllData();
+ delete_and_clear(mEventDataList);
}
void addEventData(LLScriptDataCollection *data)
{
- if (mEventDataList.getLength() < MAX_EVENTS_IN_QUEUE)
- mEventDataList.addDataAtEnd(data);
+ if (mEventDataList.size() < MAX_EVENTS_IN_QUEUE)
+ mEventDataList.push_back(data);
else
delete data;
}
LLScriptDataCollection *getNextEvent(LSCRIPTStateEventType type)
{
- LLScriptDataCollection *temp;
- for (temp = mEventDataList.getFirstData();
- temp;
- temp = mEventDataList.getNextData())
+ for (std::list<LLScriptDataCollection*>::iterator it = mEventDataList.begin(), end_it = mEventDataList.end();
+ it != end_it;
+ ++it)
{
+ LLScriptDataCollection* temp = *it;
if (temp->mType == type)
{
- mEventDataList.removeCurrentData();
+ mEventDataList.erase(it);
return temp;
}
}
@@ -305,24 +306,24 @@ public:
LLScriptDataCollection *getNextEvent()
{
LLScriptDataCollection *temp;
- temp = mEventDataList.getFirstData();
+ temp = mEventDataList.front();
if (temp)
{
- mEventDataList.removeCurrentData();
+ mEventDataList.pop_front();
return temp;
}
return NULL;
}
void removeEventType(LSCRIPTStateEventType type)
{
- LLScriptDataCollection *temp;
- for (temp = mEventDataList.getFirstData();
- temp;
- temp = mEventDataList.getNextData())
+ for (std::list<LLScriptDataCollection*>::iterator it = mEventDataList.begin(), end_it = mEventDataList.end();
+ it != end_it;
+ ++it)
{
- if (temp->mType == type)
+ if ((*it)->mType == type)
{
- mEventDataList.deleteCurrentData();
+ delete *it;
+ mEventDataList.erase(it);
}
}
}
@@ -332,12 +333,11 @@ public:
S32 size = 0;
// number in linked list
size += 4;
- LLScriptDataCollection *temp;
- for (temp = mEventDataList.getFirstData();
- temp;
- temp = mEventDataList.getNextData())
+ for (std::list<LLScriptDataCollection*>::iterator it = mEventDataList.begin(), end_it = mEventDataList.end();
+ it != end_it;
+ ++it)
{
- size += temp->getSavedSize();
+ size += (*it)->getSavedSize();
}
return size;
}
@@ -346,19 +346,18 @@ public:
{
S32 offset = 0;
// number in linked list
- S32 number = mEventDataList.getLength();
+ S32 number = mEventDataList.size();
integer2bytestream(dest, offset, number);
- LLScriptDataCollection *temp;
- for (temp = mEventDataList.getFirstData();
- temp;
- temp = mEventDataList.getNextData())
+ for (std::list<LLScriptDataCollection*>::iterator it = mEventDataList.begin(), end_it = mEventDataList.end();
+ it != end_it;
+ ++it)
{
- offset += temp->write2bytestream(dest + offset);
+ offset += (*it)->write2bytestream(dest + offset);
}
return offset;
}
- LLLinkedList<LLScriptDataCollection> mEventDataList;
+ std::list<LLScriptDataCollection*> mEventDataList;
};
class LLScriptExecute
@@ -474,9 +473,9 @@ public:
virtual ~LLScriptExecuteLSL2();
virtual S32 getVersion() const {return get_register(mBuffer, LREG_VN);}
- virtual void deleteAllEvents() {mEventData.mEventDataList.deleteAllData();}
+ virtual void deleteAllEvents() {delete_and_clear(mEventData.mEventDataList);}
virtual void addEvent(LLScriptDataCollection* event);
- virtual U32 getEventCount() {return mEventData.mEventDataList.getLength();}
+ virtual U32 getEventCount() {return mEventData.mEventDataList.size();}
virtual void removeEventType(LSCRIPTStateEventType event_type);
virtual S32 getFaults() {return get_register(mBuffer, LREG_FR);}
virtual void setFault(LSCRIPTRunTimeFaults fault) {set_fault(mBuffer, fault);}
diff --git a/indra/lscript/lscript_execute/lscript_execute.cpp b/indra/lscript/lscript_execute/lscript_execute.cpp
index e9b4d1fcbb..70cdecbb18 100755
--- a/indra/lscript/lscript_execute/lscript_execute.cpp
+++ b/indra/lscript/lscript_execute/lscript_execute.cpp
@@ -417,10 +417,13 @@ void LLScriptExecuteLSL2::callEventHandler(LSCRIPTStateEventType event, const LL
void LLScriptExecuteLSL2::callQueuedEventHandler(LSCRIPTStateEventType event, const LLUUID &id, F32 time_slice)
{
S32 major_version = getMajorVersion();
- LLScriptDataCollection* eventdata;
- for (eventdata = mEventData.mEventDataList.getFirstData(); eventdata; eventdata = mEventData.mEventDataList.getNextData())
+ for (std::list<LLScriptDataCollection*>::iterator it = mEventData.mEventDataList.begin(), end_it = mEventData.mEventDataList.end();
+ it != end_it;
+ ++it)
{
+ LLScriptDataCollection* eventdata = *it;
+
if (eventdata->mType == event)
{
// push a zero to be popped
@@ -458,7 +461,8 @@ void LLScriptExecuteLSL2::callQueuedEventHandler(LSCRIPTStateEventType event, co
S32 opcode_start = get_state_event_opcoode_start(mBuffer, current_state, event);
set_ip(mBuffer, opcode_start);
- mEventData.mEventDataList.deleteCurrentData();
+ delete *it;
+ mEventData.mEventDataList.erase(it);
break;
}
}
diff --git a/indra/lscript/lscript_execute/lscript_readlso.h b/indra/lscript/lscript_execute/lscript_readlso.h
index a545a9daf8..f3b2b66746 100755
--- a/indra/lscript/lscript_execute/lscript_readlso.h
+++ b/indra/lscript/lscript_execute/lscript_readlso.h
@@ -28,7 +28,6 @@
#define LL_LSCRIPT_READLSO_H
#include "lscript_byteconvert.h"
-#include "linked_lists.h"
// list of op code print functions
void print_noop(LLFILE *fp, U8 *buffer, S32 &offset, S32 tabs);
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/llvfs/llpidlock.h b/indra/newview/llaccountingcost.h
index d3295f4911..bc770fe1d2 100755
--- a/indra/llvfs/llpidlock.h
+++ b/indra/newview/llaccountingcost.h
@@ -1,10 +1,10 @@
/**
- * @file llpidlock.h
- * @brief System information debugging classes.
+ * @file llaccountingcost.h
+ * @
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
+ * 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
@@ -24,36 +24,32 @@
* $/LicenseInfo$
*/
-#ifndef LL_PIDLOCK_H
-#define LL_PIDLOCK_H
-#include "llnametable.h"
+#ifndef LL_ACCOUNTINGQUOTA_H
+#define LL_ACCOUNTINGQUOTA_H
-class LLSD;
-class LLFrameTimer;
-
-#if !LL_WINDOWS //For non-windows platforms.
-#include <signal.h>
-#endif
-
-namespace LLPidLock
+//SelectionQuota atm does not require a id
+struct SelectionCost
{
- void initClass(); // { (void) LLPidLockFile::instance(); }
+ 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;
+};
- bool requestLock( LLNameTable<void *> *name_table=NULL, bool autosave=TRUE,
- bool force_immediate=FALSE, F32 timeout=300.0);
- bool checkLock();
- void releaseLock();
- bool isClean();
+typedef enum { Roots = 0 , Prims } eSelectionType;
+
+#endif
- //getters
- LLNameTable<void *> * getNameTable();
- bool getAutosave();
- bool getClean();
- std::string getSaveName();
- //setters
- void setClean(bool clean);
- void setSaveName(std::string savename);
-};
-#endif // LL_PIDLOCK_H
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/llcommon/roles_constants.h b/indra/newview/roles_constants.h
index effd15ea72..effd15ea72 100755
--- a/indra/llcommon/roles_constants.h
+++ b/indra/newview/roles_constants.h
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>