diff options
author | 2022-06-20 20:01:03 +0200 | |
---|---|---|
committer | 2022-06-20 20:01:03 +0200 | |
commit | 0dad442511fc3e96bae721c38fe8040a222cc21a (patch) | |
tree | b0eb0732f9e7f438a41a889621d36193d16d6e1b /src/lib/netlist/core/setup.h | |
parent | 3fbfe0b1d76573ee8971eaaee6b37b4024575624 (diff) |
netlist: fix bug, prepare for future changes and improve readability (#9947)
* netlist: fix bug, prepare for future changes and improve readability
- fix a bug where a net processing error may trigger a nullptr access
- applied some clang-tidy recommendations
- add no_return to plib::terminate
- properly encapsulate dynamic_cast usage
- more review of noexcept
- added a clang-format file. Over time, all source files will be
processed with clang-format
- Used clang format on a number of files
- Rewrote 74174
- all device constructors now use a struct to pass data on
to base classes. Neither netlist state nor the name are intended
to be used in a constructor. After the base class was
constructed, they can be accessed by state() and name().
- The device construction macros can now be removed. Changes to
the core will not need to be reflected in constructors.
- Change truth table macros so that going forward NETLIST_END and
TRUTH_TABLE_END can be replaced by a closing curly brace. netlists can
than use curly braces enclosed blocks.
- more clang-format
- removed some macros completely
- all derived classes from base_device_t now don't use macros
any longer.
- as a result, delegator_t was removed. This class was only used
to support macros :-(
Diffstat (limited to 'src/lib/netlist/core/setup.h')
-rw-r--r-- | src/lib/netlist/core/setup.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/netlist/core/setup.h b/src/lib/netlist/core/setup.h index ddf1aa14889..63210a96a06 100644 --- a/src/lib/netlist/core/setup.h +++ b/src/lib/netlist/core/setup.h @@ -179,11 +179,11 @@ namespace netlist models_t &models() noexcept { return m_models; } const models_t &models() const noexcept { return m_models; } - netlist_state_t &nlstate() { return m_nlstate; } - const netlist_state_t &nlstate() const { return m_nlstate; } + netlist_state_t &nlstate() noexcept { return m_nlstate; } + const netlist_state_t &nlstate() const noexcept { return m_nlstate; } - nlparse_t &parser() { return m_parser; } - const nlparse_t &parser() const { return m_parser; } + nlparse_t &parser() noexcept { return m_parser; } + const nlparse_t &parser() const noexcept { return m_parser; } log_type &log() noexcept; const log_type &log() const noexcept; @@ -196,10 +196,10 @@ namespace netlist void merge_nets(detail::net_t &this_net, detail::net_t &other_net); void connect_terminals(detail::core_terminal_t &t1, detail::core_terminal_t &t2); - void connect_input_output(detail::core_terminal_t &in, detail::core_terminal_t &out); - void connect_terminal_output(terminal_t &in, detail::core_terminal_t &out); - void connect_terminal_input(terminal_t &term, detail::core_terminal_t &inp); - bool connect_input_input(detail::core_terminal_t &t1, detail::core_terminal_t &t2); + void connect_input_output(detail::core_terminal_t &input, detail::core_terminal_t &output); + void connect_terminal_output(detail::core_terminal_t &terminal, detail::core_terminal_t &output); + void connect_terminal_input(detail::core_terminal_t &terminal, detail::core_terminal_t &input); + bool connect_input_input(detail::core_terminal_t &input1, detail::core_terminal_t &input2); bool connect(detail::core_terminal_t &t1, detail::core_terminal_t &t2); |