summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/devices/nld_74193.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/netlist/devices/nld_74193.cpp')
-rw-r--r--src/lib/netlist/devices/nld_74193.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/netlist/devices/nld_74193.cpp b/src/lib/netlist/devices/nld_74193.cpp
index 9d29175dae9..55d18f3dc1b 100644
--- a/src/lib/netlist/devices/nld_74193.cpp
+++ b/src/lib/netlist/devices/nld_74193.cpp
@@ -5,8 +5,6 @@
*
*/
-#define MAXCNT 15
-
#include "nld_74193.h"
#include "../nl_base.h"
@@ -14,6 +12,8 @@ namespace netlist
{
namespace devices
{
+ static constexpr const unsigned MAXCNT = 15;
+
NETLIB_OBJECT(74193)
{
NETLIB_CONSTRUCTOR(74193)
@@ -87,7 +87,7 @@ namespace netlist
}
// FIXME: Timing
- static const netlist_time delay[4] =
+ static constexpr netlist_time delay[4] =
{
NLTIME_FROM_NS(40),
NLTIME_FROM_NS(40),
@@ -112,9 +112,7 @@ namespace netlist
{
if (m_CD() && !m_last_CU && m_CU())
{
- ++m_cnt;
- if (m_cnt > MAXCNT)
- m_cnt = 0;
+ ++m_cnt &= MAXCNT;
}
if (m_CU() && !m_last_CD && m_CD())
{