update HelpMessage() #1635

pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:update_helpMessage changing 1 files +6 −7
  1. Diapolo commented at 6:19 AM on July 27, 2012: none
    • place "-?" option at first
    • re-work description and "\n" usage for Gavins new block creation options to better match current description syntax
    • ensure no "\n" is in translated strings, which is better for Transifex
  2. update HelpMessage()
    - place "-?" option at first
    - re-work description and "\n" usage for Gavins new block creation options
      to better match current description syntax
    - ensure no "\n" is in translated strings, which is better for Transifex
    6986c779f0
  3. in src/init.cpp:None in 2c4bb2d334 outdated
     214 | @@ -215,7 +215,11 @@ bool static Bind(const CService &addr, bool fError = true) {
     215 |  // Core-specific options shared between UI and daemon
     216 |  std::string HelpMessage()
     217 |  {
     218 | -    string strUsage = _("Options:") + "\n" +
     219 | +    string strUsage;
     220 | +    strUsage.reserve(10000);
    


    laanwj commented at 10:53 AM on July 27, 2012:

    You don't need to reserve space here, so please don't do it. "Premature optimization is the root of all evil".


    Diapolo commented at 12:01 PM on July 27, 2012:

    I saw this in other places in the code and just wanted to do the same ... thought it would be considered standard in the code base for large strings. I'll revert this one.

    Edit: Updated!


    laanwj commented at 12:58 PM on July 27, 2012:

    Yeah, no problem. That other place you saw it is probably performance-critical, such as building baseX strings etc or messages that get printed all the time.

  4. laanwj referenced this in commit 3c83387c29 on Jul 28, 2012
  5. laanwj merged this on Jul 28, 2012
  6. laanwj closed this on Jul 28, 2012

  7. suprnurd referenced this in commit 753b1e486b on Dec 5, 2017
  8. DrahtBot 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-21 18:16 UTC

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