Make use of emplace in nonassociative containers. #12183

pull ghost wants to merge 1 commits into bitcoin:master from changing 22 files +78 −78
  1. ghost commented at 5:43 PM on January 14, 2018: none

    No description provided.

  2. Make use of emplace_back in nonassociative containers. 2c5700e0de
  3. unknown renamed this:
    Make use of emplace_back in nonassociative containers.
    Make use of emplace in nonassociative containers.
    on Jan 14, 2018
  4. MarcoFalke added the label Refactoring on Jan 14, 2018
  5. donaloconnor commented at 5:06 PM on January 20, 2018: contributor

    utACK

    I had a look through all these changes and couldn't see any of the potential edge cases where this can lead to a change of behaviour (Eg: calling an explicit ctor instead of an implicit as push_back does).

  6. in src/bitcoin-tx.cpp:548 in 2c5700e0de
     545 | @@ -546,7 +546,7 @@ static void MutateTxSign(CMutableTransaction& tx, const std::string& flagStr)
     546 |              throw std::runtime_error("unknown sighash flag/sign option");
     547 |  
     548 |      std::vector<CTransaction> txVariants;
    


    eklitzke commented at 9:21 AM on March 11, 2018:

    why not

    std::vector<CTransactoin> txVariants{tx};
    
  7. in src/qt/rpcconsole.cpp:149 in 2c5700e0de
     146 | @@ -147,7 +147,7 @@ class QtRPCTimerInterface: public RPCTimerInterface
     147 |  bool RPCConsole::RPCParseCommandLine(std::string &strResult, const std::string &strCommand, const bool fExecute, std::string * const pstrFilteredOut)
     148 |  {
     149 |      std::vector< std::vector<std::string> > stack;
    


    eklitzke commented at 9:22 AM on March 11, 2018:

    same, just initialize the data element in the ctor

  8. laanwj commented at 9:09 PM on March 29, 2018: member

    Needs rebase, and addressing @eklitzke 's comments.

  9. laanwj commented at 12:29 PM on April 26, 2018: member

    Going to close this as it seems to be inactive, let me know if you want to pick it up again then I'll reopen.

  10. laanwj closed this on Apr 26, 2018

  11. DrahtBot 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-17 15:15 UTC

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