refactor: Avoid duplicate map lookup in ScriptToAsmStr #19852

pull promag wants to merge 1 commits into bitcoin:master from promag:2020-08-scripttoasmstr changing 1 files +3 −2
  1. promag commented at 9:32 PM on August 31, 2020: member

    Simple change that avoids a duplicate (unnecessary) mapSigHashTypes lookup.

  2. DrahtBot added the label Refactoring on Aug 31, 2020
  3. theStack approved
  4. theStack commented at 12:02 PM on September 1, 2020: member

    utACK ad8cfbf3f113fa07b07e445ceb69c790c7e732a4 nit: would prefer naming the iterator 'it' over 'i', as the latter mostly implies an (integer) index

  5. laanwj commented at 9:52 AM on September 3, 2020: member

    Code review ACK ad8cfbf3f113fa07b07e445ceb69c790c7e732a4 I think this is slightly better code, not so much because it avoids duplication, but because it avoids an error prone "blind" mapSigHashTypes.find(chSigHashType)->.

    nit: would prefer naming the iterator 'it' over 'i', as the latter mostly implies an (integer) index

    agree

  6. Empact commented at 8:23 PM on September 3, 2020: member
  7. refactor: Avoid duplicate map lookup in ScriptToAsmStr ac2ff4fb1e
  8. promag force-pushed on Sep 4, 2020
  9. promag commented at 9:27 AM on September 4, 2020: member

    Now const auto it.

  10. laanwj commented at 1:48 PM on September 4, 2020: member

    re-ACK ac2ff4fb1e06270cf17727f90599c9f3a55ddd5a

  11. MarcoFalke merged this on Sep 5, 2020
  12. MarcoFalke closed this on Sep 5, 2020

  13. promag deleted the branch on Oct 26, 2020
  14. PastaPastaPasta referenced this in commit fe65268ee5 on Jun 27, 2021
  15. PastaPastaPasta referenced this in commit 662c0831ad on Jun 28, 2021
  16. PastaPastaPasta referenced this in commit 7efe7b6941 on Jun 29, 2021
  17. PastaPastaPasta referenced this in commit 3fc1d6f7da on Jul 1, 2021
  18. PastaPastaPasta referenced this in commit d4529e4049 on Jul 1, 2021
  19. PastaPastaPasta referenced this in commit 60a94d8683 on Jul 15, 2021
  20. PastaPastaPasta referenced this in commit 64c0ce9401 on Jul 16, 2021
  21. Fabcien referenced this in commit 4f435c47c3 on Sep 23, 2021
  22. DrahtBot locked this on Feb 15, 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: 2026-04-22 00:14 UTC

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