mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2024-11-27 22:54:20 +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:
|
||||
|
||||
const uint8 *m_PixelData;
|
||||
uint32 m_RawFileDataSz;
|
||||
uint8 *m_RawFileData;
|
||||
|
||||
uint32 m_Width;
|
||||
uint32 m_Height;
|
||||
|
||||
const uint8 *m_PixelData;
|
||||
uint32 m_RawFileDataSz;
|
||||
uint8 *m_RawFileData;
|
||||
|
||||
ImageWriter(const int width, const int height, const uint8 *rawData)
|
||||
: m_PixelData(rawData)
|
||||
, m_RawFileDataSz(256)
|
||||
, m_RawFileData(new uint8[m_RawFileDataSz])
|
||||
, m_Width(width), m_Height(height)
|
||||
, m_RawFileDataSz(256)
|
||||
, m_RawFileData(new uint8[m_RawFileDataSz])
|
||||
{ }
|
||||
|
||||
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];
|
||||
};
|
||||
|
@ -59,7 +59,7 @@ public:
|
||||
|
||||
ImageFile(const char *filename);
|
||||
ImageFile(const char *filename, EImageFileFormat format);
|
||||
ImageFile(const char *filename, EImageFileFormat format, const Image &);
|
||||
ImageFile(const char *filename, EImageFileFormat format, const Image &);
|
||||
~ImageFile();
|
||||
|
||||
unsigned int GetWidth() const { return m_Width; }
|
||||
@ -67,20 +67,21 @@ public:
|
||||
CompressedImage *Compress(const SCompressionSettings &) const;
|
||||
Image *GetImage() const { return m_Image; }
|
||||
|
||||
bool Load();
|
||||
bool Write();
|
||||
bool Load();
|
||||
bool Write();
|
||||
|
||||
private:
|
||||
static const unsigned int kMaxFilenameSz = 256;
|
||||
char m_Filename[kMaxFilenameSz];
|
||||
|
||||
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