mirror of
https://github.com/holub/mame
synced 2025-04-27 10:43:07 +03:00
Fix some pedantic clang warnings. (nw)
This commit is contained in:
parent
ac111836fd
commit
67841056da
@ -73,7 +73,7 @@ namespace netlist
|
|||||||
// FIXME: Timing
|
// FIXME: Timing
|
||||||
NETLIB_UPDATE(7485)
|
NETLIB_UPDATE(7485)
|
||||||
{
|
{
|
||||||
for (std::int_fast32_t i = 3; i >= 0; i--)
|
for (std::size_t i = 3; i-- > 0; )
|
||||||
{
|
{
|
||||||
if (m_A[i]() > m_B[i]())
|
if (m_A[i]() > m_B[i]())
|
||||||
{
|
{
|
||||||
|
@ -113,7 +113,7 @@ namespace netlist
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint_fast8_t q = m_last_Q;
|
unsigned q = m_last_Q;
|
||||||
|
|
||||||
if (!m_CQ())
|
if (!m_CQ())
|
||||||
{
|
{
|
||||||
|
@ -70,7 +70,7 @@ namespace netlist
|
|||||||
//m_V0.initial(0.0);
|
//m_V0.initial(0.0);
|
||||||
//m_RV.do_reset();
|
//m_RV.do_reset();
|
||||||
m_RV.set(NL_FCONST(1.0) / R_LOW, 0.0, 0.0);
|
m_RV.set(NL_FCONST(1.0) / R_LOW, 0.0, 0.0);
|
||||||
m_inc = netlist_time::from_hz(m_FREQ());
|
m_inc = netlist_time::from_double(1.0 / m_FREQ());
|
||||||
if (m_FREQ() < 24000 || m_FREQ() > 56000)
|
if (m_FREQ() < 24000 || m_FREQ() > 56000)
|
||||||
netlist().log().warning("MM5837: Frequency outside of specs.", m_FREQ());
|
netlist().log().warning("MM5837: Frequency outside of specs.", m_FREQ());
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ namespace netlist
|
|||||||
|
|
||||||
NETLIB_UPDATE_PARAM(MM5837_dip)
|
NETLIB_UPDATE_PARAM(MM5837_dip)
|
||||||
{
|
{
|
||||||
m_inc = netlist_time::from_hz(m_FREQ());
|
m_inc = netlist_time::from_double(1.0 / m_FREQ());
|
||||||
if (m_FREQ() < 24000 || m_FREQ() > 56000)
|
if (m_FREQ() < 24000 || m_FREQ() > 56000)
|
||||||
netlist().log().warning("MM5837: Frequency outside of specs.", m_FREQ());
|
netlist().log().warning("MM5837: Frequency outside of specs.", m_FREQ());
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ namespace netlist { namespace factory
|
|||||||
virtual ~element_t() {}
|
virtual ~element_t() {}
|
||||||
|
|
||||||
virtual plib::owned_ptr<device_t> Create(netlist_t &anetlist, const pstring &name) = 0;
|
virtual plib::owned_ptr<device_t> Create(netlist_t &anetlist, const pstring &name) = 0;
|
||||||
virtual void macro_actions(netlist_t &anetlist, const pstring &name) {};
|
virtual void macro_actions(netlist_t &anetlist, const pstring &name) {}
|
||||||
|
|
||||||
const pstring &name() const { return m_name; }
|
const pstring &name() const { return m_name; }
|
||||||
const pstring &classname() const { return m_classname; }
|
const pstring &classname() const { return m_classname; }
|
||||||
|
@ -68,7 +68,7 @@ fpsignalenabler::fpsignalenabler(unsigned fpexceptions)
|
|||||||
#if HAS_FEENABLE_EXCEPT
|
#if HAS_FEENABLE_EXCEPT
|
||||||
if (m_enable)
|
if (m_enable)
|
||||||
{
|
{
|
||||||
unsigned b = 0;
|
int b = 0;
|
||||||
if (fpexceptions & plib::FP_INEXACT) b = b | FE_INEXACT;
|
if (fpexceptions & plib::FP_INEXACT) b = b | FE_INEXACT;
|
||||||
if (fpexceptions & plib::FP_DIVBYZERO) b = b | FE_DIVBYZERO;
|
if (fpexceptions & plib::FP_DIVBYZERO) b = b | FE_DIVBYZERO;
|
||||||
if (fpexceptions & plib::FP_UNDERFLOW) b = b | FE_UNDERFLOW;
|
if (fpexceptions & plib::FP_UNDERFLOW) b = b | FE_UNDERFLOW;
|
||||||
|
@ -101,7 +101,7 @@ public:
|
|||||||
static bool global_enable(bool enable);
|
static bool global_enable(bool enable);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unsigned m_last_enabled;
|
int m_last_enabled;
|
||||||
|
|
||||||
static bool m_enable;
|
static bool m_enable;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user