Initial support for the Clang compiler and numerous warning fixes

This commit is contained in:
Drake Arconis
2012-07-02 19:45:41 +00:00
parent 5f98e24efe
commit ece9dda7b4
17 changed files with 169 additions and 116 deletions

View File

@@ -2896,7 +2896,7 @@ void LLAgentCamera::lookAtObject(const LLUUID &object_id, bool self)
BOOL LLAgentCamera::setPointAt(EPointAtType target_type, LLViewerObject *object, LLVector3 position)
{
// disallow pointing at attachments and avatars
if (object && (object->isAttachment() || object->isAvatar()) || gSavedSettings.getBOOL("DisablePointAtAndBeam"))
if ((object && (object->isAttachment() || object->isAvatar())) || gSavedSettings.getBOOL("DisablePointAtAndBeam"))
{
return FALSE;
}

View File

@@ -3428,7 +3428,7 @@ bool LLAppearanceMgr::moveWearable(LLViewerInventoryItem* item, bool closer_to_b
//to cause appearance of the agent to be updated
bool result = false;
if (result = gAgentWearables.moveWearable(item, closer_to_body))
if ((result = gAgentWearables.moveWearable(item, closer_to_body)))
{
gAgentAvatarp->wearableUpdated(item->getWearableType(), FALSE);
}

View File

@@ -1436,7 +1436,7 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
{
if (avatar->isSelf() && !gAgent.needsRenderAvatar() || !gMeshRepo.meshRezEnabled())
if ((avatar->isSelf() && !gAgent.needsRenderAvatar()) || !gMeshRepo.meshRezEnabled())
{
return;
}

View File

@@ -424,7 +424,7 @@ void LLInventoryFilter::setFilterSubString(const std::string& string)
if (mFilterOps.mFilterTypes == FILTERTYPE_UUID)
{
mFilterOps.mFilterTypes &= ~FILTERTYPE_UUID;
mFilterOps.mFilterUUID == LLUUID::null;
//mFilterOps.mFilterUUID == LLUUID::null;
setModified(FILTER_RESTART);
}
@@ -519,8 +519,8 @@ void LLInventoryFilter::setHoursAgo(U32 hours)
bool is_increasing_from_zero = is_increasing && !mFilterOps.mHoursAgo;
// *NOTE: need to cache last filter time, in case filter goes stale
BOOL less_restrictive = (are_date_limits_valid && ((is_increasing && mFilterOps.mHoursAgo)) || !hours);
BOOL more_restrictive = (are_date_limits_valid && (!is_increasing && hours) || is_increasing_from_zero);
BOOL less_restrictive = ((are_date_limits_valid && ((is_increasing && mFilterOps.mHoursAgo))) || !hours);
BOOL more_restrictive = ((are_date_limits_valid && (!is_increasing && hours)) || is_increasing_from_zero);
mFilterOps.mHoursAgo = hours;
mFilterOps.mMinDate = time_min();

View File

@@ -478,10 +478,10 @@ void LLPanelObject::getState( )
}
// can move or rotate only linked group with move permissions, or sub-object with move and modify perms
BOOL enable_move = objectp->permMove() && (!objectp->isAttachment() && objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts"));
BOOL enable_move = objectp->permMove() && ((!objectp->isAttachment() && objectp->permModify()) || !gSavedSettings.getBOOL("EditLinkedParts"));
BOOL enable_scale = objectp->permMove() && objectp->permModify();
BOOL enable_rotate = objectp->permMove() && ( (objectp->permModify() && !objectp->isAttachment()) || !gSavedSettings.getBOOL("EditLinkedParts"));
BOOL enable_link = objectp->permMove() && !objectp->isAttachment() && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts"));
BOOL enable_rotate = objectp->permMove() && ((objectp->permModify() && !objectp->isAttachment()) || !gSavedSettings.getBOOL("EditLinkedParts"));
BOOL enable_link = objectp->permMove() && ((!objectp->isAttachment() && objectp->permModify()) || !gSavedSettings.getBOOL("EditLinkedParts"));
childSetEnabled("build_math_constants",true);
S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
BOOL single_volume = (LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ))

View File

@@ -146,7 +146,7 @@ void LLPreviewSound::playAmbient( void* userdata )
if(item && gAudiop)
{
int gain = 0.01f;
F32 gain = 0.01f;
for(int i = 0; i < 2; i++)
{
gMessageSystem->newMessageFast(_PREHASH_SoundTrigger);

View File

@@ -675,7 +675,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
const LLPickInfo& pick = gViewerWindow->getHoverPick();
object = pick.getObject();
if ( (object) && (rlv_handler_t::isEnabled()) &&
( ((gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH))) && (!gRlvHandler.canTouch(object, pick.mObjectOffset)) ||
( (((gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH))) && (!gRlvHandler.canTouch(object, pick.mObjectOffset))) ||
((gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT)) && (!object->isHUDAttachment())) ) )
{
gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW);

View File

@@ -5332,7 +5332,7 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data)
if (object)
{
LLVector3 sit_spot = object->getPositionAgent() + (sitPosition * object->getRotation());
if (!use_autopilot || isAgentAvatarValid() && gAgentAvatarp->isSitting() && gAgentAvatarp->getRoot() == object->getRoot())
if (!use_autopilot || (isAgentAvatarValid() && gAgentAvatarp->isSitting() && gAgentAvatarp->getRoot() == object->getRoot()))
{
//we're already sitting on this object, so don't autopilot
}

View File

@@ -762,7 +762,7 @@ void LLViewerParcelMedia::filterMedia(LLParcel* parcel, U32 type)
if (media_url.empty())
{
media_action == "allow";
media_action = "allow";
}
else if (!sMediaFilterListLoaded || sDeniedMedia.count(domain) || sDeniedMedia.count(ip))
{

View File

@@ -3430,7 +3430,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
}
if (vobj->isMesh() &&
(vobj->getVolume() && !vobj->getVolume()->isMeshAssetLoaded() || !gMeshRepo.meshRezEnabled()))
((vobj->getVolume() && !vobj->getVolume()->isMeshAssetLoaded()) || !gMeshRepo.meshRezEnabled()))
{
continue;
}
@@ -4152,7 +4152,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
}
else
{ //resize pre-existing buffer
if (LLVertexBuffer::sEnableVBOs && buffer->getUsage() != buffer_usage ||
if ((LLVertexBuffer::sEnableVBOs && buffer->getUsage() != buffer_usage) ||
buffer->getTypeMask() != mask)
{
buffer = createVertexBuffer(mask, buffer_usage);