mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Some warning fixes
This commit is contained in:
parent
96a08b3393
commit
356d35e58b
4 changed files with 17 additions and 18 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "base/compat.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
|
||||
static int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap) {
|
||||
int count = -1;
|
||||
|
|
|
@ -55,14 +55,14 @@ ChunkFile::~ChunkFile() {
|
|||
}
|
||||
|
||||
int ChunkFile::readInt() {
|
||||
if (pos<eof) {
|
||||
if (data && pos<eof) {
|
||||
/*
|
||||
int temp = *(int *)(data+pos);
|
||||
pos+=4;
|
||||
*/
|
||||
pos+=4;
|
||||
pos += 4;
|
||||
if (fastMode)
|
||||
return *(int *)(data+pos-4);
|
||||
return *(int *)(data + pos - 4);
|
||||
else
|
||||
return file.readInt();
|
||||
} else {
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
#include "base/basictypes.h"
|
||||
#include "file/easy_file.h"
|
||||
|
||||
LAMEFile::LAMEFile() : file_(NULL) {
|
||||
isOpen = false;
|
||||
LAMEFile::LAMEFile() : file_(NULL), isOpen(false), size_(0) {
|
||||
}
|
||||
|
||||
LAMEFile::~LAMEFile() { }
|
||||
|
|
|
@ -108,16 +108,16 @@ int AABB::GetShortestAxis() const
|
|||
int AABB::GetLongestAxis() const
|
||||
{
|
||||
Vec3 delta = maxB-minB;
|
||||
if (fabs(delta.y)>fabs(delta.x))
|
||||
if (fabsf(delta.y) > fabsf(delta.x))
|
||||
{
|
||||
if (fabs(delta.z)>fabs(delta.y))
|
||||
if (fabsf(delta.z) > fabsf(delta.y))
|
||||
return 2;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (fabs(delta.z)>fabs(delta.x))
|
||||
if (fabsf(delta.z) > fabsf(delta.x))
|
||||
return 2;
|
||||
else
|
||||
return 0;
|
||||
|
@ -210,21 +210,21 @@ bool AABB::IntersectsTriangle(const Vec3& a_V0, const Vec3& a_V1, const Vec3& a_
|
|||
v1 = a_V1 - a_BoxCentre;
|
||||
v2 = a_V2 - a_BoxCentre;
|
||||
e0 = v1 - v0, e1 = v2 - v1, e2 = v0 - v2;
|
||||
fex = fabs(e0[0]);
|
||||
fey = fabs(e0[1]);
|
||||
fez = fabs(e0[2]);
|
||||
fex = fabsf(e0[0]);
|
||||
fey = fabsf(e0[1]);
|
||||
fez = fabsf(e0[2]);
|
||||
AXISTEST_X01( e0[2], e0[1], fez, fey );
|
||||
AXISTEST_Y02( e0[2], e0[0], fez, fex );
|
||||
AXISTEST_Z12( e0[1], e0[0], fey, fex );
|
||||
fex = fabs(e1[0]);
|
||||
fey = fabs(e1[1]);
|
||||
fez = fabs(e1[2]);
|
||||
fex = fabsf(e1[0]);
|
||||
fey = fabsf(e1[1]);
|
||||
fez = fabsf(e1[2]);
|
||||
AXISTEST_X01( e1[2], e1[1], fez, fey );
|
||||
AXISTEST_Y02( e1[2], e1[0], fez, fex );
|
||||
AXISTEST_Z0 ( e1[1], e1[0], fey, fex );
|
||||
fex = fabs(e2[0]);
|
||||
fey = fabs(e2[1]);
|
||||
fez = fabs(e2[2]);
|
||||
fex = fabsf(e2[0]);
|
||||
fey = fabsf(e2[1]);
|
||||
fez = fabsf(e2[2]);
|
||||
AXISTEST_X2 ( e2[2], e2[1], fez, fey );
|
||||
AXISTEST_Y1 ( e2[2], e2[0], fez, fex );
|
||||
AXISTEST_Z12( e2[1], e2[0], fey, fex );
|
||||
|
|
Loading…
Add table
Reference in a new issue