summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/llsimdtypes.h4
-rw-r--r--indra/llmath/llsphere.cpp2
-rw-r--r--indra/llmath/lltreenode.h2
-rw-r--r--indra/llmath/llvector4a.h2
-rw-r--r--indra/llmath/llvector4logical.h2
-rw-r--r--indra/llmath/llvolume.cpp18
-rw-r--r--indra/llmath/llvolume.h2
7 files changed, 16 insertions, 16 deletions
diff --git a/indra/llmath/llsimdtypes.h b/indra/llmath/llsimdtypes.h
index 9db152adf8..11462170fb 100644
--- a/indra/llmath/llsimdtypes.h
+++ b/indra/llmath/llsimdtypes.h
@@ -60,7 +60,7 @@ public:
inline operator bool() const { return static_cast<const bool&>(m_bool); }
private:
- int m_bool;
+ int m_bool{ 0 };
};
#if LL_WINDOWS
@@ -118,7 +118,7 @@ public:
}
private:
- LLQuad mQ;
+ LLQuad mQ{};
};
#endif //LL_SIMD_TYPES_H
diff --git a/indra/llmath/llsphere.cpp b/indra/llmath/llsphere.cpp
index 89349af6c8..5f48764455 100644
--- a/indra/llmath/llsphere.cpp
+++ b/indra/llmath/llsphere.cpp
@@ -185,7 +185,7 @@ LLSphere LLSphere::getBoundingSphere(const std::vector<LLSphere>& sphere_list)
// TODO -- improve the accuracy for small collections of spheres
LLSphere bounding_sphere( LLVector3(0.f, 0.f, 0.f), 0.f );
- S32 sphere_count = sphere_list.size();
+ auto sphere_count = sphere_list.size();
if (1 == sphere_count)
{
// trivial case -- single sphere
diff --git a/indra/llmath/lltreenode.h b/indra/llmath/lltreenode.h
index f648a114ca..e3d30206b7 100644
--- a/indra/llmath/lltreenode.h
+++ b/indra/llmath/lltreenode.h
@@ -57,7 +57,7 @@ public:
virtual bool remove(T* data);
virtual void notifyRemoval(T* data);
virtual U32 hasListeners() const { return !mListeners.empty(); }
- virtual U32 getListenerCount() const { return mListeners.size(); }
+ virtual U32 getListenerCount() const { return static_cast<U32>(mListeners.size()); }
virtual LLTreeListener<T>* getListener(U32 index) const
{
if (index < mListeners.size())
diff --git a/indra/llmath/llvector4a.h b/indra/llmath/llvector4a.h
index 8f0ee4b739..ea80b33e2d 100644
--- a/indra/llmath/llvector4a.h
+++ b/indra/llmath/llvector4a.h
@@ -322,7 +322,7 @@ public:
inline operator LLQuad() const;
private:
- LLQuad mQ;
+ LLQuad mQ{};
};
inline void update_min_max(LLVector4a& min, LLVector4a& max, const LLVector4a& p)
diff --git a/indra/llmath/llvector4logical.h b/indra/llmath/llvector4logical.h
index d08b5513d9..70759eef5c 100644
--- a/indra/llmath/llvector4logical.h
+++ b/indra/llmath/llvector4logical.h
@@ -120,7 +120,7 @@ public:
private:
- LLQuad mQ;
+ LLQuad mQ{};
};
#endif //LL_VECTOR4ALOGICAL_H
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index e6001626f3..b6f710f979 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -2392,7 +2392,7 @@ bool LLVolume::unpackVolumeFaces(U8* in_data, S32 size)
bool LLVolume::unpackVolumeFacesInternal(const LLSD& mdl)
{
{
- U32 face_count = mdl.size();
+ auto face_count = mdl.size();
if (face_count == 0)
{ //no faces unpacked, treat as failed decode
@@ -2424,7 +2424,7 @@ bool LLVolume::unpackVolumeFacesInternal(const LLSD& mdl)
LLSD::Binary idx = mdl[i]["TriangleList"];
//copy out indices
- S32 num_indices = idx.size() / 2;
+ auto num_indices = idx.size() / 2;
const S32 indices_to_discard = num_indices % 3;
if (indices_to_discard > 0)
{
@@ -2432,7 +2432,7 @@ bool LLVolume::unpackVolumeFacesInternal(const LLSD& mdl)
LL_WARNS() << "Incomplete triangle discarded from face! Indices count " << num_indices << " was not divisible by 3. face index: " << i << " Total: " << face_count << LL_ENDL;
num_indices -= indices_to_discard;
}
- face.resizeIndices(num_indices);
+ face.resizeIndices(static_cast<S32>(num_indices));
if (num_indices > 2 && !face.mIndices)
{
@@ -2453,7 +2453,7 @@ bool LLVolume::unpackVolumeFacesInternal(const LLSD& mdl)
}
//copy out vertices
- U32 num_verts = pos.size()/(3*2);
+ U32 num_verts = static_cast<U32>(pos.size())/(3*2);
face.resizeVertices(num_verts);
if (num_verts > 0 && !face.mPositions)
@@ -5015,13 +5015,13 @@ void LLVolumeFace::remap()
{
// Generate a remap buffer
std::vector<unsigned int> remap(mNumVertices);
- S32 remap_vertices_count = LLMeshOptimizer::generateRemapMultiU16(&remap[0],
+ S32 remap_vertices_count = static_cast<S32>(LLMeshOptimizer::generateRemapMultiU16(&remap[0],
mIndices,
mNumIndices,
mPositions,
mNormals,
mTexCoords,
- mNumVertices);
+ mNumVertices));
// Allocate new buffers
S32 size = ((mNumIndices * sizeof(U16)) + 0xF) & ~0xF;
@@ -5565,7 +5565,7 @@ bool LLVolumeFace::cacheOptimize(bool gen_tangents)
U32 stream_count = data.w.empty() ? 4 : 5;
- size_t vert_count = meshopt_generateVertexRemapMulti(&remap[0], nullptr, data.p.size(), data.p.size(), mos, stream_count);
+ S32 vert_count = static_cast<S32>(meshopt_generateVertexRemapMulti(&remap[0], nullptr, data.p.size(), data.p.size(), mos, stream_count));
if (vert_count < 65535 && vert_count != 0)
{
@@ -6648,8 +6648,8 @@ void LLVolumeFace::pushIndex(const U16& idx)
void LLVolumeFace::fillFromLegacyData(std::vector<LLVolumeFace::VertexData>& v, std::vector<U16>& idx)
{
- resizeVertices(v.size());
- resizeIndices(idx.size());
+ resizeVertices(static_cast<S32>(v.size()));
+ resizeIndices(static_cast<S32>(idx.size()));
for (U32 i = 0; i < v.size(); ++i)
{
diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h
index 44a24f8496..e812e5f0cc 100644
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -1019,7 +1019,7 @@ public:
U8 getProfileType() const { return mParams.getProfileParams().getCurveType(); }
U8 getPathType() const { return mParams.getPathParams().getCurveType(); }
S32 getNumFaces() const;
- S32 getNumVolumeFaces() const { return mVolumeFaces.size(); }
+ S32 getNumVolumeFaces() const { return static_cast<S32>(mVolumeFaces.size()); }
F32 getDetail() const { return mDetail; }
F32 getSurfaceArea() const { return mSurfaceArea; }
const LLVolumeParams& getParams() const { return mParams; }