summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/palloc.h
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2019-03-17 23:41:57 +0100
committer couriersud <couriersud@gmx.org>2019-03-17 23:42:08 +0100
commit46762510c99c323de1e9c432d841da65b5a28857 (patch)
tree0aea71ef255717da1aa14007c5cd66248f5e4e08 /src/lib/netlist/plib/palloc.h
parente125b756e712c22b1deedc98ba7c56d60265a5e2 (diff)
netlist: Added B-E and B-C capacitance to EB model. [Couriersud]
Despite the overhead - two devices more per transistor - this addition significantly reduces computing time on switching conditions by reducing the needed Newton-Raphson loops dramatically.
Diffstat (limited to 'src/lib/netlist/plib/palloc.h')
-rw-r--r--src/lib/netlist/plib/palloc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/netlist/plib/palloc.h b/src/lib/netlist/plib/palloc.h
index 830ce3ec525..d0e69ed13ec 100644
--- a/src/lib/netlist/plib/palloc.h
+++ b/src/lib/netlist/plib/palloc.h
@@ -147,6 +147,12 @@ namespace plib {
m_is_owned = false;
m_ptr = nullptr;
}
+
+ /**
+ * \brief Return @c true if the stored pointer is not null.
+ */
+ explicit operator bool() const noexcept { return m_ptr != nullptr; }
+
pointer release()
{
pointer tmp = m_ptr;