Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netlist: fix bug, prepare for future changes and improve readability #9947

Merged
merged 2 commits into from Jun 20, 2022

Conversation

couriersud
Copy link
Contributor

  • 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.

- 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.
- 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 :-(
@couriersud couriersud requested a review from cuavas June 18, 2022 16:42
@couriersud
Copy link
Contributor Author

This PR decreases the use of macros in netlist. The next step will be to make the bodies of netlists, currently contained in NETLIST_START/NETLIST_END brace-enclosed.
Whilst clang-format does about 95% of the job now some results are ugly. But at least consistent.

@couriersud
Copy link
Contributor Author

All checks have passed. No functional changes.

@couriersud couriersud merged commit 0dad442 into mamedev:master Jun 20, 2022
@couriersud couriersud deleted the cpp2 branch June 20, 2022 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant