Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix constness of ArgsManager methods #10901

Merged
merged 1 commit into from Aug 16, 2017

Conversation

promag
Copy link
Member

@promag promag commented Jul 21, 2017

Make cs_args mutex mutable so that const methods can acquire it.

There's also tiny performance improvement by avoiding two map lookups when retrieving an argument value.

@TheBlueMatt
Copy link
Contributor

Can you rebase without #10885 because of #10885 (comment) ?
utACK the last commit by itself.

@promag promag force-pushed the 2017-07-args-manager-constness branch from 771c603 to a622a17 Compare July 24, 2017 22:59
@TheBlueMatt
Copy link
Contributor

utACK a622a17

1 similar comment
@sipa
Copy link
Member

sipa commented Jul 25, 2017

utACK a622a17

@jonasschnelli
Copy link
Contributor

utACK a622a17

@practicalswift
Copy link
Contributor

utACK a622a17 👍

@promag
Copy link
Member Author

promag commented Aug 6, 2017

PR description updated.

@paveljanik
Copy link
Contributor

utACK a622a17

@maflcko maflcko merged commit a622a17 into bitcoin:master Aug 16, 2017
maflcko pushed a commit that referenced this pull request Aug 16, 2017
a622a17 Fix constness of ArgsManager methods (João Barbosa)

Pull request description:

  Make `cs_args` mutex mutable so that const methods can acquire it.

  There's also tiny performance improvement by avoiding two map lookups when retrieving an argument value.

Tree-SHA512: ece58469745f2743b4b643242b51889a3d9c5b76492ed70bb74d4e5b378fff59da79fc129e499da779bf9f488c9435dda17ad1f3a804c1c30f56af422389e8bd
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 19, 2019
a622a17 Fix constness of ArgsManager methods (João Barbosa)

Pull request description:

  Make `cs_args` mutex mutable so that const methods can acquire it.

  There's also tiny performance improvement by avoiding two map lookups when retrieving an argument value.

Tree-SHA512: ece58469745f2743b4b643242b51889a3d9c5b76492ed70bb74d4e5b378fff59da79fc129e499da779bf9f488c9435dda17ad1f3a804c1c30f56af422389e8bd
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 23, 2019
a622a17 Fix constness of ArgsManager methods (João Barbosa)

Pull request description:

  Make `cs_args` mutex mutable so that const methods can acquire it.

  There's also tiny performance improvement by avoiding two map lookups when retrieving an argument value.

Tree-SHA512: ece58469745f2743b4b643242b51889a3d9c5b76492ed70bb74d4e5b378fff59da79fc129e499da779bf9f488c9435dda17ad1f3a804c1c30f56af422389e8bd
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 24, 2019
a622a17 Fix constness of ArgsManager methods (João Barbosa)

Pull request description:

  Make `cs_args` mutex mutable so that const methods can acquire it.

  There's also tiny performance improvement by avoiding two map lookups when retrieving an argument value.

Tree-SHA512: ece58469745f2743b4b643242b51889a3d9c5b76492ed70bb74d4e5b378fff59da79fc129e499da779bf9f488c9435dda17ad1f3a804c1c30f56af422389e8bd
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Nov 19, 2019
a622a17 Fix constness of ArgsManager methods (João Barbosa)

Pull request description:

  Make `cs_args` mutex mutable so that const methods can acquire it.

  There's also tiny performance improvement by avoiding two map lookups when retrieving an argument value.

Tree-SHA512: ece58469745f2743b4b643242b51889a3d9c5b76492ed70bb74d4e5b378fff59da79fc129e499da779bf9f488c9435dda17ad1f3a804c1c30f56af422389e8bd
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Nov 21, 2019
a622a17 Fix constness of ArgsManager methods (João Barbosa)

Pull request description:

  Make `cs_args` mutex mutable so that const methods can acquire it.

  There's also tiny performance improvement by avoiding two map lookups when retrieving an argument value.

Tree-SHA512: ece58469745f2743b4b643242b51889a3d9c5b76492ed70bb74d4e5b378fff59da79fc129e499da779bf9f488c9435dda17ad1f3a804c1c30f56af422389e8bd
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Dec 9, 2019
a622a17 Fix constness of ArgsManager methods (João Barbosa)

Pull request description:

  Make `cs_args` mutex mutable so that const methods can acquire it.

  There's also tiny performance improvement by avoiding two map lookups when retrieving an argument value.

Tree-SHA512: ece58469745f2743b4b643242b51889a3d9c5b76492ed70bb74d4e5b378fff59da79fc129e499da779bf9f488c9435dda17ad1f3a804c1c30f56af422389e8bd
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 1, 2020
a622a17 Fix constness of ArgsManager methods (João Barbosa)

Pull request description:

  Make `cs_args` mutex mutable so that const methods can acquire it.

  There's also tiny performance improvement by avoiding two map lookups when retrieving an argument value.

Tree-SHA512: ece58469745f2743b4b643242b51889a3d9c5b76492ed70bb74d4e5b378fff59da79fc129e499da779bf9f488c9435dda17ad1f3a804c1c30f56af422389e8bd
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 2, 2020
a622a17 Fix constness of ArgsManager methods (João Barbosa)

Pull request description:

  Make `cs_args` mutex mutable so that const methods can acquire it.

  There's also tiny performance improvement by avoiding two map lookups when retrieving an argument value.

Tree-SHA512: ece58469745f2743b4b643242b51889a3d9c5b76492ed70bb74d4e5b378fff59da79fc129e499da779bf9f488c9435dda17ad1f3a804c1c30f56af422389e8bd
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 2, 2020
a622a17 Fix constness of ArgsManager methods (João Barbosa)

Pull request description:

  Make `cs_args` mutex mutable so that const methods can acquire it.

  There's also tiny performance improvement by avoiding two map lookups when retrieving an argument value.

Tree-SHA512: ece58469745f2743b4b643242b51889a3d9c5b76492ed70bb74d4e5b378fff59da79fc129e499da779bf9f488c9435dda17ad1f3a804c1c30f56af422389e8bd
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 2, 2020
a622a17 Fix constness of ArgsManager methods (João Barbosa)

Pull request description:

  Make `cs_args` mutex mutable so that const methods can acquire it.

  There's also tiny performance improvement by avoiding two map lookups when retrieving an argument value.

Tree-SHA512: ece58469745f2743b4b643242b51889a3d9c5b76492ed70bb74d4e5b378fff59da79fc129e499da779bf9f488c9435dda17ad1f3a804c1c30f56af422389e8bd
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 2, 2020
a622a17 Fix constness of ArgsManager methods (João Barbosa)

Pull request description:

  Make `cs_args` mutex mutable so that const methods can acquire it.

  There's also tiny performance improvement by avoiding two map lookups when retrieving an argument value.

Tree-SHA512: ece58469745f2743b4b643242b51889a3d9c5b76492ed70bb74d4e5b378fff59da79fc129e499da779bf9f488c9435dda17ad1f3a804c1c30f56af422389e8bd
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 3, 2020
a622a17 Fix constness of ArgsManager methods (João Barbosa)

Pull request description:

  Make `cs_args` mutex mutable so that const methods can acquire it.

  There's also tiny performance improvement by avoiding two map lookups when retrieving an argument value.

Tree-SHA512: ece58469745f2743b4b643242b51889a3d9c5b76492ed70bb74d4e5b378fff59da79fc129e499da779bf9f488c9435dda17ad1f3a804c1c30f56af422389e8bd
furszy added a commit to PIVX-Project/PIVX that referenced this pull request Oct 28, 2020
4709ff8 remove now unused gArgs wrappers (Fuzzbawls)
cc40f8d Manual prep for gArg wrapper removal (Fuzzbawls)
b3c843c scripted-diff: stop using the gArgs wrappers (Fuzzbawls)
5ce3844 Migrate g_logger fields to gArgs (Fuzzbawls)
72a6f56 Track negated arguments in the argument paser. (Fuzzbawls)
3142e1b Add additional tests for GetBoolArg() (Fuzzbawls)
4aef2f3 Fix constness of ArgsManager methods (Fuzzbawls)
13fd27d Fix indentation after 'Remove redundant calls to gArgs.IsArgSet()' (Fuzzbawls)
a4114f3 Util: Remove redundant calls to gArgs.IsArgSet() (Fuzzbawls)
92e7227 Util: Small improvements in gArgs usage (Fuzzbawls)
a8b26e7 Util: Put mapMultiArgs inside ArgsManager (Fuzzbawls)
d2f2e25 scripted-diff: Util: Encapsulate mapMultiArgs behind gArgs (Fuzzbawls)
b2abc59 Util: Create ArgsManager class... (Fuzzbawls)
8c4d9c5 Add a ForceSetArg method for testing (Fuzzbawls)
59d6529 Lock mapArgs/mapMultiArgs access in util (Fuzzbawls)
f7f2689 Un-expose mapArgs from util.h (Fuzzbawls)
7894b07 Get rid of mapArgs direct access in ZMQ construction (Matt Corallo)
b28789f Introduce (and use) an IsArgSet accessor method (Fuzzbawls)
4d8ecf9 Fix non-const mapMultiArgs[] access after init. (Fuzzbawls)
391388d Remove arguments to ReadConfigFile (Fuzzbawls)

Pull request description:

  This is a cumulation of several upstream backports surrounding the argument parsing code.

  Included here are the following upstream PRs:
  - bitcoin#9243
  - bitcoin#9494
  - bitcoin#10118
  - bitcoin#10901
  - bitcoin#12713
  - bitcoin#10607

  I've also refactored the global logging argument parsing to match, as that was an "out-of-order" PR that was previously backported to match our previous state.

ACKs for top commit:
  random-zebra:
    utACK 4709ff8
  furszy:
    cool encapsulation, utACK 4709ff8 and merging

Tree-SHA512: 74c8dc1b2280b726eff44855e9908f3563d4ef6493f296ebfafe240ac6470bc45cbc75baac614ed59dfda9e1377b7da7d47a695dfc05e364cada2468bb99a258
gades pushed a commit to cosanta/cosanta-core that referenced this pull request Jun 30, 2021
a622a17 Fix constness of ArgsManager methods (João Barbosa)

Pull request description:

  Make `cs_args` mutex mutable so that const methods can acquire it.

  There's also tiny performance improvement by avoiding two map lookups when retrieving an argument value.

Tree-SHA512: ece58469745f2743b4b643242b51889a3d9c5b76492ed70bb74d4e5b378fff59da79fc129e499da779bf9f488c9435dda17ad1f3a804c1c30f56af422389e8bd
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants