mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-01-26 02:07:26 +00:00
Enable msvc signed/unsigned mismatch warnings and fix remaining cases
This commit is contained in:
parent
812848e382
commit
25696c4436
4 changed files with 8 additions and 18 deletions
|
@ -66,7 +66,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#pragma warning(disable:4005)
|
#pragma warning(disable:4005)
|
||||||
#pragma warning(disable:4305)
|
#pragma warning(disable:4305)
|
||||||
|
|
||||||
#pragma warning(disable:4018) // signed/unsigned mismatch
|
//#pragma warning(disable:4018) // signed/unsigned mismatch
|
||||||
#pragma warning(disable:4244) // conversion from types with possible loss of data
|
#pragma warning(disable:4244) // conversion from types with possible loss of data
|
||||||
#pragma warning(disable:4800) // forcing value to bool 'true' or 'false (performance warning)
|
#pragma warning(disable:4800) // forcing value to bool 'true' or 'false (performance warning)
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#pragma warning(disable:4127) // conditional expression is constant
|
#pragma warning(disable:4127) // conditional expression is constant
|
||||||
#pragma warning(disable:4706) // assignment within conditional expression
|
#pragma warning(disable:4706) // assignment within conditional expression
|
||||||
|
|
||||||
#pragma warning(disable:4389) // signed/unsigned mismatch
|
//#pragma warning(disable:4389) // signed/unsigned mismatch
|
||||||
|
|
||||||
#pragma warning(disable:4189) // UqqqqSEFUL: local variable is initialized but not referenced
|
#pragma warning(disable:4189) // UqqqqSEFUL: local variable is initialized but not referenced
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -198,22 +198,13 @@ void ParticleManager::endParticle(Particle *p)
|
||||||
p->reset();
|
p->reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParticleManager::nextFree(int jump)
|
void ParticleManager::nextFree(size_t jump)
|
||||||
{
|
{
|
||||||
free+=jump;
|
free+=jump;
|
||||||
if (free >= size)
|
if (free >= size)
|
||||||
free -= size;
|
free -= size;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParticleManager::prevFree(int jump)
|
|
||||||
{
|
|
||||||
if(free < jump) {
|
|
||||||
free = free + size - jump;
|
|
||||||
} else {
|
|
||||||
free -= jump;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ParticleManager::setFree(size_t free)
|
void ParticleManager::setFree(size_t free)
|
||||||
{
|
{
|
||||||
if (free != ~0UL)
|
if (free != ~0UL)
|
||||||
|
@ -222,8 +213,8 @@ void ParticleManager::setFree(size_t free)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const int spread = 8;
|
static const size_t spread = 8;
|
||||||
const int spreadCheck = 128;
|
static const size_t spreadCheck = 128;
|
||||||
|
|
||||||
// travel the list until you find an empty or give up
|
// travel the list until you find an empty or give up
|
||||||
Particle *ParticleManager::stomp()
|
Particle *ParticleManager::stomp()
|
||||||
|
|
|
@ -237,8 +237,7 @@ protected:
|
||||||
size_t numActive;
|
size_t numActive;
|
||||||
Particle* stomp();
|
Particle* stomp();
|
||||||
|
|
||||||
void nextFree(int f=1);
|
void nextFree(size_t f=1);
|
||||||
void prevFree(int f=1);
|
|
||||||
|
|
||||||
size_t oldFree;
|
size_t oldFree;
|
||||||
|
|
||||||
|
|
|
@ -449,7 +449,7 @@ ImageTGA *Texture::TGAloadMem(void *mem, int size)
|
||||||
ByteBuffer bb(mem, size, ByteBuffer::REUSE);
|
ByteBuffer bb(mem, size, ByteBuffer::REUSE);
|
||||||
|
|
||||||
ImageTGA *pImageData = NULL; // This stores our important image data
|
ImageTGA *pImageData = NULL; // This stores our important image data
|
||||||
WORD width = 0, height = 0; // The dimensions of the image
|
uint16_t width = 0, height = 0; // The dimensions of the image
|
||||||
byte length = 0; // The length in bytes to the pixels
|
byte length = 0; // The length in bytes to the pixels
|
||||||
byte imageType = 0; // The image type (RLE, RGB, Alpha...)
|
byte imageType = 0; // The image type (RLE, RGB, Alpha...)
|
||||||
byte bits = 0; // The bits per pixel for the image (16, 24, 32)
|
byte bits = 0; // The bits per pixel for the image (16, 24, 32)
|
||||||
|
@ -604,7 +604,7 @@ ImageTGA *Texture::TGAloadMem(void *mem, int size)
|
||||||
byte *pColors = new byte [channels];
|
byte *pColors = new byte [channels];
|
||||||
|
|
||||||
// Load in all the pixel data
|
// Load in all the pixel data
|
||||||
while(i < width*height)
|
while(i < size_t(width)*height)
|
||||||
{
|
{
|
||||||
// Read in the current color count + 1
|
// Read in the current color count + 1
|
||||||
bb >> rleID;
|
bb >> rleID;
|
||||||
|
|
Loading…
Reference in a new issue