[refactor] Remove using namespace from wallet/ & util* #9643

pull kallewoof wants to merge 2 commits into bitcoin:master from kallewoof:no-using-namespace-wallet-util changing 10 files +349 −368
  1. kallewoof commented at 8:18 am on January 27, 2017: member

    This is a sub-set of #9235, including only the wallet dir and util* files.

    Same-binaries check (2017-03-08):

     0$ ../bitcoin-maintainer-tools/build-for-compare.py 6996e066b538f03b8aa1f617dbb959b57ff6e727 a57845c20e96825f1256e6b7f46d67d205c859e0 --executables "src/bitcoind,src/bitcoin-cli,src/bitcoin-tx"
     1[...]
     2make[1]: Leaving directory '/tmp/repo/src'
     3>>> [do_build] Copying object files...
     4>>> [do_build] Performing basic analysis pass...
     5>>> [do_build] Use these commands to compare results:
     6>>> [do_build] $ sha256sum /tmp/compare/*.stripped
     7>>> [do_build] $ git diff -W --word-diff /tmp/compare/6996e066b538f03b8aa1f617dbb959b57ff6e727 /tmp/compare/a57845c20e96825f1256e6b7f46d67d205c859e0
     8$ sha256sum /tmp/compare/*.stripped
     91bfe4311525db52b9c5d5c2b0b9ff6f8e3f3cfda0dcb1e5cd83b08b767a4a902  /tmp/compare/bitcoin-cli.6996e066b538f03b8aa1f617dbb959b57ff6e727.stripped
    101bfe4311525db52b9c5d5c2b0b9ff6f8e3f3cfda0dcb1e5cd83b08b767a4a902  /tmp/compare/bitcoin-cli.a57845c20e96825f1256e6b7f46d67d205c859e0.stripped
    11fb0f6796776dc39e422910572a216cbad87f607cbb4920bd12d2c483cc51e231  /tmp/compare/bitcoind.6996e066b538f03b8aa1f617dbb959b57ff6e727.stripped
    12fb0f6796776dc39e422910572a216cbad87f607cbb4920bd12d2c483cc51e231  /tmp/compare/bitcoind.a57845c20e96825f1256e6b7f46d67d205c859e0.stripped
    13fe4107fcc49ba17cdfbb0edc357373ea37d833d5691af7b2367758e8b3e1d45c  /tmp/compare/bitcoin-tx.6996e066b538f03b8aa1f617dbb959b57ff6e727.stripped
    14fe4107fcc49ba17cdfbb0edc357373ea37d833d5691af7b2367758e8b3e1d45c  /tmp/compare/bitcoin-tx.a57845c20e96825f1256e6b7f46d67d205c859e0.stripped
    15$ git diff -W --word-diff /tmp/compare/6996e066b538f03b8aa1f617dbb959b57ff6e727 /tmp/compare/a57845c20e96825f1256e6b7f46d67d205c859e0
    16$ 
    

    The affected files and namespaces:

    0util.cpp:                 std
    1utilmoneystr.cpp:         std
    2utilstrencodings.cpp:     std
    3utiltime.cpp:             std [unused]
    4wallet/db.cpp:            std
    5wallet/rpcdump.cpp:       std
    6wallet/rpcwallet.cpp:     std
    7wallet/test/wallet_tests.cpp: std
    8wallet/wallet.cpp:        std
    9wallet/walletdb.cpp:      std
    
  2. fanquake added the label Refactoring on Jan 27, 2017
  3. in src/util.cpp: in d1382db42d outdated
     96@@ -97,15 +97,15 @@ namespace boost {
     97 
     98 } // namespace boost
     99 
    100-using namespace std;
    101+// blank space for binary match
    


    dcousens commented at 9:07 am on January 27, 2017:
    ?

    kallewoof commented at 9:09 am on January 27, 2017:
    The binary check tool trips over the LOCK macros. If a line is removed, the binary check ends up failing.

    kallewoof commented at 9:18 am on January 27, 2017:
    In hindsight I realize that comment is very unhelpful. I removed it.
  4. kallewoof force-pushed on Jan 30, 2017
  5. in src/util.cpp: in df8b24992f outdated
     96@@ -97,15 +97,15 @@ namespace boost {
     97 
     98 } // namespace boost
     99 
    100-using namespace std;
    101+
    


    jtimon commented at 0:50 am on February 24, 2017:
    Bike-shedding: you could just remove the line.

    kallewoof commented at 3:59 am on February 24, 2017:
    Because of macros which use the line number, removing this line breaks the same-binaries-check, unfortunately.
  6. jtimon commented at 1:58 am on February 24, 2017: contributor
    utACK df8b249 Needs rebase
  7. kallewoof force-pushed on Feb 24, 2017
  8. kallewoof commented at 4:39 am on February 24, 2017: member
    Rebased & redid same-binaries check.
  9. laanwj commented at 6:21 am on March 8, 2017: member
    Needs another rebase, sorry.
  10. laanwj assigned laanwj on Mar 8, 2017
  11. Refactor: Remove using namespace <xxx> from wallet/ 8a5228197c
  12. Refactor: Remove using namespace <xxx> from util* a57845c20e
  13. kallewoof force-pushed on Mar 8, 2017
  14. kallewoof commented at 4:56 pm on March 8, 2017: member
    @laanwj Rebased & redid same binaries check (6996e066b538f03b8aa1f617dbb959b57ff6e727 vs a57845c20e96825f1256e6b7f46d67d205c859e0). And no worries at all. I knew this might take awhile. :)
  15. laanwj merged this on Mar 9, 2017
  16. laanwj closed this on Mar 9, 2017

  17. laanwj referenced this in commit c047b1663d on Mar 9, 2017
  18. UdjinM6 referenced this in commit 08b5c69eff on Feb 21, 2018
  19. PastaPastaPasta referenced this in commit 3e5713dc69 on Jan 2, 2019
  20. PastaPastaPasta referenced this in commit ad905605a1 on Jan 2, 2019
  21. PastaPastaPasta referenced this in commit 0bc97b2b13 on Jan 2, 2019
  22. PastaPastaPasta referenced this in commit b382e7280e on Jan 3, 2019
  23. andvgal referenced this in commit fd08ebaf3d on Jan 6, 2019
  24. PastaPastaPasta referenced this in commit 0721435a91 on Jan 21, 2019
  25. PastaPastaPasta referenced this in commit 846ef4b889 on Jan 27, 2019
  26. PastaPastaPasta referenced this in commit 3e3abac64d on Jan 29, 2019
  27. CryptoCentric referenced this in commit d191e6b4db on Feb 28, 2019
  28. kallewoof deleted the branch on Oct 17, 2019
  29. DrahtBot locked this on Dec 16, 2021

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-09-20 22:12 UTC

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