Cocoa Port:

- Silence some compiler warnings.
This commit is contained in:
rogerman 2015-05-14 20:56:00 +00:00
parent 5215efe844
commit afba637244
3 changed files with 16 additions and 25 deletions

View File

@ -573,7 +573,7 @@ SineWaveGenerator sineWaveGenerator(250.0, MIC_SAMPLE_RATE);
theSample = sampleGenerator->generateSample(); theSample = sampleGenerator->generateSample();
} }
_hwMicLevelList->push_back(abs((float)theSample - MIC_NULL_SAMPLE_VALUE)); _hwMicLevelList->push_back(fabs((float)theSample - MIC_NULL_SAMPLE_VALUE));
return theSample; return theSample;
} }

View File

@ -151,22 +151,19 @@ static NSMutableDictionary *saveTypeValues = nil;
return; return;
} }
if (&ndsRomBanner != NULL) [self.header setValue:[self banner:ndsRomBanner.titles[0]] forKey:@"bannerJapanese"];
{ [self.header setValue:[self banner:ndsRomBanner.titles[1]] forKey:@"bannerEnglish"];
[self.header setValue:[self banner:ndsRomBanner.titles[0]] forKey:@"bannerJapanese"]; [self.header setValue:[self banner:ndsRomBanner.titles[2]] forKey:@"bannerFrench"];
[self.header setValue:[self banner:ndsRomBanner.titles[1]] forKey:@"bannerEnglish"]; [self.header setValue:[self banner:ndsRomBanner.titles[3]] forKey:@"bannerGerman"];
[self.header setValue:[self banner:ndsRomBanner.titles[2]] forKey:@"bannerFrench"]; [self.header setValue:[self banner:ndsRomBanner.titles[4]] forKey:@"bannerItalian"];
[self.header setValue:[self banner:ndsRomBanner.titles[3]] forKey:@"bannerGerman"]; [self.header setValue:[self banner:ndsRomBanner.titles[5]] forKey:@"bannerSpanish"];
[self.header setValue:[self banner:ndsRomBanner.titles[4]] forKey:@"bannerItalian"];
[self.header setValue:[self banner:ndsRomBanner.titles[5]] forKey:@"bannerSpanish"];
[self.bindings setValue:[self.header objectForKey:@"bannerJapanese"] forKey:@"bannerJapanese"]; [self.bindings setValue:[self.header objectForKey:@"bannerJapanese"] forKey:@"bannerJapanese"];
[self.bindings setValue:[self.header objectForKey:@"bannerEnglish"] forKey:@"bannerEnglish"]; [self.bindings setValue:[self.header objectForKey:@"bannerEnglish"] forKey:@"bannerEnglish"];
[self.bindings setValue:[self.header objectForKey:@"bannerFrench"] forKey:@"bannerFrench"]; [self.bindings setValue:[self.header objectForKey:@"bannerFrench"] forKey:@"bannerFrench"];
[self.bindings setValue:[self.header objectForKey:@"bannerGerman"] forKey:@"bannerGerman"]; [self.bindings setValue:[self.header objectForKey:@"bannerGerman"] forKey:@"bannerGerman"];
[self.bindings setValue:[self.header objectForKey:@"bannerItalian"] forKey:@"bannerItalian"]; [self.bindings setValue:[self.header objectForKey:@"bannerItalian"] forKey:@"bannerItalian"];
[self.bindings setValue:[self.header objectForKey:@"bannerSpanish"] forKey:@"bannerSpanish"]; [self.bindings setValue:[self.header objectForKey:@"bannerSpanish"] forKey:@"bannerSpanish"];
}
if (ndsRomHeader != NULL) if (ndsRomHeader != NULL)
{ {
@ -665,12 +662,6 @@ void RomIconToRGBA8888(uint32_t *bitmapData)
return; return;
} }
if (&ndsRomBanner == NULL)
{
memset(bitmapData, 0, 4096); // 4096 bytes = 32px * 32px * sizeof(uint32_t)
return;
}
// Set all of our icon read pointers. // Set all of our icon read pointers.
iconClutPtr = (uint16_t *)ndsRomBanner.palette + 1; iconClutPtr = (uint16_t *)ndsRomBanner.palette + 1;
iconPixPtr = (uint32_t *)ndsRomBanner.bitmap; iconPixPtr = (uint32_t *)ndsRomBanner.bitmap;

View File

@ -381,7 +381,7 @@ CGSize GetTransformedBounds(const double normalBoundsWidth, const double normalB
} }
else else
{ {
transformBounds.width = abs(x[1] - x[3]); transformBounds.width = fabs(x[1] - x[3]);
} }
// Determine the transformed height, which is dependent on the location of // Determine the transformed height, which is dependent on the location of
@ -418,7 +418,7 @@ CGSize GetTransformedBounds(const double normalBoundsWidth, const double normalB
} }
else else
{ {
transformBounds.height = abs(y[3] - y[1]); transformBounds.height = fabs(y[3] - y[1]);
} }
return transformBounds; return transformBounds;