diff --git a/src/osd/modules/debugger/osx/debugview.mm b/src/osd/modules/debugger/osx/debugview.mm index 409bbeadceb..f4a7c8cd2cb 100644 --- a/src/osd/modules/debugger/osx/debugview.mm +++ b/src/osd/modules/debugger/osx/debugview.mm @@ -583,7 +583,7 @@ static void debugwin_view_update(debug_view &view, void *osdprivate) if (wholeLineScroll) { CGFloat const clamp = [self bounds].size.height - fontHeight - proposedVisibleRect.size.height; - proposedVisibleRect.origin.y = std::min(proposedVisibleRect.origin.y, std::max(clamp, 0)); + proposedVisibleRect.origin.y = std::min((int)proposedVisibleRect.origin.y, std::max((int)clamp, 0)); proposedVisibleRect.origin.y -= fmod(proposedVisibleRect.origin.y, fontHeight); } return proposedVisibleRect; @@ -668,7 +668,7 @@ static void debugwin_view_update(debug_view &view, void *osdprivate) inTextContainer:textContainer]; if (start == 0) box.origin.x = 0; - box.size.width = std::max([self bounds].size.width - box.origin.x, 0); + box.size.width = std::max((int)([self bounds].size.width - box.origin.x), 0); [[self backgroundForAttribute:attr] set]; [NSBezierPath fillRect:NSMakeRect(box.origin.x, row * fontHeight, diff --git a/src/osd/modules/debugger/osx/debugwindowhandler.mm b/src/osd/modules/debugger/osx/debugwindowhandler.mm index a4cd46df631..18c17a3aef0 100644 --- a/src/osd/modules/debugger/osx/debugwindowhandler.mm +++ b/src/osd/modules/debugger/osx/debugwindowhandler.mm @@ -350,7 +350,7 @@ NSString *const MAMEAuxiliaryDebugWindowWillCloseNotification = @"MAMEAuxiliaryD windowFrame.size.height = std::min(windowFrame.size.height, available.size.height); // arbitrary additional height limit - windowFrame.size.height = std::min(windowFrame.size.height, 320); + windowFrame.size.height = std::min((int)windowFrame.size.height, 320); // place it in the bottom right corner and apply windowFrame.origin.x = available.origin.x + available.size.width - windowFrame.size.width; diff --git a/src/osd/modules/debugger/osx/errorlogviewer.mm b/src/osd/modules/debugger/osx/errorlogviewer.mm index 087694ca81b..cf8d7936c6b 100644 --- a/src/osd/modules/debugger/osx/errorlogviewer.mm +++ b/src/osd/modules/debugger/osx/errorlogviewer.mm @@ -44,7 +44,7 @@ borderType:[logScroll borderType]]; // this thing starts with no content, so its prefered height may be very small - desired.height = std::max(desired.height, 240); + desired.height = std::max((int)desired.height, 240); [self cascadeWindowWithDesiredSize:desired forView:logScroll]; } diff --git a/src/osd/modules/sound/coreaudio_sound.cpp b/src/osd/modules/sound/coreaudio_sound.cpp index 1f03939de45..e445dc27059 100644 --- a/src/osd/modules/sound/coreaudio_sound.cpp +++ b/src/osd/modules/sound/coreaudio_sound.cpp @@ -81,7 +81,7 @@ private: EFFECT_COUNT_MAX = 10 }; - UINT32 clamped_latency() const { return std::max(std::min(m_audio_latency, LATENCY_MAX), LATENCY_MIN); } + UINT32 clamped_latency() const { return std::max(std::min(UINT32(m_audio_latency), UINT32(LATENCY_MAX)), UINT32(LATENCY_MIN)); } UINT32 buffer_avail() const { return ((m_writepos >= m_playpos) ? m_buffer_size : 0) + m_playpos - m_writepos; } UINT32 buffer_used() const { return ((m_playpos > m_writepos) ? m_buffer_size : 0) + m_writepos - m_playpos; } @@ -228,7 +228,7 @@ int sound_coreaudio::init(const osd_options &options) // Allocate buffer m_headroom = m_sample_bytes * (clamped_latency() * sample_rate() / 40); - m_buffer_size = m_sample_bytes * std::max(sample_rate() * (clamped_latency() + 3) / 40, 256); + m_buffer_size = m_sample_bytes * std::max(UINT32(sample_rate() * (clamped_latency() + 3) / 40), 256U); m_buffer = global_alloc_array_clear(m_buffer_size); if (!m_buffer) {