- fixed warnings when compiling in vc++

This commit is contained in:
Mark Vejvoda 2010-10-30 00:14:15 +00:00
parent 13c4deb5b6
commit 369a0dc215
2 changed files with 8 additions and 8 deletions

View File

@ -261,7 +261,7 @@ static std::vector<int> getSupportCompressedTextureFormats() {
if(Texture::useTextureCompression == true) { if(Texture::useTextureCompression == true) {
printf("------------------------------------------------\n"); printf("------------------------------------------------\n");
printf("**** getSupportCompressedTextureFormats() result.size() = %d, count = %d\n",(int)result.size(),count); printf("**** getSupportCompressedTextureFormats() result.size() = %d, count = %d\n",(int)result.size(),count);
for(int i = 0; i < result.size(); ++i) { for(unsigned int i = 0; i < result.size(); ++i) {
printf("Texture Compression #i = %d, result[i] = %d [%s]\n",i,result[i],getSupportCompressedTextureFormatString(result[i]).c_str()); printf("Texture Compression #i = %d, result[i] = %d [%s]\n",i,result[i],getSupportCompressedTextureFormatString(result[i]).c_str());
} }
printf("------------------------------------------------\n"); printf("------------------------------------------------\n");

View File

@ -351,7 +351,7 @@ void Pixmap1D::init(int components){
void Pixmap1D::init(int w, int components){ void Pixmap1D::init(int w, int components){
this->w= w; this->w= w;
this->components= components; this->components= components;
pixels= new uint8[getPixelByteCount()]; pixels= new uint8[(std::size_t)getPixelByteCount()];
} }
uint64 Pixmap1D::getPixelByteCount() const { uint64 Pixmap1D::getPixelByteCount() const {
@ -402,7 +402,7 @@ void Pixmap1D::loadBmp(const string &path) {
components= 3; components= 3;
} }
if(pixels == NULL) { if(pixels == NULL) {
pixels= new uint8[getPixelByteCount()]; pixels= new uint8[(std::size_t)getPixelByteCount()];
} }
//data //data
@ -432,7 +432,7 @@ void Pixmap1D::loadTga(const string &path) {
components= fileComponents; components= fileComponents;
} }
if(pixels == NULL) { if(pixels == NULL) {
pixels= new uint8[getPixelByteCount()]; pixels= new uint8[(std::size_t)getPixelByteCount()];
} }
//read data //read data
@ -471,7 +471,7 @@ void Pixmap2D::init(int w, int h, int components) {
this->w= w; this->w= w;
this->h= h; this->h= h;
this->components= components; this->components= components;
pixels= new uint8[getPixelByteCount()]; pixels= new uint8[(std::size_t)getPixelByteCount()];
} }
uint64 Pixmap2D::getPixelByteCount() const { uint64 Pixmap2D::getPixelByteCount() const {
@ -779,7 +779,7 @@ void Pixmap3D::init(int w, int h, int d, int components){
this->h= h; this->h= h;
this->d= d; this->d= d;
this->components= components; this->components= components;
pixels= new uint8[getPixelByteCount()]; pixels= new uint8[(std::size_t)getPixelByteCount()];
} }
uint64 Pixmap3D::getPixelByteCount() const { uint64 Pixmap3D::getPixelByteCount() const {
@ -838,7 +838,7 @@ void Pixmap3D::loadSliceBmp(const string &path, int slice){
components= 3; components= 3;
} }
if(pixels==NULL){ if(pixels==NULL){
pixels= new uint8[getPixelByteCount()]; pixels= new uint8[(std::size_t)getPixelByteCount()];
} }
//data //data
@ -861,7 +861,7 @@ void Pixmap3D::loadSliceTga(const string &path, int slice){
components= fileComponents; components= fileComponents;
} }
if(pixels==NULL){ if(pixels==NULL){
pixels= new uint8[getPixelByteCount()]; pixels= new uint8[(std::size_t)getPixelByteCount()];
} }
//read data //read data