diff options
author | 2016-08-07 01:44:45 +0200 | |
---|---|---|
committer | 2016-08-07 01:44:55 +0200 | |
commit | 5b1d15383dfecd9695c18711b56f08e4a71ca08e (patch) | |
tree | bf5da4a28ab6a146e808a6b10347489905aad5e7 /src/lib/netlist/plib/palloc.h | |
parent | a38471602c29a6fc69e7440a25cf052d0ec9e4f2 (diff) |
Use noexcept in netlist code where appropriate.
Use macro NL_NOEXCEPT if debug builds would throw an exception (e.g. by
using nl_assert). This is not entirely safe. Going forward, nl_assert
should call log first and than throw. (nw)
Diffstat (limited to 'src/lib/netlist/plib/palloc.h')
-rw-r--r-- | src/lib/netlist/plib/palloc.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/netlist/plib/palloc.h b/src/lib/netlist/plib/palloc.h index 088320fa7e3..a12595e0027 100644 --- a/src/lib/netlist/plib/palloc.h +++ b/src/lib/netlist/plib/palloc.h @@ -112,7 +112,7 @@ private: owned_ptr() : m_ptr(nullptr), m_is_owned(true) { } public: - owned_ptr(SC *p, bool owned) + owned_ptr(SC *p, bool owned) noexcept : m_ptr(p), m_is_owned(owned) { } owned_ptr(const owned_ptr &r) = delete; @@ -130,7 +130,7 @@ public: return *this; } - owned_ptr(owned_ptr &&r) + owned_ptr(owned_ptr &&r) noexcept { m_is_owned = r.m_is_owned; m_ptr = r.m_ptr; @@ -139,7 +139,7 @@ public: } template<typename DC> - owned_ptr(owned_ptr<DC> &&r) + owned_ptr(owned_ptr<DC> &&r) noexcept { m_ptr = static_cast<SC *>(r.get()); m_is_owned = r.is_owned(); |