summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authorAnsariel <ansariel.hiller@phoenixviewer.com>2024-07-08 20:27:14 +0200
committerAnsariel <ansariel.hiller@phoenixviewer.com>2024-07-08 20:27:14 +0200
commit9fdca96f8bd2211a99fe88e57b70cbecefa20b6d (patch)
tree6b5d9b4310eb550c83fba23303bbbc77868af1a5 /indra/llmath
parent9ddf64c65183960ffed4fe61c5d85e8bacaea030 (diff)
Re-enable compiler warnings C4244 and C4396 except for lltracerecording.h and llunittype.h for now
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/llcalcparser.h2
-rw-r--r--indra/llmath/llquaternion.h8
-rw-r--r--indra/llmath/v3color.h8
-rw-r--r--indra/llmath/v4color.h8
-rw-r--r--indra/llmath/v4math.h8
5 files changed, 17 insertions, 17 deletions
diff --git a/indra/llmath/llcalcparser.h b/indra/llmath/llcalcparser.h
index e8fdcc9ae3..ea71752ebc 100644
--- a/indra/llmath/llcalcparser.h
+++ b/indra/llmath/llcalcparser.h
@@ -175,7 +175,7 @@ private:
F32 _exp(const F32& a) const { return exp(a); }
F32 _fabs(const F32& a) const { return fabs(a); }
F32 _floor(const F32& a) const { return (F32)llfloor(a); }
- F32 _ceil(const F32& a) const { return llceil(a); }
+ F32 _ceil(const F32& a) const { return (F32)llceil(a); }
F32 _atan2(const F32& a,const F32& b) const { return atan2(a,b); }
LLCalc::calc_map_t* mConstants;
diff --git a/indra/llmath/llquaternion.h b/indra/llmath/llquaternion.h
index 6136c59ed1..762d13eded 100644
--- a/indra/llmath/llquaternion.h
+++ b/indra/llmath/llquaternion.h
@@ -186,10 +186,10 @@ inline LLSD LLQuaternion::getValue() const
inline void LLQuaternion::setValue(const LLSD& sd)
{
- mQ[0] = sd[0].asReal();
- mQ[1] = sd[1].asReal();
- mQ[2] = sd[2].asReal();
- mQ[3] = sd[3].asReal();
+ mQ[0] = (F32)sd[0].asReal();
+ mQ[1] = (F32)sd[1].asReal();
+ mQ[2] = (F32)sd[2].asReal();
+ mQ[3] = (F32)sd[3].asReal();
}
// checker
diff --git a/indra/llmath/v3color.h b/indra/llmath/v3color.h
index 7b92f85a0c..821c17f03d 100644
--- a/indra/llmath/v3color.h
+++ b/indra/llmath/v3color.h
@@ -517,9 +517,9 @@ inline const LLVector3 linearColor3v(const T& a) {
template<typename T>
const LLColor3& LLColor3::set(const std::vector<T>& v)
{
- for (S32 i = 0; i < llmin((S32)v.size(), 3); ++i)
+ for (size_t i = 0; i < llmin(v.size(), 3); ++i)
{
- mV[i] = v[i];
+ mV[i] = (F32)v[i];
}
return *this;
@@ -530,9 +530,9 @@ const LLColor3& LLColor3::set(const std::vector<T>& v)
template<typename T>
void LLColor3::write(std::vector<T>& v) const
{
- for (int i = 0; i < llmin((S32)v.size(), 3); ++i)
+ for (size_t i = 0; i < llmin(v.size(), 3); ++i)
{
- v[i] = mV[i];
+ v[i] = (T)mV[i];
}
}
diff --git a/indra/llmath/v4color.h b/indra/llmath/v4color.h
index e9bb6a07ba..cafdbd9d7c 100644
--- a/indra/llmath/v4color.h
+++ b/indra/llmath/v4color.h
@@ -702,9 +702,9 @@ inline const LLColor4 linearColor4(const LLColor4 &a)
template<typename T>
const LLColor4& LLColor4::set(const std::vector<T>& v)
{
- for (S32 i = 0; i < llmin((S32)v.size(), 4); ++i)
+ for (size_t i = 0; i < llmin(v.size(), 4); ++i)
{
- mV[i] = v[i];
+ mV[i] = (F32)v[i];
}
return *this;
@@ -713,9 +713,9 @@ const LLColor4& LLColor4::set(const std::vector<T>& v)
template<typename T>
void LLColor4::write(std::vector<T>& v) const
{
- for (int i = 0; i < llmin((S32)v.size(), 4); ++i)
+ for (size_t i = 0; i < llmin(v.size(), 4); ++i)
{
- v[i] = mV[i];
+ v[i] = (T)mV[i];
}
}
diff --git a/indra/llmath/v4math.h b/indra/llmath/v4math.h
index 7ed22212d3..a5b6f506d7 100644
--- a/indra/llmath/v4math.h
+++ b/indra/llmath/v4math.h
@@ -67,10 +67,10 @@ class LLVector4
void setValue(const LLSD& sd)
{
- mV[0] = sd[0].asReal();
- mV[1] = sd[1].asReal();
- mV[2] = sd[2].asReal();
- mV[3] = sd[3].asReal();
+ mV[0] = (F32)sd[0].asReal();
+ mV[1] = (F32)sd[1].asReal();
+ mV[2] = (F32)sd[2].asReal();
+ mV[3] = (F32)sd[3].asReal();
}