[moveonly] Extract HelpRequested to dry up the help options testing #12846
pull Empact wants to merge 1 commits into bitcoin:master from Empact:dry-help changing 7 files +14 −9-
Empact commented at 8:54 pm on March 30, 2018: memberThis ensures consistency across interfaces and makes the version handling more clear.
-
fanquake added the label Refactoring on Mar 31, 2018
-
promag commented at 8:31 pm on March 31, 2018: member
utACK 9a7be59.
Just want to point that
HelpRequested
is only called 5 times, IMO it is worth doing this.Just want to throw two ideas:
- how about
gArgs.IsHelpArgSet()
or alike? HelpRequested()
without arguments sincegArgs
is global?
- how about
-
Empact commented at 10:58 pm on March 31, 2018: memberI could go either way on both points.
-
jnewbery commented at 8:49 pm on April 2, 2018: member
utACK 9a7be5971a0794bc7e6338443add75336f2efd91.
I could go either way on both points.
I feel the same way.
-
in src/util.cpp:588 in 9a7be5971a outdated
583@@ -584,7 +584,9 @@ void ArgsManager::ForceSetArg(const std::string& strArg, const std::string& strV 584 mapMultiArgs[strArg] = {strValue}; 585 } 586 587- 588+bool HelpRequested(const ArgsManager& args) { 589+ return args.IsArgSet("-?") || args.IsArgSet("-h") || args.IsArgSet("-help");
ryanofsky commented at 10:14 pm on April 2, 2018:Indentation is off (should use 4 spaces)
MarcoFalke commented at 10:17 pm on April 2, 2018:Note: Don’t forget to installclang-format
and run the https://github.com/bitcoin/bitcoin/tree/master/contrib/devtools#clang-format-diffpy script to preempt whitespace nitpicking.
Empact commented at 10:56 pm on April 2, 2018:Fixed, and thanks - I need to set up a hook for that. :Pryanofsky commented at 10:14 pm on April 2, 2018: memberutACK 9a7be5971a0794bc7e6338443add75336f2efd91[moveonly] Extract HelpRequested to dry up the help options testing
This ensures consistency across interfaces and makes the version handling more clear.
Empact force-pushed on Apr 2, 2018ryanofsky commented at 3:21 pm on April 3, 2018: memberutACK b386970d0750e368d6adc5d0c010ead329b5c7c1. Just whitespace changes since last review.MarcoFalke commented at 3:50 pm on April 3, 2018: memberutACK b386970d0750e368d6adc5d0c010ead329b5c7c1MarcoFalke merged this on Apr 3, 2018MarcoFalke closed this on Apr 3, 2018
MarcoFalke referenced this in commit ad960f5771 on Apr 3, 2018Empact deleted the branch on Apr 4, 2018UdjinM6 referenced this in commit 67615ed417 on May 21, 2021UdjinM6 referenced this in commit d652b03333 on May 21, 2021UdjinM6 referenced this in commit 2eeb9eb51f on May 21, 2021UdjinM6 referenced this in commit 376457d129 on May 22, 2021kittywhiskers referenced this in commit 002c18c926 on May 25, 2021DrahtBot 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: 2024-11-17 09:12 UTC
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-11-17 09:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me