mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2024-11-24 05:45:41 +01:00
Fix more compiler warnings.
This commit is contained in:
parent
aaf16eacc8
commit
08df6f6d65
@ -51,6 +51,9 @@ class ImageLoader {
|
||||
|
||||
protected:
|
||||
|
||||
const uint8 *const m_RawData;
|
||||
uint8 *m_PixelData;
|
||||
|
||||
uint32 m_Width;
|
||||
uint32 m_Height;
|
||||
|
||||
@ -66,9 +69,6 @@ class ImageLoader {
|
||||
uint32 m_AlphaChannelPrecision;
|
||||
uint8 *m_AlphaData;
|
||||
|
||||
uint8 *m_PixelData;
|
||||
const uint8 *const m_RawData;
|
||||
|
||||
ImageLoader(const uint8 *rawData)
|
||||
: m_RawData(rawData)
|
||||
, m_PixelData(0)
|
||||
|
@ -51,18 +51,18 @@ class ImageWriter {
|
||||
|
||||
protected:
|
||||
|
||||
uint32 m_Width;
|
||||
uint32 m_Height;
|
||||
|
||||
const uint8 *m_PixelData;
|
||||
uint32 m_RawFileDataSz;
|
||||
uint8 *m_RawFileData;
|
||||
|
||||
uint32 m_Width;
|
||||
uint32 m_Height;
|
||||
|
||||
ImageWriter(const int width, const int height, const uint8 *rawData)
|
||||
: m_PixelData(rawData)
|
||||
, m_Width(width), m_Height(height)
|
||||
, m_RawFileDataSz(256)
|
||||
, m_RawFileData(new uint8[m_RawFileDataSz])
|
||||
, m_Width(width), m_Height(height)
|
||||
{ }
|
||||
|
||||
uint32 GetChannelForPixel(uint32 x, uint32 y, uint32 ch);
|
||||
|
@ -99,11 +99,11 @@ class FileStream {
|
||||
|
||||
private:
|
||||
|
||||
EFileMode m_Mode;
|
||||
|
||||
// Platform specific implementation
|
||||
FileStreamImpl *m_Impl;
|
||||
|
||||
EFileMode m_Mode;
|
||||
|
||||
static const uint32 kMaxFilenameSz = 256;
|
||||
CHAR m_Filename[kMaxFilenameSz];
|
||||
};
|
||||
|
@ -71,16 +71,17 @@ public:
|
||||
bool Write();
|
||||
|
||||
private:
|
||||
|
||||
static const unsigned int kMaxFilenameSz = 256;
|
||||
char m_Filename[kMaxFilenameSz];
|
||||
unsigned int m_Handle;
|
||||
unsigned int m_Width;
|
||||
unsigned int m_Height;
|
||||
|
||||
Image *m_Image;
|
||||
|
||||
const EImageFileFormat m_FileFormat;
|
||||
|
||||
Image *m_Image;
|
||||
|
||||
static unsigned char *ReadFileData(const CHAR *filename);
|
||||
static bool WriteImageDataToFile(const uint8 *data, const uint32 dataSz, const CHAR *filename);
|
||||
static EImageFileFormat DetectFileFormat(const CHAR *filename);
|
||||
|
@ -245,7 +245,6 @@ unsigned char *ImageFile::ReadFileData(const CHAR *filename) {
|
||||
// Read all of the data
|
||||
uint64 totalBytesRead = 0;
|
||||
uint64 totalBytesLeft = fileSize;
|
||||
uint32 bytesToRead = uint32(std::min(totalBytesLeft, uint64(1 << 31)));
|
||||
int32 bytesRead;
|
||||
while((bytesRead = fstr.Read(rawData, uint32(fileSize))) > 0) {
|
||||
totalBytesRead += bytesRead;
|
||||
|
Loading…
Reference in New Issue
Block a user