Fix compile problems on some OS X versions (nw)

This commit is contained in:
R. Belmont 2013-03-17 17:10:46 +00:00
parent 80d3d9be2b
commit 8920c1c7eb
3 changed files with 18 additions and 1 deletions

View File

@ -248,6 +248,22 @@ template<class T> T konami_cpu_device::safe_shift_right(T value, UINT32 shift)
}
//-------------------------------------------------
// safe_shift_right_unsigned
//-------------------------------------------------
template<class T> T konami_cpu_device::safe_shift_right_unsigned(T value, UINT32 shift)
{
T result;
if (shift < (sizeof(T) * 8))
result = value >> shift;
else
result = 0;
return result;
}
//-------------------------------------------------
// safe_shift_left
//-------------------------------------------------

View File

@ -67,6 +67,7 @@ private:
// miscellaneous
template<class T> T safe_shift_right(T value, UINT32 shift);
template<class T> T safe_shift_right_unsigned(T value, UINT32 shift);
template<class T> T safe_shift_left(T value, UINT32 shift);
void set_lines(UINT8 data);
void execute_one();

View File

@ -517,7 +517,7 @@ LSRD:
else
m_cc &= ~CC_C;
m_d.w = set_flags<UINT16>(CC_NZ, safe_shift_right<UINT16>(m_d.w, m_temp.b.l));
m_d.w = set_flags<UINT16>(CC_NZ, safe_shift_right_unsigned<UINT16>(m_d.w, m_temp.b.l));
}
eat(1);
return;