From 492a208b75b703366e1e2878a8b360f910d0d0d3 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 1 Nov 2022 16:21:27 +0100 Subject: [PATCH] More simplifications --- indra/newview/llpanelprofile.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 49a114b195..3a2f16cc52 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -2245,8 +2245,7 @@ void LLPanelProfileSecondLife::onSaveDescriptionChanges() // floater is dead, so panels are dead as well return; } - LLPanel *panel = floater_profile->findChild(PANEL_PROFILE_VIEW, TRUE); - auto *panel_profile = dynamic_cast(panel); + LLPanelProfile* panel_profile = floater_profile->findChild(PANEL_PROFILE_VIEW, TRUE); if (!panel_profile) { LL_WARNS() << PANEL_PROFILE_VIEW << " not found" << LL_ENDL; @@ -2262,7 +2261,7 @@ void LLPanelProfileSecondLife::onSaveDescriptionChanges() LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesUpdate(&avatar_data); } - } + } } #endif // @@ -2482,7 +2481,7 @@ void LLPanelProfileSecondLife::onCommitProfileImage(const LLUUID& id) else { // Make OpenSim profiles work again -#ifdef OPENSIM +#ifdef OPENSIM if(LLGridManager::getInstance()->isInOpenSim()) { mImageId = id; @@ -2572,6 +2571,7 @@ void LLPanelProfileWeb::apply(LLAvatarData* data) } #endif // + void LLPanelProfileWeb::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name) { mAvatarNameCacheConnection.disconnect(); @@ -2869,7 +2869,7 @@ void LLPanelProfileFirstLife::onCommitPhoto(const LLUUID& id) else { // Make OpenSim profiles work again -#ifdef OPENSIM +#ifdef OPENSIM if(LLGridManager::getInstance()->isInOpenSim()) { mImageId = id; @@ -2925,8 +2925,7 @@ void LLPanelProfileFirstLife::onSaveDescriptionChanges() // floater is dead, so panels are dead as well return; } - LLPanel *panel = floater_profile->findChild(PANEL_PROFILE_VIEW, TRUE); - auto *panel_profile = dynamic_cast(panel); + LLPanelProfile* panel_profile = floater_profile->findChild(PANEL_PROFILE_VIEW, TRUE); if (!panel_profile) { LL_WARNS() << PANEL_PROFILE_VIEW << " not found" << LL_ENDL; @@ -2941,7 +2940,7 @@ void LLPanelProfileFirstLife::onSaveDescriptionChanges() LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesUpdate(&avatar_data); } - } + } } #endif // @@ -3015,7 +3014,7 @@ void LLPanelProfileFirstLife::resetData() auto show_image_buttons = getSelfProfile(); #ifdef OPENSIM std::string cap_url = gAgent.getRegionCapability(PROFILE_IMAGE_UPLOAD_CAP); - if( cap_url.empty() && LLGridManager::instance().isInOpenSim() ) + if (cap_url.empty() && LLGridManager::instance().isInOpenSim()) { show_image_buttons = false; } @@ -3069,10 +3068,10 @@ void LLPanelProfileNotes::updateData() boost::bind(request_avatar_properties_coro, cap_url, avatar_id)); } // Restore UDO profiles -#ifdef OPENSIM +#ifdef OPENSIM else { - LLAvatarPropertiesProcessor::getInstance()->sendAvatarNotesRequest(avatar_id); + LLAvatarPropertiesProcessor::getInstance()->sendAvatarNotesRequest(avatar_id); } #endif // @@ -3273,7 +3272,7 @@ void LLPanelProfile::updateData() // Restore UDP profiles else { - LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(avatar_id); + LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(avatar_id); } // }