Fix vc8 warnings.
This commit is contained in:
parent
36ee0aee8d
commit
44e6560111
@ -25,10 +25,9 @@
|
|||||||
#define NV_IMAGE_PIXELFORMAT_H
|
#define NV_IMAGE_PIXELFORMAT_H
|
||||||
|
|
||||||
|
|
||||||
#include <nvimage.h>
|
#include <nvimage/nvimage.h>
|
||||||
|
|
||||||
|
|
||||||
// @@ Move this code to format conversion!!
|
|
||||||
namespace nv
|
namespace nv
|
||||||
{
|
{
|
||||||
namespace PixelFormat
|
namespace PixelFormat
|
||||||
|
@ -116,7 +116,7 @@ void nv::compressRGB(const Image * image, const OutputOptions & outputOptions, c
|
|||||||
c |= PixelFormat::convert(src[x].a, 8, asize) << ashift;
|
c |= PixelFormat::convert(src[x].a, 8, asize) << ashift;
|
||||||
|
|
||||||
// Output one byte at a time. @@ Not tested... Does this work on LE and BE?
|
// Output one byte at a time. @@ Not tested... Does this work on LE and BE?
|
||||||
for (int i = 0; i < byteCount; i++)
|
for (uint i = 0; i < byteCount; i++)
|
||||||
{
|
{
|
||||||
*(dst + x * byteCount) = (c >> (i * 8)) & 0xFF;
|
*(dst + x * byteCount) = (c >> (i * 8)) & 0xFF;
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ inline static void findMinMaxColorsBox(const Vector3 * block, uint num, Vector3
|
|||||||
*maxColor = Vector3(0, 0, 0);
|
*maxColor = Vector3(0, 0, 0);
|
||||||
*minColor = Vector3(255, 255, 255);
|
*minColor = Vector3(255, 255, 255);
|
||||||
|
|
||||||
for (int i = 0; i < num; i++)
|
for (uint i = 0; i < num; i++)
|
||||||
{
|
{
|
||||||
*maxColor = max(*maxColor, block[i]);
|
*maxColor = max(*maxColor, block[i]);
|
||||||
*minColor = min(*minColor, block[i]);
|
*minColor = min(*minColor, block[i]);
|
||||||
@ -79,7 +79,7 @@ inline static void selectDiagonal(const Vector3 * block, uint num, Vector3 * __r
|
|||||||
Vector3 center = (*maxColor + *minColor) * 0.5;
|
Vector3 center = (*maxColor + *minColor) * 0.5;
|
||||||
|
|
||||||
Vector2 covariance = Vector2(zero);
|
Vector2 covariance = Vector2(zero);
|
||||||
for (int i = 0; i < num; i++)
|
for (uint i = 0; i < num; i++)
|
||||||
{
|
{
|
||||||
Vector3 t = block[i] - center;
|
Vector3 t = block[i] - center;
|
||||||
covariance += t.xy() * t.z();
|
covariance += t.xy() * t.z();
|
||||||
|
Loading…
Reference in New Issue
Block a user