Eliminate W4 warning. Add assert.

This commit is contained in:
castano 2008-01-17 20:40:40 +00:00
parent 593cce308a
commit ac0cb61927

View File

@ -1098,7 +1098,7 @@ static uint computeAlphaIndices(const ColorBlock & rgba, AlphaBlockDXT5 * block)
uint8 alpha = rgba.color(i).a;
uint besterror = 256*256;
uint best;
uint best = 8;
for(uint p = 0; p < 8; p++)
{
int d = alphas[p] - alpha;
@ -1110,6 +1110,7 @@ static uint computeAlphaIndices(const ColorBlock & rgba, AlphaBlockDXT5 * block)
best = p;
}
}
nvDebugCheck(best < 8);
totalError += besterror;
block->setIndex(i, best);