prefer const string& over char* in CDB and CWalletDB constructor #4931

pull Diapolo wants to merge 2 commits into bitcoin:master from Diapolo:db changing 4 files +26 −25
  1. Diapolo commented at 1:20 PM on September 16, 2014: none

    2nd commit: cleanup class private and public areas in walletdb

  2. sipa commented at 5:01 PM on September 16, 2014: member

    utACK

  3. jgarzik commented at 5:05 PM on September 16, 2014: contributor

    ut ACK

  4. laanwj commented at 7:08 AM on September 17, 2014: member

    Untested ACK

  5. prefer const string& over char* in CDB and CWalletDB constructor
    - also make parameter of CDBEnv::CheckpointLSN a constant reference
    22d7e7014f
  6. cleanup class private and public areas in walletdb
    - only code movement
    93f84d0417
  7. in src/walletdb.h:None in 7fc7da9179 outdated
      74 | @@ -75,13 +75,10 @@ class CKeyMetadata
      75 |  class CWalletDB : public CDB
      76 |  {
      77 |  public:
      78 | -    CWalletDB(std::string strFilename, const char* pszMode="r+") : CDB(strFilename.c_str(), pszMode)
      79 | +    CWalletDB(std::string strFilename, const char* pszMode = "r+") : CDB(strFilename, pszMode)
    


    laanwj commented at 11:06 AM on September 17, 2014:

    Can also be const std::string& strFilename


    Diapolo commented at 5:11 AM on September 18, 2014:

    Will update...

  8. Diapolo renamed this:
    prefer std::string over char* in CDB constructor
    prefer const string& over char* in CDB and CWalletDB constructor
    on Sep 18, 2014
  9. Diapolo commented at 5:25 AM on September 18, 2014: none

    I updated the CWalletDB constructor to const std::string&, as @laanwj suggested.

  10. BitcoinPullTester commented at 5:34 AM on September 18, 2014: none

    Automatic sanity-testing: FAILED BUILD/TEST, see http://jenkins.bluematt.me/pull-tester/p4931_93f84d0417e8e1c590b405bde6e153b413bd43f2/ for binaries and test log.

    This could happen for one of several reasons:

    1. It chanages paths in makefile.linux-mingw or otherwise changes build scripts in a way that made them incompatible with the automated testing scripts (please tweak those patches in qa/pull-tester)
    2. It adds/modifies tests which test network rules (thanks for doing that), which conflicts with a patch applied at test time
    3. It does not build on either Linux i386 or Win32 (via MinGW cross compile)
    4. The test suite fails on either Linux i386 or Win32
    5. The block test-cases failed (lookup the first bNN identifier which failed in https://github.com/TheBlueMatt/test-scripts/blob/master/FullBlockTestGenerator.java)

    If you believe this to be in error, please ping BlueMatt on freenode or TheBlueMatt here.

    This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  11. Diapolo commented at 5:47 AM on September 18, 2014: none

    @BitcoinPullTester Error was caused by: tail: write error: Broken pipe tail: write error... seems unrelated.

  12. laanwj merged this on Sep 18, 2014
  13. laanwj closed this on Sep 18, 2014

  14. laanwj referenced this in commit e9870c5ed4 on Sep 18, 2014
  15. Diapolo deleted the branch on Sep 18, 2014
  16. MarcoFalke locked this on Sep 8, 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: 2026-04-21 18:15 UTC

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