Permalink
Browse files

Merge branch 'master' of git://github.com/Shyotl/SingularityViewer in…

…to Release

Fixed pipeline conflict over Mika/Shyotl variable naming differences.
  • Loading branch information...
Lirusaito committed Mar 20, 2017
2 parents aee659b + 1ccd8cf commit 8e59d9800d3fb6f565730fd0d8ae4fe36f8b09f4
Showing with 2,974 additions and 3,605 deletions.
  1. +13 −15 indra/llappearance/llavatarappearance.cpp
  2. +3 −1 indra/llappearance/llavatarappearance.h
  3. +4 −4 indra/llappearance/llavatarappearancedefines.cpp
  4. +2 −2 indra/llappearance/llavatarappearancedefines.h
  5. +15 −15 indra/llappearance/llavatarjoint.cpp
  6. +21 −17 indra/llappearance/lldriverparam.cpp
  7. +3 −2 indra/llappearance/lllocaltextureobject.cpp
  8. +1 −1 indra/llappearance/lllocaltextureobject.h
  9. +6 −9 indra/llappearance/llpolymesh.cpp
  10. +7 −7 indra/llappearance/llpolymorph.cpp
  11. +60 −56 indra/llappearance/llpolyskeletaldistortion.cpp
  12. +1 −1 indra/llappearance/lltexglobalcolor.cpp
  13. +42 −42 indra/llappearance/lltexlayer.cpp
  14. +3 −3 indra/llappearance/lltexlayerparams.cpp
  15. +1 −1 indra/llappearance/llviewervisualparam.cpp
  16. +2 −2 indra/llappearance/llwearable.cpp
  17. +1 −1 indra/llappearance/llwearabledata.h
  18. +6 −6 indra/llcharacter/llcharacter.cpp
  19. +1 −1 indra/llcharacter/lleditingmotion.cpp
  20. +2 −2 indra/llcharacter/llheadrotmotion.cpp
  21. +4 −4 indra/llcharacter/llkeyframemotion.cpp
  22. +5 −5 indra/llcharacter/llkeyframewalkmotion.cpp
  23. +2 −2 indra/llcharacter/llmotion.cpp
  24. +2 −2 indra/llcharacter/llmotioncontroller.cpp
  25. +1 −1 indra/llcharacter/lltargetingmotion.cpp
  26. +13 −5 indra/llcharacter/llvisualparam.h
  27. +65 −23 indra/llcommon/llcriticaldamp.cpp
  28. +26 −6 indra/llcommon/llcriticaldamp.h
  29. +3 −3 indra/llcommon/lldate.cpp
  30. +7 −0 indra/llcommon/llfasttimer_class.h
  31. +1 −1 indra/llcommon/llsdparam.cpp
  32. +2 −2 indra/llcommon/llsdparam.h
  33. +6 −6 indra/llcommon/llthread.cpp
  34. +2 −2 indra/llcommon/llthread.h
  35. +2 −2 indra/llinventory/llinventory.cpp
  36. +8 −8 indra/llmessage/llfiltersd2xmlrpc.cpp
  37. +14 −14 indra/llmessage/lliohttpserver.cpp
  38. +6 −6 indra/llmessage/lliosocket.cpp
  39. +4 −4 indra/llmessage/llioutil.cpp
  40. +6 −6 indra/llmessage/llpumpio.cpp
  41. +2 −2 indra/llmessage/lltemplatemessagereader.cpp
  42. +14 −4 indra/llrender/llfontfreetype.cpp
  43. +41 −23 indra/llrender/llfontgl.cpp
  44. +1 −0 indra/llrender/llglslshader.cpp
  45. +17 −17 indra/llrender/llimagegl.cpp
  46. +30 −17 indra/llrender/llpostprocess.cpp
  47. +201 −201 indra/llrender/llrender.cpp
  48. +8 −4 indra/llrender/llrender.h
  49. +267 −371 indra/llrender/llrender2dutils.cpp
  50. +2 −11 indra/llrender/llrendertarget.cpp
  51. +3 −6 indra/llrender/llshadermgr.cpp
  52. +4 −5 indra/llrender/llshadermgr.h
  53. +50 −43 indra/llrender/llvertexbuffer.cpp
  54. +2 −2 indra/llui/llbutton.cpp
  55. +2 −2 indra/llui/llfloater.cpp
  56. +2 −2 indra/llui/llkeywords.cpp
  57. +5 −5 indra/llui/lllayoutstack.cpp
  58. +1 −1 indra/llui/llmenugl.cpp
  59. +2 −2 indra/llui/llpanel.cpp
  60. +2 −2 indra/llui/llscrollbar.cpp
  61. +4 −4 indra/llui/llscrolllistctrl.cpp
  62. +1 −1 indra/llui/lltabcontainer.cpp
  63. +4 −4 indra/llui/lltexteditor.cpp
  64. +2 −2 indra/llui/lluictrl.cpp
  65. +3 −3 indra/llui/lluictrlfactory.cpp
  66. +5 −5 indra/llui/lluictrlfactory.h
  67. +3 −3 indra/llui/lluistring.cpp
  68. +2 −2 indra/llui/llview.cpp
  69. +3 −3 indra/llui/llxuiparser.cpp
  70. +3 −3 indra/llvfs/llvfile.cpp
  71. +9 −9 indra/llwindow/llwindowwin32.cpp
  72. +11 −13 indra/newview/app_settings/shaders/class1/deferred/SSAOF.glsl
  73. +1 −3 indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
  74. +16 −19 indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl
  75. +0 −39 indra/newview/app_settings/shaders/class1/deferred/blurLightV.glsl
  76. +6 −7 indra/newview/app_settings/shaders/class1/deferred/cofF.glsl
  77. +13 −13 indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
  78. +3 −3 indra/newview/app_settings/shaders/class1/deferred/downsampleDepthNearestF.glsl
  79. +1 −1 indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl
  80. +1 −1 indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
  81. +3 −5 indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl
  82. +0 −39 indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl
  83. +0 −45 indra/newview/app_settings/shaders/class1/deferred/luminanceV.glsl
  84. +0 −3 indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
  85. +1 −2 indra/newview/app_settings/shaders/class1/deferred/materialV.glsl
  86. +10 −12 indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
  87. +11 −15 indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
  88. +1 −1 indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl
  89. +10 −14 indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl
  90. +8 −8 indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
  91. +3 −4 ...settings/shaders/class1/deferred/{postDeferredGammaCorrect.glsl → postDeferredGammaCorrectF.glsl}
  92. +4 −5 indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl
  93. +1 −3 indra/newview/app_settings/shaders/class1/deferred/postDeferredNoTCV.glsl
  94. +0 −44 indra/newview/app_settings/shaders/class1/deferred/postDeferredV.glsl
  95. +11 −16 indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
  96. +0 −40 indra/newview/app_settings/shaders/class1/deferred/softenLightV.glsl
  97. +8 −13 indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
  98. +1 −1 indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl
  99. +0 −2 indra/newview/app_settings/shaders/class1/deferred/sunLightNoFragCoordV.glsl
  100. +6 −7 indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl
  101. +0 −41 indra/newview/app_settings/shaders/class1/deferred/sunLightV.glsl
  102. +1 −1 indra/newview/app_settings/shaders/class1/deferred/underWaterF.glsl
  103. +1 −6 indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
  104. +7 −9 indra/newview/app_settings/shaders/class1/effects/MotionBlurF.glsl
  105. +3 −3 indra/newview/app_settings/shaders/class1/effects/PosterizeF.glsl
  106. +7 −9 indra/newview/app_settings/shaders/class1/effects/VignetteF.glsl
  107. +3 −3 indra/newview/app_settings/shaders/class1/effects/colorFilterF.glsl
  108. +10 −20 indra/newview/app_settings/shaders/class1/effects/gaussBlurF.glsl
  109. +3 −3 indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl
  110. +3 −4 indra/newview/app_settings/shaders/class1/effects/glowExtractV.glsl
  111. +11 −10 indra/newview/app_settings/shaders/class1/effects/glowV.glsl
  112. +3 −3 indra/newview/app_settings/shaders/class1/effects/nightVisionF.glsl
  113. +0 −67 indra/newview/app_settings/shaders/class1/interface/downsampleDepthRectF.glsl
  114. +1 −3 indra/newview/app_settings/shaders/class1/interface/downsampleDepthV.glsl
  115. +4 −5 indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl
  116. +4 −5 indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl
  117. +2 −2 indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAV.glsl
  118. +3 −6 indra/newview/app_settings/shaders/class1/interface/glowcombineV.glsl
  119. +3 −3 indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl
  120. +0 −62 indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl
  121. +38 −49 indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
  122. +58 −60 indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
  123. +0 −42 indra/newview/app_settings/shaders/class2/deferred/softenLightV.glsl
  124. +11 −16 indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
  125. +5 −7 indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
  126. +9 −10 indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
  127. +0 −41 indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl
  128. +1 −1 indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl
  129. +10 −10 indra/newview/llagentcamera.cpp
  130. +270 −240 indra/newview/llaisapi.cpp
  131. +32 −105 indra/newview/llaisapi.h
  132. +12 −7 indra/newview/llappearancemgr.cpp
  133. +72 −72 indra/newview/llappviewer.cpp
  134. +7 −7 indra/newview/llbox.cpp
  135. +12 −12 indra/newview/lldrawable.cpp
  136. +18 −9 indra/newview/lldrawpoolalpha.cpp
  137. +13 −13 indra/newview/lldrawpoolavatar.cpp
  138. +35 −35 indra/newview/lldrawpoolbump.cpp
  139. +2 −2 indra/newview/lldrawpoolmaterials.cpp
  140. +30 −30 indra/newview/lldrawpoolsimple.cpp
  141. +10 −10 indra/newview/lldrawpoolterrain.cpp
  142. +8 −8 indra/newview/lldrawpooltree.cpp
  143. +2 −10 indra/newview/lldrawpoolwater.cpp
  144. +2 −2 indra/newview/lldrawpoolwlsky.cpp
  145. +119 −98 indra/newview/llface.cpp
  146. +4 −4 indra/newview/llfasttimerview.cpp
  147. +7 −7 indra/newview/llflexibleobject.cpp
  148. +10 −17 indra/newview/llfloateravatarpicker.cpp
  149. +3 −3 indra/newview/llfloaterbvhpreview.cpp
  150. +10 −17 indra/newview/llfloatercolorpicker.cpp
  151. +3 −3 indra/newview/llfloaterexploreanimations.cpp
  152. +6 −6 indra/newview/llfloaterimagepreview.cpp
  153. +3 −3 indra/newview/llfloatermodelpreview.cpp
  154. +17 −26 indra/newview/llfloatersnapshot.cpp
  155. +14 −14 indra/newview/llfolderview.cpp
  156. +3 −3 indra/newview/llfolderviewitem.cpp
  157. +5 −5 indra/newview/llfollowcam.cpp
  158. +9 −9 indra/newview/llgiveinventory.cpp
  159. +18 −23 indra/newview/llglsandbox.cpp
  160. +3 −3 indra/newview/llhudicon.cpp
  161. +2 −2 indra/newview/llhudmanager.cpp
  162. +1 −1 indra/newview/llhudnametag.cpp
  163. +2 −2 indra/newview/llhudobject.cpp
  164. +8 −4 indra/newview/llinventorybridge.cpp
  165. +2 −2 indra/newview/llinventorypanel.cpp
  166. +4 −4 indra/newview/lljoystickbutton.cpp
  167. +9 −9 indra/newview/llmaniprotate.cpp
  168. +21 −9 indra/newview/llmanipscale.cpp
  169. +6 −6 indra/newview/llmaniptranslate.cpp
  170. +2 −2 indra/newview/llmaterialmgr.cpp
  171. +7 −7 indra/newview/llmediactrl.cpp
  172. +43 −60 indra/newview/llnetmap.cpp
  173. +16 −16 indra/newview/llspatialpartition.cpp
  174. +10 −18 indra/newview/lltexturectrl.cpp
  175. +3 −3 indra/newview/lltoolmorph.cpp
  176. +25 −25 indra/newview/llviewerdisplay.cpp
  177. +148 −90 indra/newview/llviewerinventory.cpp
  178. +2 −2 indra/newview/llviewerjointattachment.cpp
  179. +2 −2 indra/newview/llviewerjointmesh.cpp
  180. +20 −20 indra/newview/llviewermedia.cpp
  181. +4 −4 indra/newview/llviewermessage.cpp
  182. +2 −2 indra/newview/llviewerobject.cpp
  183. +14 −14 indra/newview/llviewerobjectlist.cpp
  184. +23 −23 indra/newview/llvieweroctree.cpp
  185. +2 −2 indra/newview/llviewerpartsim.cpp
  186. +1 −1 indra/newview/llviewerregion.cpp
  187. +10 −21 indra/newview/llviewershadermgr.cpp
  188. +0 −1 indra/newview/llviewershadermgr.h
  189. +6 −6 indra/newview/llviewertexture.cpp
  190. +18 −18 indra/newview/llviewertexturelist.cpp
  191. +2 −2 indra/newview/llviewerwindow.cpp
  192. +19 −19 indra/newview/llvoavatar.cpp
  193. +2 −2 indra/newview/llvoclouds.cpp
  194. +4 −4 indra/newview/llvograss.cpp
  195. +2 −2 indra/newview/llvoicevivox.cpp
  196. +6 −6 indra/newview/llvopartgroup.cpp
  197. +4 −4 indra/newview/llvosky.cpp
  198. +4 −4 indra/newview/llvosurfacepatch.cpp
  199. +2 −2 indra/newview/llvotree.cpp
  200. +37 −37 indra/newview/llvovolume.cpp
  201. +2 −2 indra/newview/llvowater.cpp
  202. +2 −2 indra/newview/llvowlsky.cpp
  203. +2 −2 indra/newview/llwaterparammanager.cpp
  204. +3 −3 indra/newview/llwlparammanager.cpp
  205. +2 −2 indra/newview/llwlparamset.cpp
  206. +2 −2 indra/newview/llworld.cpp
  207. +26 −26 indra/newview/llworldmapview.cpp
  208. +244 −339 indra/newview/pipeline.cpp
  209. +21 −23 indra/newview/pipeline.h
  210. +6 −4 indra/test_apps/llplugintest/llmediaplugintest.cpp
  211. +7 −7 indra/test_apps/llplugintest/media_plugin_test.cpp
  212. +4 −4 indra/test_apps/llplugintest/media_simple_test.cpp
@@ -53,8 +53,6 @@
#pragma warning (disable:4702)
#endif
-#include <boost/lexical_cast.hpp>
-
using namespace LLAvatarAppearanceDefines;
//-----------------------------------------------------------------------------
@@ -212,8 +210,9 @@ void LLAvatarAppearance::initInstance()
mRoot = createAvatarJoint();
mRoot->setName( "mRoot" );
- for (LLAvatarAppearanceDictionary::MeshEntries::const_iterator iter = LLAvatarAppearanceDictionary::getInstance()->getMeshEntries().begin();
- iter != LLAvatarAppearanceDictionary::getInstance()->getMeshEntries().end();
+ const auto& mesh_entries = LLAvatarAppearanceDictionary::getInstance()->getMeshEntries();
+ for (LLAvatarAppearanceDictionary::MeshEntries::const_iterator iter = mesh_entries.begin();
+ iter != mesh_entries.end();
++iter)
{
const EMeshIndex mesh_index = iter->first;
@@ -230,7 +229,7 @@ void LLAvatarAppearance::initInstance()
for (U32 lod = 0; lod < mesh_dict->mLOD; lod++)
{
LLAvatarJointMesh* mesh = createAvatarJointMesh();
- std::string mesh_name = "m" + mesh_dict->mName + boost::lexical_cast<std::string>(lod);
+ std::string mesh_name = "m" + mesh_dict->mName + std::to_string(lod);
// We pre-pended an m - need to capitalize first character for camelCase
mesh_name[1] = toupper(mesh_name[1]);
mesh->setName(mesh_name);
@@ -258,8 +257,8 @@ void LLAvatarAppearance::initInstance()
//-------------------------------------------------------------------------
// associate baked textures with meshes
//-------------------------------------------------------------------------
- for (LLAvatarAppearanceDictionary::MeshEntries::const_iterator iter = LLAvatarAppearanceDictionary::getInstance()->getMeshEntries().begin();
- iter != LLAvatarAppearanceDictionary::getInstance()->getMeshEntries().end();
+ for (LLAvatarAppearanceDictionary::MeshEntries::const_iterator iter = mesh_entries.begin();
+ iter != mesh_entries.end();
++iter)
{
const EMeshIndex mesh_index = iter->first;
@@ -298,7 +297,7 @@ LLAvatarAppearance::~LLAvatarAppearance()
mBakedTextureDatas[i].mJointMeshes.clear();
for (morph_list_t::iterator iter2 = mBakedTextureDatas[i].mMaskedMorphs.begin();
- iter2 != mBakedTextureDatas[i].mMaskedMorphs.end(); iter2++)
+ iter2 != mBakedTextureDatas[i].mMaskedMorphs.end(); ++iter2)
{
LLMaskedMorph* masked_morph = (*iter2);
delete masked_morph;
@@ -383,8 +382,6 @@ void LLAvatarAppearance::initClass(const std::string& avatar_file_name_arg, cons
root->getFastAttributeS32( wearable_definition_version_string, wearable_def_version );
LLWearable::setCurrentDefinitionVersion( wearable_def_version );
- std::string mesh_file_name;
-
LLXmlTreeNode* skeleton_node = root->getChildByName( "skeleton" );
if (!skeleton_node)
{
@@ -573,7 +570,8 @@ void LLAvatarAppearance::computeBodySize()
{
mBodySize = new_body_size;
- compareJointStateMaps(mLastBodySizeState, mCurrBodySizeState);
+ compareJointStateMaps(mLastBodySizeState, mCurrBodySizeState);
+ bodySizeChanged();
}
}
@@ -927,11 +925,11 @@ void LLAvatarAppearance::buildCharacter()
//-----------------------------------------------------------------------------
// loadAvatar()
//-----------------------------------------------------------------------------
-//static LLFastTimer::DeclareTimer FTM_LOAD_AVATAR("Load Avatar");
+//static LLTrace::BlockTimerStatHandle FTM_LOAD_AVATAR("Load Avatar");
BOOL LLAvatarAppearance::loadAvatar()
{
-// LLFastTimer t(FTM_LOAD_AVATAR);
+// LL_RECORD_BLOCK_TIME(FTM_LOAD_AVATAR);
// avatar_skeleton.xml
if( !buildSkeleton(sAvatarSkeletonInfo) )
@@ -1047,7 +1045,7 @@ BOOL LLAvatarAppearance::loadAvatar()
addVisualParam( driver_param );
driver_param->setParamLocation(isSelf() ? LOC_AV_SELF : LOC_AV_OTHER);
LLVisualParam*(LLAvatarAppearance::*avatar_function)(S32)const = &LLAvatarAppearance::getVisualParam;
- if( !driver_param->linkDrivenParams(boost::bind(avatar_function,(LLAvatarAppearance*)this,_1 ), false))
+ if( !driver_param->linkDrivenParams(std::bind(avatar_function,(LLAvatarAppearance*)this, std::placeholders::_1 ), false))
{
LL_WARNS() << "could not link driven params for avatar " << getID().asString() << " param id: " << driver_param->getID() << LL_ENDL;
continue;
@@ -1222,7 +1220,7 @@ BOOL LLAvatarAppearance::loadMeshNodes()
}
// Multimap insert
- mPolyMeshes.insert(std::make_pair(info->mMeshFileName, poly_mesh));
+ mPolyMeshes.emplace(info->mMeshFileName, poly_mesh);
mesh->setMesh( poly_mesh );
mesh->setLOD( info->mMinPixelArea );
@@ -35,6 +35,7 @@
#include "llviewervisualparam.h"
#include "llxmltree.h"
+#include <boost/container/flat_map.hpp> // <alchemy/>
class LLTexLayerSet;
class LLTexGlobalColor;
class LLTexGlobalColorInfo;
@@ -141,7 +142,7 @@ class LLAvatarAppearance : public LLCharacter
LLVector3 mHeadOffset; // current head position
LLAvatarJoint *mRoot;
- typedef std::vector<std::pair<char[64], LLJoint*>> joint_map_t;
+ typedef std::vector<std::pair<char[64], LLJoint*> > joint_map_t;
joint_map_t mJointMap;
typedef std::map<std::string, LLVector3> joint_state_map_t;
@@ -162,6 +163,7 @@ class LLAvatarAppearance : public LLCharacter
static BOOL parseSkeletonFile(const std::string& filename);
virtual void buildCharacter();
virtual BOOL loadAvatar();
+ virtual void bodySizeChanged() = 0;
BOOL setupBone(const LLAvatarBoneInfo* info, LLJoint* parent, S32 &current_volume_num, S32 &current_joint_num);
BOOL allocateCharacterJoints(U32 num);
@@ -140,7 +140,7 @@ LLAvatarAppearanceDictionary::~LLAvatarAppearanceDictionary()
// map it to the baked texture.
void LLAvatarAppearanceDictionary::createAssociations()
{
- for (BakedTextures::const_iterator iter = mBakedTextures.begin(); iter != mBakedTextures.end(); iter++)
+ for (BakedTextures::const_iterator iter = mBakedTextures.begin(); iter != mBakedTextures.end(); ++iter)
{
const EBakedTextureIndex baked_index = (iter->first);
const BakedEntry *dict = (iter->second);
@@ -149,7 +149,7 @@ void LLAvatarAppearanceDictionary::createAssociations()
// with this baked texture index.
for (texture_vec_t::const_iterator local_texture_iter = dict->mLocalTextures.begin();
local_texture_iter != dict->mLocalTextures.end();
- local_texture_iter++)
+ ++local_texture_iter)
{
const ETextureIndex local_texture_index = (ETextureIndex) *local_texture_iter;
mTextures[local_texture_index]->mIsUsedByBakedTexture = true;
@@ -222,7 +222,7 @@ ETextureIndex LLAvatarAppearanceDictionary::bakedToLocalTextureIndex(EBakedTextu
}
// static
-EBakedTextureIndex LLAvatarAppearanceDictionary::findBakedByRegionName(std::string name)
+EBakedTextureIndex LLAvatarAppearanceDictionary::findBakedByRegionName(const std::string& name)
{
U8 index = 0;
while (index < BAKED_NUM_INDICES)
@@ -240,7 +240,7 @@ EBakedTextureIndex LLAvatarAppearanceDictionary::findBakedByRegionName(std::stri
}
// static
-EBakedTextureIndex LLAvatarAppearanceDictionary::findBakedByImageName(std::string name)
+EBakedTextureIndex LLAvatarAppearanceDictionary::findBakedByImageName(const std::string& name)
{
U8 index = 0;
while (index < BAKED_NUM_INDICES)
@@ -218,8 +218,8 @@ class LLAvatarAppearanceDictionary : public LLSingleton<LLAvatarAppearanceDictio
static ETextureIndex bakedToLocalTextureIndex(EBakedTextureIndex t);
// find a baked texture index based on its name
- static EBakedTextureIndex findBakedByRegionName(std::string name);
- static EBakedTextureIndex findBakedByImageName(std::string name);
+ static EBakedTextureIndex findBakedByRegionName(const std::string& name);
+ static EBakedTextureIndex findBakedByImageName(const std::string& name);
// Given a texture entry, determine which wearable type owns it.
static LLWearableType::EType getTEWearableType(ETextureIndex index);
@@ -189,26 +189,26 @@ BOOL LLAvatarJoint::updateLOD(F32 pixel_area, BOOL activate)
iter != mChildren.end(); ++iter)
{
LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(*iter);
- if (!joint)
- continue;
-
- F32 jointLOD = joint->getLOD();
-
- if (found_lod || jointLOD == DEFAULT_AVATAR_JOINT_LOD)
- {
- // we've already found a joint to enable, so enable the rest as alternatives
- lod_changed |= joint->updateLOD(pixel_area, TRUE);
- }
- else
+ if (joint)
{
- if (pixel_area >= jointLOD || sDisableLOD)
+ F32 jointLOD = joint->getLOD();
+
+ if (found_lod || jointLOD == DEFAULT_AVATAR_JOINT_LOD)
{
+ // we've already found a joint to enable, so enable the rest as alternatives
lod_changed |= joint->updateLOD(pixel_area, TRUE);
- found_lod = TRUE;
}
else
{
- lod_changed |= joint->updateLOD(pixel_area, FALSE);
+ if (pixel_area >= jointLOD || sDisableLOD)
+ {
+ lod_changed |= joint->updateLOD(pixel_area, TRUE);
+ found_lod = TRUE;
+ }
+ else
+ {
+ lod_changed |= joint->updateLOD(pixel_area, FALSE);
+ }
}
}
}
@@ -231,7 +231,7 @@ void LLAvatarJoint::setMeshesToChildren()
{
removeAllChildren();
for (avatar_joint_mesh_list_t::iterator iter = mMeshParts.begin();
- iter != mMeshParts.end(); iter++)
+ iter != mMeshParts.end(); ++iter)
{
addChild((*iter));
}
@@ -102,7 +102,7 @@ void LLDriverParamInfo::toStream(std::ostream &out)
LLViewerVisualParamInfo::toStream(out);
out << "driver" << "\t";
out << mDrivenInfoList.size() << "\t";
- for (entry_info_list_t::iterator iter = mDrivenInfoList.begin(); iter != mDrivenInfoList.end(); iter++)
+ for (entry_info_list_t::iterator iter = mDrivenInfoList.begin(); iter != mDrivenInfoList.end(); ++iter)
{
LLDrivenEntryInfo driven = *iter;
out << driven.mDrivenID << "\t";
@@ -118,14 +118,18 @@ void LLDriverParamInfo::toStream(std::ostream &out)
// used anywhere, so it's not an urgent problem.
LL_WARNS_ONCE() << "Invalid usage of mDriverParam." << LL_ENDL;
- if(mDriverParam && mDriverParam->getAvatarAppearance()->isSelf() &&
- mDriverParam->getAvatarAppearance()->isValid())
+ if (!mDriverParam)
+ return;
+ const auto& avatar_appearance = mDriverParam->getAvatarAppearance();
+
+ if(avatar_appearance->isSelf() &&
+ avatar_appearance->isValid())
{
- for (entry_info_list_t::iterator iter = mDrivenInfoList.begin(); iter != mDrivenInfoList.end(); iter++)
+ for (entry_info_list_t::iterator iter = mDrivenInfoList.begin(); iter != mDrivenInfoList.end(); ++iter)
{
LLDrivenEntryInfo driven = *iter;
LLViewerVisualParam *param =
- (LLViewerVisualParam*)mDriverParam->getAvatarAppearance()->getVisualParam(driven.mDrivenID);
+ (LLViewerVisualParam*) avatar_appearance->getVisualParam(driven.mDrivenID);
if (param)
{
param->getInfo()->toStream(out);
@@ -148,7 +152,7 @@ void LLDriverParamInfo::toStream(std::ostream &out)
else
{
LL_WARNS() << "could not get parameter " << driven.mDrivenID << " from avatar "
- << mDriverParam->getAvatarAppearance()
+ << avatar_appearance
<< " for driver parameter " << getID() << LL_ENDL;
}
out << std::endl;
@@ -232,7 +236,7 @@ void LLDriverParam::setWeight(F32 weight, bool upload_bake)
//-------|----|-------|----|-------> driver
// | min1 max1 max2 min2
- for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); iter++ )
+ for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); ++iter )
{
LLDrivenEntry* driven = &(*iter);
LLDrivenEntryInfo* info = driven->mInfo;
@@ -305,7 +309,7 @@ void LLDriverParam::setWeight(F32 weight, bool upload_bake)
F32 LLDriverParam::getTotalDistortion()
{
F32 sum = 0.f;
- for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); iter++ )
+ for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); ++iter )
{
LLDrivenEntry* driven = &(*iter);
sum += driven->mParam->getTotalDistortion();
@@ -320,7 +324,7 @@ const LLVector4a &LLDriverParam::getAvgDistortion()
LLVector4a sum;
sum.clear();
S32 count = 0;
- for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); iter++ )
+ for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); ++iter )
{
LLDrivenEntry* driven = &(*iter);
sum.add(driven->mParam->getAvgDistortion());
@@ -335,7 +339,7 @@ const LLVector4a &LLDriverParam::getAvgDistortion()
F32 LLDriverParam::getMaxDistortion()
{
F32 max = 0.f;
- for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); iter++ )
+ for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); ++iter )
{
LLDrivenEntry* driven = &(*iter);
F32 param_max = driven->mParam->getMaxDistortion();
@@ -353,7 +357,7 @@ LLVector4a LLDriverParam::getVertexDistortion(S32 index, LLPolyMesh *poly_mesh)
{
LLVector4a sum;
sum.clear();
- for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); iter++ )
+ for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); ++iter )
{
LLDrivenEntry* driven = &(*iter);
sum.add(driven->mParam->getVertexDistortion( index, poly_mesh ));
@@ -365,7 +369,7 @@ const LLVector4a* LLDriverParam::getFirstDistortion(U32 *index, LLPolyMesh **pol
{
mCurrentDistortionParam = NULL;
const LLVector4a* v = NULL;
- for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); iter++ )
+ for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); ++iter )
{
LLDrivenEntry* driven = &(*iter);
v = driven->mParam->getFirstDistortion( index, poly_mesh );
@@ -391,7 +395,7 @@ const LLVector4a* LLDriverParam::getNextDistortion(U32 *index, LLPolyMesh **poly
entry_list_t::iterator iter;
// Set mDriven iteration to the right point
- for( iter = mDriven.begin(); iter != mDriven.end(); iter++ )
+ for( iter = mDriven.begin(); iter != mDriven.end(); ++iter )
{
driven = &(*iter);
if( driven->mParam == mCurrentDistortionParam )
@@ -412,7 +416,7 @@ const LLVector4a* LLDriverParam::getNextDistortion(U32 *index, LLPolyMesh **poly
{
// This param is finished, so start the next param. It might not have any
// distortions, though, so we have to loop to find the next param that does.
- for( iter++; iter != mDriven.end(); iter++ )
+ for( ++iter; iter != mDriven.end(); ++iter )
{
driven = &(*iter);
v = driven->mParam->getFirstDistortion( index, poly_mesh );
@@ -448,7 +452,7 @@ void LLDriverParam::setAnimationTarget( F32 target_value, bool upload_bake )
{
LLVisualParam::setAnimationTarget(target_value, upload_bake);
- for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); iter++ )
+ for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); ++iter )
{
LLDrivenEntry* driven = &(*iter);
F32 driven_weight = getDrivenWeight(driven, mTargetWeight);
@@ -466,7 +470,7 @@ void LLDriverParam::stopAnimating(bool upload_bake)
{
LLVisualParam::stopAnimating(upload_bake);
- for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); iter++ )
+ for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); ++iter )
{
LLDrivenEntry* driven = &(*iter);
driven->mParam->setAnimating(FALSE);
@@ -523,7 +527,7 @@ void LLDriverParam::updateCrossDrivenParams(LLWearableType::EType driven_type)
bool needs_update = (getWearableType()==driven_type);
// if the driver has a driven entry for the passed-in wearable type, we need to refresh the value
- for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); iter++ )
+ for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); ++iter )
{
LLDrivenEntry* driven = &(*iter);
if (driven && driven->mParam && driven->mParam->getCrossWearable() && driven->mParam->getWearableType() == driven_type)
@@ -76,6 +76,7 @@ LLLocalTextureObject::LLLocalTextureObject(const LLLocalTextureObject& lto) :
LLLocalTextureObject::~LLLocalTextureObject()
{
+ delete_and_clear(mTexLayers);
}
LLGLTexture* LLLocalTextureObject::getImage() const
@@ -95,7 +96,7 @@ LLTexLayer* LLLocalTextureObject::getTexLayer(U32 index) const
LLTexLayer* LLLocalTextureObject::getTexLayer(const std::string &name)
{
- for( tex_layer_vec_t::iterator iter = mTexLayers.begin(); iter != mTexLayers.end(); iter++)
+ for( tex_layer_vec_t::iterator iter = mTexLayers.begin(); iter != mTexLayers.end(); ++iter)
{
LLTexLayer *layer = *iter;
if (layer->getName().compare(name) == 0)
@@ -196,7 +197,7 @@ BOOL LLLocalTextureObject::removeTexLayer(U32 index)
return TRUE;
}
-void LLLocalTextureObject::setID(LLUUID new_id)
+void LLLocalTextureObject::setID(const LLUUID& new_id)
{
mID = new_id;
}
@@ -61,7 +61,7 @@ class LLLocalTextureObject
BOOL addTexLayer(LLTexLayerTemplate *new_tex_layer, LLWearable *wearable);
BOOL removeTexLayer(U32 index);
- void setID(LLUUID new_id);
+ void setID(const LLUUID& new_id);
void setDiscard(S32 new_discard);
void setBakedReady(BOOL ready);
Oops, something went wrong.

0 comments on commit 8e59d98

Please sign in to comment.