Commit 39318811 authored by phcoder's avatar phcoder
Browse files

Add explicit type paramater for min in potentially ambigous places

3DS compiler refuses to compile these places without either casts or
explicit type parameter
parent d0dd2376
......@@ -247,7 +247,7 @@ namespace draw
uint8_t w = lua_tonumber(L, 3);
uint8_t h = lua_tonumber(L, 4);
machine.memory().clipRect()->set(x0, y0, std::min(x0 + w, int32_t(gfx::SCREEN_WIDTH-1)), std::min(y0 + h, int32_t(gfx::SCREEN_HEIGHT-1)));
machine.memory().clipRect()->set(x0, y0, std::min<int32_t>(x0 + w, gfx::SCREEN_WIDTH-1), std::min<int32_t>(y0 + h, gfx::SCREEN_HEIGHT-1));
}
return 0;
......
......@@ -413,7 +413,7 @@ void APU::renderSounds(int16_t* dest, size_t totalSamples)
{
/* generate the maximum amount of samples available for same note */
// TODO: optimize if next note is equal to current
size_t available = std::min(samples, samplePerTick - (channel.position % samplePerTick));
size_t available = std::min<ssize_t>(samples, samplePerTick - (channel.position % samplePerTick));
renderSound(channel, buffer, available);
samples -= available;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment