Use override in CCoinsView* subclasses #11751

pull jamesob wants to merge 2 commits into bitcoin:master from jamesob:add-override-coins changing 3 files +11 −11
  1. jamesob commented at 2:41 PM on November 22, 2017: member

    Add the override keyword where applicable on derived classes from coins.h.

    Using the override keyword on suitable subclass member functions gives us compile-time assurance that we haven't unknowingly deviated from the signature of base class functions we're trying to override. This avoids situations where calls to "overridden" functions on a derived class actually go to the base class implementation due to potentially subtle differences (e.g. const-ness of arguments).

    If others think this is a worthwhile change, I plan on doing this in other applicable regions of the codebase in followup PRs, though I'd be happy to fold all changes into a single PR if that's preferable.

  2. Use override in CCoinsViewCursor subclasses aa864f5262
  3. Use override in CCoinsView subclasses 6b895eefcb
  4. fanquake added the label Refactoring on Nov 22, 2017
  5. fanquake commented at 2:44 PM on November 22, 2017: member

    Needs a rebase.

  6. jamesob commented at 5:01 PM on November 22, 2017: member

    Changes disappeared after rebasing -- my local master was ancient. :blush:

    Sorry for the noise.

  7. jamesob closed this on Nov 22, 2017

  8. MarcoFalke locked this on Sep 8, 2021
Contributors

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: 2026-04-22 06:15 UTC

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