mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2025-01-08 05:55:35 +00:00
Fix more compiler warnings
This commit is contained in:
parent
c7a2e24b07
commit
8c666bcd3f
|
@ -187,9 +187,9 @@ private:
|
|||
}
|
||||
else {
|
||||
return (
|
||||
(maskSeed >> (24 + m_Attributes->colorChannelPrecision - 1) & 0xFF) |
|
||||
((maskSeed >> (24 + m_Attributes->colorChannelPrecision - 1) & 0xFF) |
|
||||
(maskSeed >> (16 + m_Attributes->colorChannelPrecision - 1) & 0xFF00) |
|
||||
(maskSeed >> (8 + m_Attributes->colorChannelPrecision - 1) & 0xFF0000) &
|
||||
(maskSeed >> (8 + m_Attributes->colorChannelPrecision - 1) & 0xFF0000)) &
|
||||
(0x00FFFFFF)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -601,8 +601,11 @@ static inline float frand() {
|
|||
// repeat the most significant bits of r in
|
||||
// the least significant of the mantissa
|
||||
const uint32 m = (r << 8) | (r >> 7);
|
||||
const uint32 flt = (127 << 23) | m;
|
||||
return *(reinterpret_cast<const float *>(&flt)) - 1.0f;
|
||||
const union {
|
||||
uint32 fltAsInt;
|
||||
float flt;
|
||||
} fltUnion = { (127 << 23) | m };
|
||||
return fltUnion.flt - 1.0;
|
||||
}
|
||||
|
||||
bool BC7CompressionMode::AcceptNewEndpointError(double newError, double oldError, float temp) const {
|
||||
|
@ -664,7 +667,7 @@ double BC7CompressionMode::OptimizeEndpointsForCluster(const RGBACluster &cluste
|
|||
|
||||
int indices[kMaxNumDataPoints];
|
||||
RGBAVector np1, np2;
|
||||
int nPbitCombo;
|
||||
int nPbitCombo = 0;
|
||||
|
||||
PickBestNeighboringEndpoints(cluster, p1, p2, curPbitCombo, np1, np2, nPbitCombo, visitedStates, lastVisitedState);
|
||||
|
||||
|
|
|
@ -360,7 +360,6 @@ void RGBACluster::GetPrincipalAxis(RGBADir &axis) {
|
|||
return;
|
||||
}
|
||||
|
||||
RGBAVector avg = m_Total / float(m_NumPoints);
|
||||
m_PowerMethodIterations = ::GetPrincipalAxis(
|
||||
m_NumPoints,
|
||||
m_DataPoints,
|
||||
|
|
|
@ -96,9 +96,9 @@ public:
|
|||
{ }
|
||||
|
||||
RGBAVector(float _r, float _g, float _b, float _a) :
|
||||
r(_r), g(_g), b(_b), a(_a) { }
|
||||
r(_r), g(_g), b(_b), a(_a), idx(0) { }
|
||||
|
||||
explicit RGBAVector(float cc) : r(cc), g(cc), b(cc), a(cc) { }
|
||||
explicit RGBAVector(float cc) : r(cc), g(cc), b(cc), a(cc), idx(0) { }
|
||||
|
||||
RGBAVector &operator =(const RGBAVector &other) {
|
||||
this->idx = other.idx;
|
||||
|
|
|
@ -105,9 +105,9 @@ void BlockStat::ToString(CHAR *buf, int bufSz) const {
|
|||
|
||||
case BlockStat::eType_Int:
|
||||
#ifdef _MSC_VER
|
||||
_sntprintf_s(buf, bufSz, _TRUNCATE, "%s,%llu", m_StatName, m_IntStat);
|
||||
_sntprintf_s(buf, bufSz, _TRUNCATE, "%s,%lu", m_StatName, m_IntStat);
|
||||
#else
|
||||
snprintf(buf, bufSz, "%s,%llu", m_StatName, m_IntStat);
|
||||
snprintf(buf, bufSz, "%s,%lu", m_StatName, m_IntStat);
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
|
|
@ -67,6 +67,7 @@ StopWatch &StopWatch::operator=(const StopWatch &other) {
|
|||
}
|
||||
impl = new StopWatchImpl();
|
||||
memcpy(impl, other.impl, sizeof(StopWatchImpl));
|
||||
return *this;
|
||||
}
|
||||
|
||||
StopWatch::~StopWatch() {
|
||||
|
|
Loading…
Reference in a new issue