mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2024-11-27 22:34:16 +01:00
Fix some small bugs and compiler warnings
This commit is contained in:
parent
325a2ac96d
commit
a263907e0f
@ -1123,8 +1123,6 @@ double CompressionMode::CompressCluster(
|
|||||||
assert(pBitCombo == bestPbitCombo);
|
assert(pBitCombo == bestPbitCombo);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
assert(bestPbitCombo >= 0);
|
|
||||||
|
|
||||||
return OptimizeEndpointsForCluster(
|
return OptimizeEndpointsForCluster(
|
||||||
cluster, p1, p2, bestIndices, bestPbitCombo
|
cluster, p1, p2, bestIndices, bestPbitCombo
|
||||||
);
|
);
|
||||||
|
@ -338,7 +338,6 @@ double RGBACluster::QuantizedError(
|
|||||||
|
|
||||||
totalError += minError;
|
totalError += minError;
|
||||||
|
|
||||||
assert(bestBucket >= 0);
|
|
||||||
if(indices) indices[i] = bestBucket;
|
if(indices) indices[i] = bestBucket;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ class RGBAVector : public FasTC::Vector4<float> {
|
|||||||
typedef FasTC::Vector4<float> BaseVector;
|
typedef FasTC::Vector4<float> BaseVector;
|
||||||
public:
|
public:
|
||||||
uint32 GetIdx() const { return m_Idx; }
|
uint32 GetIdx() const { return m_Idx; }
|
||||||
RGBAVector() : BaseVector(-1.0, -1.0, -1.0, -1.0) { }
|
RGBAVector() : BaseVector(-1.0, -1.0, -1.0, -1.0), m_Idx(0) { }
|
||||||
RGBAVector(uint32 idx, uint32 pixel) :
|
RGBAVector(uint32 idx, uint32 pixel) :
|
||||||
BaseVector(
|
BaseVector(
|
||||||
static_cast<float>(pixel & 0xFF),
|
static_cast<float>(pixel & 0xFF),
|
||||||
|
@ -101,6 +101,10 @@ void ExtractBasename(const char *filename, char *buf, size_t bufSz) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!base) {
|
||||||
|
base = end;
|
||||||
|
}
|
||||||
|
|
||||||
size_t numChars = ext - base + 1;
|
size_t numChars = ext - base + 1;
|
||||||
size_t toCopy = ::std::min(numChars, bufSz);
|
size_t toCopy = ::std::min(numChars, bufSz);
|
||||||
memcpy(buf, base, toCopy);
|
memcpy(buf, base, toCopy);
|
||||||
|
@ -146,10 +146,8 @@ namespace PVRTCC {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Block::SetLerpValue(uint32 texelIdx, uint8 lerpVal) {
|
void Block::SetLerpValue(uint32 texelIdx, uint8 lerpVal) {
|
||||||
assert(texelIdx >= 0);
|
|
||||||
assert(texelIdx <= 15);
|
assert(texelIdx <= 15);
|
||||||
|
|
||||||
assert(lerpVal >= 0);
|
|
||||||
assert(lerpVal < 4);
|
assert(lerpVal < 4);
|
||||||
|
|
||||||
m_LongData &= ~(static_cast<uint64>(0x3) << (texelIdx * 2));
|
m_LongData &= ~(static_cast<uint64>(0x3) << (texelIdx * 2));
|
||||||
|
Loading…
Reference in New Issue
Block a user