Merge pull request #1670 from Ansariel/DRTVWR-600-maint-A

Fix issues resulting from b42f9d836b
master
Andrey Lihatskiy 2024-06-09 17:27:41 +03:00 committed by GitHub
commit 37e4c69119
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 18 additions and 18 deletions

View File

@ -385,7 +385,7 @@ bool LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info)
{
const std::string driven_tag = "_Driven";
auto pos = morph_param_name.find(driven_tag);
if (pos > 0)
if (pos != std::string::npos && pos > 0)
{
morph_param_name = morph_param_name.substr(0,pos);
mMorphData = mMesh->getMorphData(morph_param_name);

View File

@ -140,7 +140,7 @@ std::string LLResMgr::getMonetaryString( S32 input ) const
S32 output_pos = 0;
cur_group = 0;
auto pos = digits.size()-1;
S32 pos = static_cast<S32>(digits.size()) - 1;
S32 count_within_group = 0;
while( (pos >= 0) && (groupings[cur_group] >= 0) )
{

View File

@ -74,7 +74,7 @@ S32 LLTextParser::findPattern(const std::string &text, LLSD highlight)
break;
case ENDS_WITH:
auto pos = ltext.rfind(pattern);
if (pos >= 0 && (ltext.length()-pattern.length()==pos)) found = pos;
if (pos != std::string::npos && pos >= 0 && (ltext.length() - pattern.length() == pos)) found = pos;
break;
}
return static_cast<S32>(found);

View File

@ -1374,7 +1374,7 @@ 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 (auto i=items.size()-1; i>=0; i--)
for (S32 i = static_cast<S32>(items.size()) - 1; i >= 0; i--)
{
LLViewerInventoryItem *item = items.at(i);
LLUUID item_id = item->getLinkedUUID();

View File

@ -244,7 +244,7 @@ bool LLFriendCardsManager::isObjDirectDescendentOfCategory(const LLInventoryObje
{
LLUUID creator_id = item->getCreatorUUID();
LLViewerInventoryItem* cur_item = NULL;
for ( auto i = items->size() - 1; i >= 0; --i )
for (S32 i = static_cast<S32>(items->size()) - 1; i >= 0; --i)
{
cur_item = items->at(i);
if ( creator_id == cur_item->getCreatorUUID() )
@ -261,7 +261,7 @@ 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 ( auto i = items->size() - 1; i >= 0; --i )
for (S32 i = static_cast<S32>(items->size()) - 1; i >= 0; --i)
{
cur_item = items->at(i);
if ( obj->getType() != cur_item->getType() )
@ -281,7 +281,7 @@ 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 ( auto i = cats->size() - 1; i >= 0; --i )
for (S32 i = static_cast<S32>(cats->size()) - 1; i >= 0; --i)
{
cur_cat = cats->at(i);
if ( obj->getType() != cur_cat->getType() )

View File

@ -1504,7 +1504,7 @@ void LLIMModel::getMessagesSilently(const LLUUID& session_id, chat_message_list_
return;
}
auto i = session->mMsgs.size() - start_index;
int i = static_cast<int>(session->mMsgs.size()) - start_index;
for (chat_message_list_t::iterator iter = session->mMsgs.begin();
iter != session->mMsgs.end() && i > 0;

View File

@ -2509,7 +2509,7 @@ bool LLFolderBridge::isClipboardPasteable() const
// Search for the direct descendent of current Friends subfolder among all pasted items,
// and return false if is found.
for(auto i = objects.size() - 1; i >= 0; --i)
for (S32 i = static_cast<S32>(objects.size()) - 1; i >= 0; --i)
{
const LLUUID &obj_id = objects.at(i);
if ( LLFriendCardsManager::instance().isObjDirectDescendentOfCategory(model->getObject(obj_id), current_cat) )

View File

@ -257,8 +257,8 @@ void LLInventoryGallery::updateRootFolder()
{
updateRemovedItem(mItems[i]->getUUID());
}
auto hidden_count = mHiddenItems.size();
for (size_t i = hidden_count - 1; i >= 0; i--)
S32 hidden_count = static_cast<S32>(mHiddenItems.size());
for (S32 i = hidden_count - 1; i >= 0; i--)
{
updateRemovedItem(mHiddenItems[i]->getUUID());
}

View File

@ -743,7 +743,7 @@ void LLTeleportHistoryPanel::refresh()
break;
}
for (size_t n = mItemContainers.size() - 1; n >= 0; --n)
for (S32 n = static_cast<S32>(mItemContainers.size()) - 1; n >= 0; --n)
{
LLAccordionCtrlTab* tab = mItemContainers.at(n);
LLFlatListView* fv = getFlatListViewFromTab(tab);
@ -805,7 +805,7 @@ void LLTeleportHistoryPanel::replaceItem(S32 removed_index)
// Index of each item, from last to removed item should be decremented
// to point to the right item in LLTeleportHistoryStorage
for (auto tab_idx = mItemContainers.size() - 1; tab_idx >= 0; --tab_idx)
for (S32 tab_idx = static_cast<S32>(mItemContainers.size()) - 1; tab_idx >= 0; --tab_idx)
{
LLAccordionCtrlTab* tab = mItemContainers.at(tab_idx);
if (!tab->getVisible())
@ -859,7 +859,7 @@ void LLTeleportHistoryPanel::showTeleportHistory()
mCurrentItem = static_cast<S32>(mTeleportHistory->getItems().size()) - 1;
for (auto n = mItemContainers.size() - 1; n >= 0; --n)
for (S32 n = static_cast<S32>(mItemContainers.size()) - 1; n >= 0; --n)
{
LLAccordionCtrlTab* tab = mItemContainers.at(n);
if (tab)

View File

@ -699,7 +699,7 @@ void LLReflectionMapManager::updateProbeFace(LLReflectionMap* probe, U32 face)
res /= 2;
GLint mip = static_cast<GLint>(i - (mMipChain.size() - mips));
GLint mip = i - (static_cast<GLint>(mMipChain.size()) - mips);
if (mip >= 0)
{

View File

@ -696,7 +696,7 @@ void LLGrassPartition::getGeometry(LLSpatialGroup* group)
vertex_count += facep->getGeomCount();
index_count += facep->getIndicesCount();
auto idx = draw_vec.size()-1;
S32 idx = static_cast<S32>(draw_vec.size()) - 1;
bool fullbright = facep->isState(LLFace::FULLBRIGHT);

View File

@ -899,7 +899,7 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group)
llassert(facep->getGeomCount() == 4);
llassert(facep->getIndicesCount() == 6);
auto idx = draw_vec.size()-1;
S32 idx = static_cast<S32>(draw_vec.size()) - 1;
bool fullbright = facep->isState(LLFace::FULLBRIGHT);

View File

@ -5199,7 +5199,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
//add face to drawmap
LLSpatialGroup::drawmap_elem_t& draw_vec = group->mDrawMap[passType];
auto idx = draw_vec.size()-1;
S32 idx = static_cast<S32>(draw_vec.size()) - 1;
bool fullbright = (type == LLRenderPass::PASS_FULLBRIGHT) ||
(type == LLRenderPass::PASS_INVISIBLE) ||