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

ap2_dsk.cpp/h: clean up constants #13021

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SpecLad
Copy link
Contributor

@SpecLad SpecLad commented Nov 27, 2024

  • convert #define to constexpr;
  • remove unused constants;
  • replace magic numbers with constants where appropriate.

* convert `#define` to `constexpr`;
* remove unused constants;
* replace magic numbers with constants where appropriate.
if ((data[0x156] != c) || (dpost&0xFFFF00)!=0xDEAA00)
fprintf(stderr,"Data Mark:\tChecksum xpctd %d found %d: %s, Postamble %03X: %s\n", data[0x156], c, (data[0x156]==c)?"OK":"BAD", dpost, (dpost&0xFFFF00)==0xDEAA00?"OK":"BAD");
#endif
if constexpr (VERBOSE_SAVE) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's necessary to prepend these with constexpr, as MAME has the appropriate compiler flags set to handle effective if (0) and if (1) situations without warnings.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but is there any harm in it? I think it's a useful reminder that it's supposed to be a compile-time selection.

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.

2 participants