Skip to content

Conversation

@paveljanik
Copy link
Contributor

After #10193, approx. five instances of this warning are printed when compiling with -Wshadow:

In file included from txmempool.cpp:14:
./reverse_iterator.h:20:22: warning: declaration shadows a field of 'reverse_range<T>' [-Wshadow]
    reverse_range(T &x) : x(x) {}
                     ^
./reverse_iterator.h:17:8: note: previous declaration is here
    T &x;
       ^
1 warning generated.

@sipa
Copy link
Member

sipa commented Jul 15, 2017

If you're going to change this anyway, would you mind switching to the style guidelines? (m_x for the field, x for the parameter).

@paveljanik paveljanik force-pushed the 20170715_Wshadow_reverseiterator branch from bef7672 to 4d4fb33 Compare July 15, 2017 19:20
@paveljanik
Copy link
Contributor Author

paveljanik commented Jul 15, 2017

@sipa Like this?

Any other issue with the file?

@paveljanik paveljanik changed the title Do not shadow a field of 'reverse_range<T>' Rename member field according to the style guide Jul 15, 2017
@practicalswift
Copy link
Contributor

utACK 4d4fb33

Nice!

@meshcollider
Copy link
Contributor

utACK 4d4fb33

@TheBlueMatt
Copy link
Contributor

utACK 4d4fb33

@fanquake
Copy link
Member

fanquake commented Aug 9, 2017

utACK 4d4fb33

@maflcko
Copy link
Member

maflcko commented Aug 9, 2017

utACK 4d4fb33. This gives the same binaries and does not conflict with any open pull request tagged for 0.15, so should be fine to merge.

@maflcko maflcko merged commit 4d4fb33 into bitcoin:master Aug 9, 2017
maflcko pushed a commit that referenced this pull request Aug 9, 2017
4d4fb33 Rename member field according to the style guide. (Pavel Janík)

Pull request description:

  After #10193, approx. five instances of this warning are printed when compiling with `-Wshadow`:

  ```
  In file included from txmempool.cpp:14:
  ./reverse_iterator.h:20:22: warning: declaration shadows a field of 'reverse_range<T>' [-Wshadow]
      reverse_range(T &x) : x(x) {}
                       ^
  ./reverse_iterator.h:17:8: note: previous declaration is here
      T &x;
         ^
  1 warning generated.
  ```

Tree-SHA512: 6c07c2ed6f4f232a3a8bdcdd6057040967c74552fd29d80f42e8a453b95baf203c410aa31dccc08ff2e765cbba02b1a282f6ea7804955f09b31ab20ef383792e
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 8, 2019
4d4fb33 Rename member field according to the style guide. (Pavel Janík)

Pull request description:

  After bitcoin#10193, approx. five instances of this warning are printed when compiling with `-Wshadow`:

  ```
  In file included from txmempool.cpp:14:
  ./reverse_iterator.h:20:22: warning: declaration shadows a field of 'reverse_range<T>' [-Wshadow]
      reverse_range(T &x) : x(x) {}
                       ^
  ./reverse_iterator.h:17:8: note: previous declaration is here
      T &x;
         ^
  1 warning generated.
  ```

Tree-SHA512: 6c07c2ed6f4f232a3a8bdcdd6057040967c74552fd29d80f42e8a453b95baf203c410aa31dccc08ff2e765cbba02b1a282f6ea7804955f09b31ab20ef383792e
@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.

7 participants