mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-14 04:03:46 +00:00
warnings cleanup
cleanup and some warning fixes
This commit is contained in:
parent
9dc5ae833b
commit
e6c653c441
8 changed files with 55 additions and 42 deletions
|
|
@ -34,6 +34,9 @@
|
|||
#define STBIWDEF static inline
|
||||
#endif
|
||||
|
||||
#pragma warning( push )
|
||||
#pragma warning( disable : 4505 ) // unreferenced function removed.
|
||||
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#define STB_IMAGE_STATIC
|
||||
#include "stb_image.h"
|
||||
|
|
@ -42,6 +45,8 @@
|
|||
#define STB_IMAGE_WRITE_STATIC
|
||||
#include "stb_image_write.h"
|
||||
|
||||
#pragma warning(pop)
|
||||
|
||||
static bool sReadSTB(const Torque::Path& path, GBitmap* bitmap);
|
||||
static bool sReadStreamSTB(Stream& stream, GBitmap* bitmap, U32 len);
|
||||
|
||||
|
|
@ -147,7 +152,7 @@ bool sReadSTB(const Torque::Path& path, GBitmap* bitmap)
|
|||
U32 buffSize = readIes->getStreamSize();
|
||||
char* buffer = new char[buffSize];
|
||||
readIes->read(buffSize, buffer);
|
||||
|
||||
|
||||
|
||||
IESFileInfo info;
|
||||
IESLoadHelper IESLoader;
|
||||
|
|
@ -399,8 +404,6 @@ bool sWriteSTB(const Torque::Path& path, GBitmap* bitmap, U32 compressionLevel)
|
|||
String ext = path.getExtension();
|
||||
|
||||
|
||||
|
||||
U32 stride = width * bytes;
|
||||
// we always have at least 1
|
||||
U32 comp = 1;
|
||||
|
||||
|
|
@ -554,7 +557,6 @@ void DeferredPNGWriter::append(GBitmap* bitmap, U32 rows)
|
|||
mData->channels = bitmap->getBytesPerPixel();
|
||||
}
|
||||
|
||||
const U32 height = getMin(bitmap->getHeight(), rows);
|
||||
const dsize_t dataChuckSize = bitmap->getByteSize();
|
||||
|
||||
const U8* pSrcData = bitmap->getBits();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue