diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-03-26 14:33:48 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-03-26 14:33:48 -0400 |
commit | 46fe5d49caef6c8db3df9d88f0d0ec773ef28095 (patch) | |
tree | 87f8ae2f01d871b23b9d1c1ef9f9ce736dbc8c98 /indra/newview/llvoavatar.cpp | |
parent | 0bcfbde3a4265d7963ea501622e512de8eab7f61 (diff) |
EXT-6536 : Make LLVOAvatarSelf a singleton
Superficial cleanup so that all instances of gAgent.getAvatarObject() use "LLVOAvatarSelf *avatarp = gAgent.getAvatarObject".
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 54379dece3..bb69622135 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -965,15 +965,15 @@ void LLVOAvatar::dumpBakedStatus() //static void LLVOAvatar::restoreGL() { - LLVOAvatar* self = gAgent.getAvatarObject(); - if (!self) - return; - self->setCompositeUpdatesEnabled(TRUE); - for (U32 i = 0; i < self->mBakedTextureDatas.size(); i++) + LLVOAvatarSelf* avatarp = gAgent.getAvatarObject(); + if (!avatarp) return; + + avatarp->setCompositeUpdatesEnabled(TRUE); + for (U32 i = 0; i < avatarp->mBakedTextureDatas.size(); i++) { - self->invalidateComposite(self->mBakedTextureDatas[i].mTexLayerSet, FALSE); + avatarp->invalidateComposite(avatarp->mBakedTextureDatas[i].mTexLayerSet, FALSE); } - self->updateMeshTextures(); + avatarp->updateMeshTextures(); } //static @@ -6859,8 +6859,8 @@ void LLVOAvatar::useBakedTexture( const LLUUID& id ) // static void LLVOAvatar::dumpArchetypeXML( void* ) { - LLVOAvatar* avatar = gAgent.getAvatarObject(); - LLAPRFile outfile ; + LLVOAvatarSelf* avatarp = gAgent.getAvatarObject(); + LLAPRFile outfile; outfile.open(gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,"new archetype.xml"), LL_APR_WB ); apr_file_t* file = outfile.getFileHandle() ; if (!file) @@ -6878,7 +6878,7 @@ void LLVOAvatar::dumpArchetypeXML( void* ) const std::string& wearable_name = LLWearableDictionary::getTypeName((EWearableType)type); apr_file_printf( file, "\n\t\t<!-- wearable: %s -->\n", wearable_name.c_str() ); - for (LLVisualParam* param = avatar->getFirstVisualParam(); param; param = avatar->getNextVisualParam()) + for (LLVisualParam* param = avatarp->getFirstVisualParam(); param; param = avatarp->getNextVisualParam()) { LLViewerVisualParam* viewer_param = (LLViewerVisualParam*)param; if( (viewer_param->getWearableType() == type) && @@ -6894,7 +6894,7 @@ void LLVOAvatar::dumpArchetypeXML( void* ) if (LLVOAvatarDictionary::getTEWearableType((ETextureIndex)te) == type) { // MULTIPLE_WEARABLES: extend to multiple wearables? - LLViewerTexture* te_image = avatar->getImage((ETextureIndex)te, 0); + LLViewerTexture* te_image = ((LLVOAvatar*)avatarp)->getImage((ETextureIndex)te, 0); if( te_image ) { std::string uuid_str; |