refactor: Use underlying type of isminetype for isminefilter #23591

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2111-int changing 2 files +7 −6
  1. MarcoFalke commented at 11:14 am on November 25, 2021: member
    This does not change behavior, but it would be good for code clarity and to avoid -Wimplicit-int-conversion compiler warnings to use the an int of the same width for both isminetype and isminefilter.
  2. MarcoFalke added the label Refactoring on Nov 25, 2021
  3. MarcoFalke added the label Wallet on Nov 25, 2021
  4. DrahtBot commented at 1:04 pm on November 25, 2021: member

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    No conflicts as of last run.

  5. promag commented at 1:41 pm on November 25, 2021: member

    Code review ACK fa653d6bdef798ab8aa480e60f255e8631db12be.

    nit, include type_traits.

  6. refactor: Use underlying type of isminetype for isminefilter fa2c991ec9
  7. MarcoFalke force-pushed on Nov 25, 2021
  8. shaavan approved
  9. shaavan commented at 2:00 pm on November 25, 2021: contributor
    crACK fa2c991ec93bc72d276f0dcd747b3e57c246139b
  10. promag commented at 2:11 pm on November 25, 2021: member
    Code review ACK fa2c991ec93bc72d276f0dcd747b3e57c246139b.
  11. in src/wallet/ismine.h:49 in fa2c991ec9
    45@@ -46,7 +46,7 @@ enum isminetype : unsigned int
    46     ISMINE_ENUM_ELEMENTS,
    47 };
    48 /** used for bitflags of isminetype */
    49-typedef uint8_t isminefilter;
    50+using isminefilter = std::underlying_type<isminetype>::type;
    


    laanwj commented at 12:01 pm on November 29, 2021:
    This type is never stored in large quantities, so changing the size from 1 to 4 bytes is uncontroversial.
  12. laanwj commented at 12:02 pm on November 29, 2021: member
    Code review ACK fa2c991ec93bc72d276f0dcd747b3e57c246139b
  13. laanwj merged this on Nov 29, 2021
  14. laanwj closed this on Nov 29, 2021

  15. MarcoFalke deleted the branch on Nov 29, 2021
  16. sidhujag referenced this in commit 1d3914215f on Nov 29, 2021
  17. RandyMcMillan referenced this in commit 716f63e827 on Dec 23, 2021
  18. DrahtBot locked this on Nov 29, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 21:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me