Warnings fixes, mostly signed/unsigned mismatch

This commit is contained in:
Inusaito Sayori
2015-07-30 11:46:44 -04:00
parent dfa40d8939
commit 9dadc8c054
20 changed files with 44 additions and 44 deletions

View File

@@ -252,7 +252,7 @@ namespace
asset_id_matches);
// See if any of the inventory items matching this sculpt id are exportable
for (S32 i = 0; i < items.size(); i++)
for (U32 i = 0; i < items.size(); i++)
{
const LLPermissions item_permissions = items[i]->getPermissions();
if (item_permissions.allowExportBy(gAgentID, LFSimFeatureHandler::instance().exportPolicy()))

View File

@@ -110,7 +110,7 @@ void LLAgentPilot::save(const std::string& filename)
file << mActions.size() << '\n';
S32 i;
U32 i;
for (i = 0; i < mActions.size(); i++)
{
file << mActions[i].mTime << "\t" << mActions[i].mType << "\t";
@@ -184,7 +184,7 @@ void LLAgentPilot::updateTarget()
{
if (mPlaying)
{
if (mCurrentAction < mActions.size())
if (mCurrentAction < (S32)mActions.size())
{
if (0 == mCurrentAction)
{
@@ -209,7 +209,7 @@ void LLAgentPilot::updateTarget()
//gAgent.stopAutoPilot();
mCurrentAction++;
if (mCurrentAction < mActions.size())
if (mCurrentAction < (S32)mActions.size())
{
gAgent.startAutoPilotGlobal(mActions[mCurrentAction].mTarget);
}

View File

@@ -1775,7 +1775,7 @@ void LLAgentWearables::findAttachmentsAddRemoveInfo(LLInventoryModel::item_array
std::set<LLUUID> requested_item_ids;
std::set<LLUUID> current_item_ids;
for (S32 i=0; i<obj_item_array.size(); i++)
for (U32 i=0; i<obj_item_array.size(); i++)
{
const LLUUID & requested_id = obj_item_array[i].get()->getLinkedUUID();
//LL_INFOS() << "Requested attachment id " << requested_id << LL_ENDL;

View File

@@ -1630,7 +1630,7 @@ void LLAppearanceMgr::takeOffOutfit(const LLUUID& cat_id)
// deactivate all gestures in the outfit folder
LLInventoryModel::item_array_t gest_items;
getDescendentsOfAssetType(cat_id, gest_items, LLAssetType::AT_GESTURE, true);
for(S32 i = 0; i < gest_items.size(); ++i)
for(U32 i = 0; i < gest_items.size(); ++i)
{
LLViewerInventoryItem *gest_item = gest_items[i];
if ( LLGestureMgr::instance().isGestureActive( gest_item->getLinkedUUID()) )
@@ -1961,7 +1961,7 @@ void LLAppearanceMgr::purgeBaseOutfitLink(const LLUUID& category, LLPointer<LLIn
LLInventoryModel::item_array_t items;
gInventory.collectDescendents(category, cats, items,
LLInventoryModel::EXCLUDE_TRASH);
for (S32 i = 0; i < items.size(); ++i)
for (U32 i = 0; i < items.size(); ++i)
{
LLViewerInventoryItem *item = items.at(i);
if (item->getActualType() != LLAssetType::AT_LINK_FOLDER)
@@ -1983,7 +1983,7 @@ 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.size(); ++i)
for (U32 i = 0; i < items.size(); ++i)
{
LLViewerInventoryItem *item = items.at(i);
if (keep_outfit_links && (item->getActualType() == LLAssetType::AT_LINK_FOLDER))
@@ -2001,7 +2001,7 @@ void LLAppearanceMgr::filterWearableItems(
LLInventoryModel::item_array_t& items, S32 max_per_type, S32 max_total)
{
// Restrict by max total items first.
if ((max_total > 0) && (items.size() > max_total))
if ((max_total > 0) && ((S32)items.size() > max_total))
{
LLInventoryModel::item_array_t items_to_keep;
for (S32 i=0; i<max_total; i++)
@@ -2081,7 +2081,7 @@ void LLAppearanceMgr::updateCOF(LLInventoryModel::item_array_t& body_items_new,
{
LLInventoryModel::item_array_t gest_items;
getDescendentsOfAssetType(cof, gest_items, LLAssetType::AT_GESTURE);
for(S32 i = 0; i < gest_items.size(); ++i)
for(U32 i = 0; i < gest_items.size(); ++i)
{
LLViewerInventoryItem *gest_item = gest_items.at(i);
if ( LLGestureMgr::instance().isGestureActive( gest_item->getLinkedUUID()) )
@@ -2634,7 +2634,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool enforce_item_restrictions,
// callback will be called (and this object deleted)
// before the final getNextData().
for(S32 i = 0; i < wear_items.size(); ++i)
for(U32 i = 0; i < wear_items.size(); ++i)
{
LLViewerInventoryItem *item = wear_items.at(i);
LLViewerInventoryItem *linked_item = item ? item->getLinkedItem() : NULL;
@@ -3796,7 +3796,7 @@ void RequestAgentUpdateAppearanceResponder::debugCOF(const LLSD& content)
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.size(); i++)
for (U32 i=0; i<item_array.size(); i++)
{
const LLViewerInventoryItem* inv_item = item_array.at(i).get();
local_items.insert(inv_item->getUUID());
@@ -3904,7 +3904,7 @@ 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.size(); i++)
for (U32 i=0; i<item_array.size(); i++)
{
const LLViewerInventoryItem* inv_item = item_array.at(i).get();
LLSD item;
@@ -4686,7 +4686,7 @@ void LLAppearanceMgr::dumpCat(const LLUUID& cat_id, const std::string& msg)
void LLAppearanceMgr::dumpItemArray(const LLInventoryModel::item_array_t& items,
const std::string& msg)
{
for (S32 i=0; i<items.size(); i++)
for (U32 i=0; i<items.size(); i++)
{
LLViewerInventoryItem *item = items.at(i);
LLViewerInventoryItem *linked_item = item ? item->getLinkedItem() : NULL;

View File

@@ -1235,7 +1235,7 @@ void LLFloaterAvatarList::sendKeys() const
std::ostringstream ids;
U32 num_ids = 0;
for (S32 i = 0; i < regionp->mMapAvatarIDs.size(); ++i)
for (U32 i = 0; i < regionp->mMapAvatarIDs.size(); ++i)
{
ids << "," << regionp->mMapAvatarIDs.at(i);
++num_ids;

View File

@@ -247,7 +247,7 @@ const LLUUID& LLFloaterLandmark::findItemID(const LLUUID& asset_id, BOOL copyabl
if (items.size())
{
// search for copyable version first
for (S32 i = 0; i < items.size(); i++)
for (U32 i = 0; i < items.size(); i++)
{
LLInventoryItem* itemp = items[i];
LLPermissions item_permissions = itemp->getPermissions();

View File

@@ -617,7 +617,7 @@ void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id )
buildLandmarkIDLists();
BOOL found = FALSE;
S32 idx;
U32 idx;
for (idx = 0; idx < mLandmarkItemIDList.size(); idx++)
{
if ( mLandmarkItemIDList.at(idx) == landmark_item_id)

View File

@@ -195,7 +195,7 @@ void LLFrameStats::dump()
fprintf(fp, "Time\tNumTriangles\t");
S32 i;
U32 i;
for (i = 0; i < NUM_STATS; i++)
{
fprintf(fp, "%s\t", sStatLabels[i].c_str());

View File

@@ -66,7 +66,7 @@ static LLFastTimer::DeclareTimer FTM_HUD_EFFECTS("Hud Effects");
void LLHUDManager::updateEffects()
{
LLFastTimer ftm(FTM_HUD_EFFECTS);
S32 i;
U32 i;
for (i = 0; i < mHUDEffects.size(); i++)
{
LLHUDEffect *hep = mHUDEffects[i];
@@ -141,7 +141,7 @@ void LLHUDManager::shutdownClass()
void LLHUDManager::cleanupEffects()
{
S32 i = 0;
U32 i = 0;
while (i < mHUDEffects.size())
{
@@ -194,7 +194,7 @@ void LLHUDManager::processViewerEffect(LLMessageSystem *mesgsys, void **user_dat
{
effectp = NULL;
LLHUDEffect::getIDType(mesgsys, k, effect_id, effect_type);
S32 i;
U32 i;
for (i = 0; i < LLHUDManager::getInstance()->mHUDEffects.size(); i++)
{
LLHUDEffect *cur_effectp = LLHUDManager::getInstance()->mHUDEffects[i];

View File

@@ -318,8 +318,8 @@ void LLInvFVBridge::removeBatch(std::vector<LLFolderViewEventListener*>& batch)
LLViewerInventoryCategory* cat = NULL;
LLInventoryModel::cat_array_t descendent_categories;
LLInventoryModel::item_array_t descendent_items;
S32 count = batch.size();
S32 i,j;
U32 count = batch.size();
U32 i,j;
for(i = 0; i < count; ++i)
{
bridge = (LLInvFVBridge*)(batch.at(i));
@@ -2319,7 +2319,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.size(); ++i)
for (U32 i=0; i < descendent_categories.size(); ++i)
{
LLInventoryCategory* category = descendent_categories[i];
if(LLFolderType::lookupIsProtectedType(category->getPreferredType()))
@@ -2354,7 +2354,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
}
if (is_movable && move_is_into_trash)
{
for (S32 i=0; i < descendent_items.size(); ++i)
for (U32 i=0; i < descendent_items.size(); ++i)
{
LLInventoryItem* item = descendent_items[i];
if (get_is_item_worn(item->getUUID()))
@@ -2366,7 +2366,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
}
if (is_movable && move_is_into_landmarks)
{
for (S32 i=0; i < descendent_items.size(); ++i)
for (U32 i=0; i < descendent_items.size(); ++i)
{
LLViewerInventoryItem* item = descendent_items[i];
@@ -2482,7 +2482,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.size(); i++)
for (U32 i=0; i < descendent_items.size(); i++)
{
LLInventoryItem* item = descendent_items[i];
if (item->getType() == LLAssetType::AT_GESTURE

View File

@@ -2303,9 +2303,9 @@ 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.size();
S32 i;
S32 lost = 0;
U32 count = cats.size();
U32 i;
U32 lost = 0;
cat_array_t lost_cats;
for(i = 0; i < count; ++i)
{
@@ -3745,7 +3745,7 @@ bool LLInventoryModel::validate() const
{
item_lock++;
}
for (S32 i = 0; i<items->size(); i++)
for (U32 i = 0; i<items->size(); i++)
{
LLViewerInventoryItem *item = items->at(i);
@@ -3823,7 +3823,7 @@ bool LLInventoryModel::validate() const
else
{
bool found = false;
for (S32 i = 0; i<cats->size(); i++)
for (U32 i = 0; i<cats->size(); i++)
{
LLViewerInventoryCategory *kid_cat = cats->at(i);
if (kid_cat == cat)
@@ -3869,7 +3869,7 @@ bool LLInventoryModel::validate() const
else
{
bool found = false;
for (S32 i=0; i<items->size(); ++i)
for (U32 i=0; i<items->size(); ++i)
{
if (items->at(i) == item)
{

View File

@@ -407,7 +407,7 @@ const LLUUID& LLPanelObject::findItemID(const LLUUID& asset_id)
if (items.size())
{
// search for copyable version first
for (S32 i = 0; i < items.size(); i++)
for (U32 i = 0; i < items.size(); i++)
{
LLInventoryItem* itemp = items[i];
LLPermissions item_permissions = itemp->getPermissions();

View File

@@ -1882,7 +1882,7 @@ void LLPanelObjectInventory::createViewsForCategory(LLInventoryObject::object_li
}
// now, for each category, do the second pass
for(S32 i = 0; i < child_categories.size(); i++)
for(U32 i = 0; i < child_categories.size(); i++)
{
createViewsForCategory(inventory, child_categories[i]->first,
child_categories[i]->second );

View File

@@ -92,7 +92,7 @@ bool is_asset_exportable(const LLUUID& asset_id)
LLAssetIDMatches asset_id_matches(asset_id);
gInventory.collectDescendentsIf(LLUUID::null, cats, items, true, asset_id_matches, false);
for (int i = 0; i < items.size(); ++i)
for (U32 i = 0; i < items.size(); ++i)
{
if (perms_allow_export(items[i]->getPermissions())) return true;
}

View File

@@ -754,7 +754,7 @@ const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, BOOL co
if (items.size())
{
// search for copyable version first
for (S32 i = 0; i < items.size(); i++)
for (U32 i = 0; i < items.size(); i++)
{
LLInventoryItem* itemp = items[i];
LLPermissions item_permissions = itemp->getPermissions();

View File

@@ -1932,7 +1932,7 @@ void remove_folder_contents(const LLUUID& category, bool keep_outfit_links,
LLInventoryModel::item_array_t items;
gInventory.collectDescendents(category, cats, items,
LLInventoryModel::EXCLUDE_TRASH);
for (S32 i = 0; i < items.size(); ++i)
for (U32 i = 0; i < items.size(); ++i)
{
LLViewerInventoryItem *item = items.at(i);
if (keep_outfit_links && (item->getActualType() == LLAssetType::AT_LINK_FOLDER))

View File

@@ -4513,7 +4513,7 @@ static void derez_objects(
msg->addU8Fast(_PREHASH_PacketCount, packet_count);
msg->addU8Fast(_PREHASH_PacketNumber, packet_number);
objects_in_packet = 0;
while((object_index < objectsp->size())
while((object_index < (S32)objectsp->size())
&& (objects_in_packet++ < MAX_ROOTS_PER_PACKET))
{

View File

@@ -46,7 +46,7 @@ LLVLManager gVLManager;
LLVLManager::~LLVLManager()
{
S32 i;
U32 i;
for (i = 0; i < mPacketData.size(); i++)
{
delete mPacketData[i];
@@ -95,7 +95,7 @@ void LLVLManager::unpackData(const S32 num_packets)
{
static LLFrameTimer decode_timer;
S32 i;
U32 i;
for (i = 0; i < mPacketData.size(); i++)
{
LLVLData *datap = mPacketData[i];
@@ -163,7 +163,7 @@ S32 LLVLManager::getTotalBytes() const
void LLVLManager::cleanupData(LLViewerRegion *regionp)
{
S32 cur = 0;
U32 cur = 0;
while (cur < mPacketData.size())
{
if (mPacketData[cur]->mRegionp == regionp)

View File

@@ -2648,7 +2648,7 @@ BOOL LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const
if (items.size())
{
// search for full permissions version
for (S32 i = 0; i < items.size(); i++)
for (U32 i = 0; i < items.size(); i++)
{
LLViewerInventoryItem* itemp = items[i];
if (itemp->getIsFullPerm())

View File

@@ -135,7 +135,7 @@ void AIFetchInventoryFolder::multiplex_impl(state_type run_state)
// Look up UUID by name.
LLInventoryModel::cat_array_t* categories;
gInventory.getDirectDescendentsOf(mParentFolder, categories);
for (S32 i = 0; i < categories->size(); ++i)
for (U32 i = 0; i < categories->size(); ++i)
{
LLPointer<LLViewerInventoryCategory> const& category(categories->at(i));
if (category->getName() == mFolderName)