mirror of
https://github.com/libretro/ppsspp.git
synced 2025-01-31 05:43:14 +00:00
Fix some small constant-comparison type warnings.
This commit is contained in:
parent
0918ec8598
commit
4974124587
@ -56,7 +56,7 @@ static const int MPEG_DATA_STREAM = 3; // Arbitrary user defined type. Can
|
||||
static const int MPEG_AUDIO_STREAM = 15;
|
||||
static const int MPEG_AU_MODE_DECODE = 0;
|
||||
static const int MPEG_AU_MODE_SKIP = 1;
|
||||
static const int MPEG_MEMSIZE = 0x10000; // 64k.
|
||||
static const u32 MPEG_MEMSIZE = 0x10000; // 64k.
|
||||
|
||||
static const int MPEG_AVC_DECODE_SUCCESS = 1; // Internal value.
|
||||
static const int MPEG_AVC_DECODE_ERROR_FATAL = -8;
|
||||
@ -968,7 +968,7 @@ int sceMpegInitAu(u32 mpeg, u32 bufferAddr, u32 auPointer)
|
||||
SceMpegAu sceAu;
|
||||
sceAu.read(auPointer);
|
||||
|
||||
if (bufferAddr >= 1 && bufferAddr <= NUM_ES_BUFFERS && ctx->esBuffers[bufferAddr - 1]) {
|
||||
if (bufferAddr >= 1 && bufferAddr <= (u32)NUM_ES_BUFFERS && ctx->esBuffers[bufferAddr - 1]) {
|
||||
// This esbuffer has been allocated for Avc.
|
||||
sceAu.esBuffer = bufferAddr; // Can this be right??? not much of a buffer pointer..
|
||||
sceAu.esSize = MPEG_AVC_ES_SIZE;
|
||||
@ -1570,7 +1570,7 @@ int sceMp3Init(u32 mp3)
|
||||
|
||||
// 0 == VBR
|
||||
int bitrate = ((header >> 10) & 0x3);
|
||||
if(bitrate < sizeof(MP3_BITRATES) / sizeof(MP3_BITRATES[0]))
|
||||
if(bitrate < (int)ARRAY_SIZE(MP3_BITRATES))
|
||||
ctx->mp3Bitrate = MP3_BITRATES[bitrate];
|
||||
else
|
||||
ctx->mp3Bitrate = -1;
|
||||
|
@ -43,7 +43,7 @@ enum {
|
||||
};
|
||||
|
||||
// MPEG statics.
|
||||
static const int PSMF_MAGIC = 0x464D5350;
|
||||
static const u32 PSMF_MAGIC = 0x464D5350;
|
||||
static const int PSMF_VERSION_0012 = 0x32313030;
|
||||
static const int PSMF_VERSION_0013 = 0x33313030;
|
||||
static const int PSMF_VERSION_0014 = 0x34313030;
|
||||
|
@ -23,7 +23,7 @@ static const int modeBpp[4] = { 2, 2, 2, 4 };
|
||||
|
||||
void MediaEngine::writeVideoImage(u32 bufferPtr, int frameWidth, int videoPixelMode)
|
||||
{
|
||||
if (videoPixelMode > (sizeof(modeBpp) / sizeof(modeBpp[0])) || videoPixelMode < 0)
|
||||
if (videoPixelMode > (int)(sizeof(modeBpp) / sizeof(modeBpp[0])) || videoPixelMode < 0)
|
||||
{
|
||||
ERROR_LOG(ME, "Unexpected videoPixelMode %d, using 0 instead.", videoPixelMode);
|
||||
videoPixelMode = 0;
|
||||
|
@ -82,7 +82,7 @@ void RunTests()
|
||||
std::string savedReportHost = g_Config.sReportHost;
|
||||
g_Config.sReportHost = "";
|
||||
|
||||
for (int i = 0; i < ARRAY_SIZE(testsToRun); i++) {
|
||||
for (size_t i = 0; i < ARRAY_SIZE(testsToRun); i++) {
|
||||
const char *testName = testsToRun[i];
|
||||
coreParam.fileToStart = baseDirectory + "pspautotests/tests/" + testName + ".prx";
|
||||
std::string expectedFile = baseDirectory + "pspautotests/tests/" + testName + ".expected";
|
||||
|
Loading…
x
Reference in New Issue
Block a user