Fix compile errors and warnings on linux after merging Shyotl.
This commit is contained in:
@@ -663,22 +663,28 @@ public:
|
||||
}
|
||||
|
||||
//======================Logic====================
|
||||
private:
|
||||
template<bool mins> inline void init_foos(LLMatrix4a& foos) const
|
||||
{
|
||||
static bool done(false);
|
||||
if (done) return;
|
||||
const LLVector4a delta(0.0001f);
|
||||
foos.setIdentity();
|
||||
foos.getRow<0>().sub(delta);
|
||||
foos.getRow<1>().sub(delta);
|
||||
foos.getRow<2>().sub(delta);
|
||||
foos.getRow<3>().sub(delta);
|
||||
done = true;
|
||||
}
|
||||
|
||||
public:
|
||||
inline bool isIdentity() const
|
||||
{
|
||||
static LLMatrix4a mins;
|
||||
static LLMatrix4a maxs;
|
||||
static LLVector4a delta(0.0001f);
|
||||
|
||||
static bool init_mins = ( mins.setIdentity(),
|
||||
mins.getRow<0>().sub(delta),
|
||||
mins.getRow<1>().sub(delta),
|
||||
mins.getRow<2>().sub(delta),
|
||||
mins.getRow<3>().sub(delta), true );
|
||||
static bool init_maxs = ( maxs.setIdentity(),
|
||||
maxs.getRow<0>().add(delta),
|
||||
maxs.getRow<1>().add(delta),
|
||||
maxs.getRow<2>().add(delta),
|
||||
maxs.getRow<3>().add(delta), true );
|
||||
init_foos<false>(mins);
|
||||
init_foos<true>(maxs);
|
||||
|
||||
LLVector4a mask1 = _mm_and_ps(_mm_cmpgt_ps(mMatrix[0],mins.getRow<0>()), _mm_cmplt_ps(mMatrix[0],maxs.getRow<0>()));
|
||||
LLVector4a mask2 = _mm_and_ps(_mm_cmpgt_ps(mMatrix[1],mins.getRow<1>()), _mm_cmplt_ps(mMatrix[1],maxs.getRow<1>()));
|
||||
|
||||
@@ -968,11 +968,11 @@ public:
|
||||
#ifdef LL_OCTREE_POOLS
|
||||
void* operator new(size_t size)
|
||||
{
|
||||
return getPool(size).malloc();
|
||||
return LLOctreeNode<T>::getPool(size).malloc();
|
||||
}
|
||||
void operator delete(void* ptr)
|
||||
{
|
||||
getPool(sizeof(LLOctreeNode<T>)).free(ptr);
|
||||
LLOctreeNode<T>::getPool(sizeof(LLOctreeNode<T>)).free(ptr);
|
||||
}
|
||||
#else
|
||||
void* operator new(size_t size)
|
||||
|
||||
@@ -301,7 +301,8 @@ void LLFacePool::removeFaceReference(LLFace *facep)
|
||||
if (idx != -1)
|
||||
{
|
||||
facep->setReferenceIndex(-1);
|
||||
std::vector<LLFace*>::iterator iter = vector_replace_with_last(mReferences, mReferences.begin() + idx);
|
||||
std::vector<LLFace*>::iterator face_it(mReferences.begin() + idx);
|
||||
std::vector<LLFace*>::iterator iter = vector_replace_with_last(mReferences, face_it);
|
||||
if(iter != mReferences.end())
|
||||
(*iter)->setReferenceIndex(idx);
|
||||
}
|
||||
|
||||
@@ -80,10 +80,12 @@ LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectD
|
||||
|
||||
LLVolumeImplFlexible::~LLVolumeImplFlexible()
|
||||
{
|
||||
std::vector<LLVolumeImplFlexible*>::iterator iter = vector_replace_with_last(sInstanceList, sInstanceList.begin() + mInstanceIndex);
|
||||
std::vector<LLVolumeImplFlexible*>::iterator flex_it(sInstanceList.begin() + mInstanceIndex);
|
||||
std::vector<LLVolumeImplFlexible*>::iterator iter = vector_replace_with_last(sInstanceList, flex_it);
|
||||
if(iter != sInstanceList.end())
|
||||
(*iter)->mInstanceIndex = mInstanceIndex;
|
||||
vector_replace_with_last(sUpdateDelay,sUpdateDelay.begin() + mInstanceIndex);
|
||||
std::vector<U32>::iterator update_it(sUpdateDelay.begin() + mInstanceIndex);
|
||||
vector_replace_with_last(sUpdateDelay, update_it);
|
||||
}
|
||||
|
||||
//static
|
||||
|
||||
@@ -39,10 +39,10 @@ class LLViewerObject;
|
||||
|
||||
// This rotation matrix moves the default OpenGL reference frame
|
||||
// (-Z at, Y up) to Cory's favorite reference frame (X at, Z up)
|
||||
static LL_ALIGN_16(const LLMatrix4a OGL_TO_CFR_ROTATION(LLVector4a( 0.f, 0.f, -1.f, 0.f), // -Z becomes X
|
||||
static LL_ALIGN_16(const LLMatrix4a) OGL_TO_CFR_ROTATION(LLVector4a( 0.f, 0.f, -1.f, 0.f), // -Z becomes X
|
||||
LLVector4a(-1.f, 0.f, 0.f, 0.f), // -X becomes Y
|
||||
LLVector4a( 0.f, 1.f, 0.f, 0.f), // Y becomes Z
|
||||
LLVector4a( 0.f, 0.f, 0.f, 1.f) ));
|
||||
LLVector4a( 0.f, 0.f, 0.f, 1.f) );
|
||||
|
||||
const BOOL FOR_SELECTION = TRUE;
|
||||
const BOOL NOT_FOR_SELECTION = FALSE;
|
||||
|
||||
@@ -1459,7 +1459,8 @@ void LLViewerObjectList::removeFromActiveList(LLViewerObject* objectp)
|
||||
|
||||
objectp->setListIndex(-1);
|
||||
|
||||
std::vector<LLPointer<LLViewerObject> >::iterator iter = vector_replace_with_last(mActiveObjects,mActiveObjects.begin() + idx);
|
||||
std::vector<LLPointer<LLViewerObject> >::iterator it(mActiveObjects.begin() + idx);
|
||||
std::vector<LLPointer<LLViewerObject> >::iterator iter = vector_replace_with_last(mActiveObjects, it);
|
||||
if(iter != mActiveObjects.end())
|
||||
(*iter)->setListIndex(idx);
|
||||
|
||||
|
||||
@@ -406,7 +406,8 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt)
|
||||
// Kill dead particles (either flagged dead, or too old)
|
||||
if ((part->mLastUpdateTime > part->mMaxAge) || (LLViewerPart::LL_PART_DEAD_MASK == part->mFlags))
|
||||
{
|
||||
vector_replace_with_last(mParticles,mParticles.begin() + i);
|
||||
part_list_t::iterator it(mParticles.begin() + i);
|
||||
vector_replace_with_last(mParticles, it);
|
||||
delete part ;
|
||||
}
|
||||
else
|
||||
@@ -416,7 +417,8 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt)
|
||||
{
|
||||
// Transfer particles between groups
|
||||
LLViewerPartSim::getInstance()->put(part) ;
|
||||
vector_replace_with_last(mParticles,mParticles.begin() + i);
|
||||
part_list_t::iterator it(mParticles.begin() + i);
|
||||
vector_replace_with_last(mParticles, it);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -721,8 +723,9 @@ void LLViewerPartSim::updateSimulation()
|
||||
|
||||
if (mViewerPartSources[i]->isDead())
|
||||
{
|
||||
vector_replace_with_last(mViewerPartSources,mViewerPartSources.begin() + i);
|
||||
//mViewerPartSources.erase(mViewerPartSources.begin() + i);
|
||||
source_list_t::iterator it(mViewerPartSources.begin() + i);
|
||||
vector_replace_with_last(mViewerPartSources, it);
|
||||
//mViewerPartSources.erase(it);
|
||||
count--;
|
||||
}
|
||||
else
|
||||
@@ -758,8 +761,9 @@ void LLViewerPartSim::updateSimulation()
|
||||
if (!mViewerPartGroups[i]->getCount())
|
||||
{
|
||||
delete mViewerPartGroups[i];
|
||||
vector_replace_with_last(mViewerPartGroups,mViewerPartGroups.begin() + i);
|
||||
//mViewerPartGroups.erase(mViewerPartGroups.begin() + i);
|
||||
group_list_t::iterator it(mViewerPartGroups.begin() + i);
|
||||
vector_replace_with_last(mViewerPartGroups, it);
|
||||
//mViewerPartGroups.erase(it);
|
||||
i--;
|
||||
count--;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,8 @@ LLViewerTextureAnim::LLViewerTextureAnim(LLVOVolume* vobj) : LLTextureAnim()
|
||||
|
||||
LLViewerTextureAnim::~LLViewerTextureAnim()
|
||||
{
|
||||
std::vector<LLViewerTextureAnim*>::iterator iter = vector_replace_with_last(sInstanceList, sInstanceList.begin() + mInstanceIndex);
|
||||
std::vector<LLViewerTextureAnim*>::iterator it(sInstanceList.begin() + mInstanceIndex);
|
||||
std::vector<LLViewerTextureAnim*>::iterator iter = vector_replace_with_last(sInstanceList, it);
|
||||
if(iter != sInstanceList.end())
|
||||
(*iter)->mInstanceIndex = mInstanceIndex;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user