mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Data::getSize now uses size_t instead of int
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
|
||||
// Implements Data.
|
||||
virtual void *getData() const;
|
||||
virtual int getSize() const;
|
||||
virtual size_t getSize() const;
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user