summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/devices/nld_4066.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/netlist/devices/nld_4066.cpp')
-rw-r--r--src/lib/netlist/devices/nld_4066.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/lib/netlist/devices/nld_4066.cpp b/src/lib/netlist/devices/nld_4066.cpp
index 9e7d7e7c7fe..bd2a0a13196 100644
--- a/src/lib/netlist/devices/nld_4066.cpp
+++ b/src/lib/netlist/devices/nld_4066.cpp
@@ -1,4 +1,4 @@
-// license:GPL-2.0+
+// license:BSD-3-Clause
// copyright-holders:Couriersud
/*
* nld_4066.cpp
@@ -25,10 +25,8 @@
#include "solver/nld_solver.h"
-namespace netlist
-{
- namespace devices
- {
+namespace netlist::devices {
+
NETLIB_OBJECT(CD4066_GATE)
{
NETLIB_CONSTRUCTOR_MODEL(CD4066_GATE, "CD4XXX")
@@ -44,7 +42,7 @@ namespace netlist
{
// Start in off condition
// FIXME: is ROFF correct?
- m_R.set_R(plib::reciprocal(exec().gmin()));
+ m_R().set_R(plib::reciprocal(exec().gmin()));
}
private:
@@ -69,11 +67,11 @@ namespace netlist
if (R > nlconst::zero() && (m_last != new_state))
{
m_last = new_state;
- m_R.change_state([this, &R]() -> void { this->m_R.set_R(R);});
+ m_R().change_state([this, &R]() -> void { this->m_R().set_R(R);});
}
}
- analog::NETLIB_SUB(R_base) m_R;
+ NETLIB_SUB_NS(analog, R_base) m_R;
analog_input_t m_control;
param_fp_t m_base_r;
state_var<bool> m_last;
@@ -81,5 +79,5 @@ namespace netlist
};
NETLIB_DEVICE_IMPL(CD4066_GATE, "CD4066_GATE", "")
- } //namespace devices
-} // namespace netlist
+
+} // namespace netlist::devices