Data::getSize now uses size_t instead of int

This commit is contained in:
Alex Szpakowski
2014-03-18 03:50:00 -03:00
parent aba17607aa
commit 50916825d0
12 changed files with 42 additions and 46 deletions
+4 -4
View File
@@ -36,9 +36,9 @@ CompressedData::~CompressedData()
{
}
int CompressedData::getSize() const
size_t CompressedData::getSize() const
{
return int(dataSize);
return dataSize;
}
void *CompressedData::getData() const
@@ -51,11 +51,11 @@ int CompressedData::getMipmapCount() const
return dataImages.size();
}
int CompressedData::getSize(int miplevel) const
size_t CompressedData::getSize(int miplevel) const
{
checkMipmapLevelExists(miplevel);
return int(dataImages[miplevel].size);
return dataImages[miplevel].size;
}
void *CompressedData::getData(int miplevel) const
+2 -2
View File
@@ -71,7 +71,7 @@ public:
// Implements Data.
virtual void *getData() const;
virtual int getSize() const;
virtual size_t getSize() const;
/**
* Gets the number of mipmaps in this Compressed Image Data.
@@ -82,7 +82,7 @@ public:
/**
* Gets the size in bytes of a sub-image at the specified mipmap level.
**/
int getSize(int miplevel) const;
size_t getSize(int miplevel) const;
/**
* Gets the byte data of a sub-image at the specified mipmap level.
+2 -2
View File
@@ -38,9 +38,9 @@ ImageData::~ImageData()
delete mutex;
}
int ImageData::getSize() const
size_t ImageData::getSize() const
{
return getWidth()*getHeight()*sizeof(pixel);
return size_t(getWidth()*getHeight())*sizeof(pixel);
}
void *ImageData::getData() const
+1 -1
View File
@@ -130,7 +130,7 @@ public:
// Implements Data.
virtual void *getData() const;
virtual int getSize() const;
virtual size_t getSize() const;
protected: