-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Qt: Replace remaining 0 with nullptr #15114
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
Qt: Replace remaining 0 with nullptr #15114
Conversation
1667746 to
60a2a0b
Compare
src/wallet/db.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Concept ACK. |
src/qt/addresstablemodel.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/qt/utilitydialog.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Rationale? Changing code style stuff for no reason isn't useful... |
|
Concept ACK |
|
@luke-jr The change @Empact is suggesting is not a code style change. Reasons to use
Enabling |
|
utACK 60a2a0b24275757dee767deafadd86d24889bdf8 |
|
utACK 60a2a0b24275757dee767deafadd86d24889bdf8. |
|
Concept ACK, agree it improves code. I don't think this should be merged without something to prevent more zero-as-null-pointer. |
I agree, as discussed many times, we don't want PR after PR fixing 'straggler' occurrences. It's not that important that it warrants some kind of crusade. But if #15112 enables failing the build on this I'm okay with that and they should probably be merged together. |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
…ant) Qt-only changes.
Also used type-appropriate enum values such as Qt::NoItemFlags in some cases. All cases identified via -Wzero-as-null-pointer-constant
60a2a0b to
3a0e76f
Compare
|
Rebased for #13216 |
|
utACK 3a0e76f |
1 similar comment
|
utACK 3a0e76f |
3a0e76f Replace remaining 0 with nullptr in Qt code (Ben Woosley) 9096276 Don't use zero as null pointer constant (-Wzero-as-null-pointer-constant) (practicalswift) Pull request description: This corrects all violations of `-Wzero-as-null-pointer-constant` identified in the Qt codebase. These changes are extracted from bitcoin#15112 as suggested by @MarcoFalke to ease review. This is in service of enabling `-Wzero-as-null-pointer-constant`, which should eliminate this as a concern going forward. Note there are 2 non-Qt changes: `src/test/allocator_tests.cpp` and `src/wallet/db.cpp`. Tree-SHA512: 206bd668802147ba42bc413c2d7d259cb59aca9ec1da74a6bf2ca3932e60ae492faacbc61bcee0fd6b4b49a4d59d075b7e5404f0526b36c47718f9b0587e7768
Summary: 3a0e76fc12b91b2846d756981e15f09b767a9c37 Replace remaining 0 with nullptr in Qt code (Ben Woosley) 9096276e0b2d5b7e19af9a5f3c144ef108ee55e0 Don't use zero as null pointer constant (-Wzero-as-null-pointer-constant) (practicalswift) --- Pull request description: This corrects all violations of `-Wzero-as-null-pointer-constant` identified in the Qt codebase. These changes are extracted from #15112 as suggested by @MarcoFalke to ease review. This is in service of enabling `-Wzero-as-null-pointer-constant`, which should eliminate this as a concern going forward. Note there are 2 non-Qt changes: `src/test/allocator_tests.cpp` and `src/wallet/db.cpp`. --- This is a backport from Core [[bitcoin/bitcoin#15114 | PR15114]] (bitcoin/bitcoin#15114) Test Plan: ninja check ninja check-functional Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D5341
Summary: 3a0e76fc12b91b2846d756981e15f09b767a9c37 Replace remaining 0 with nullptr in Qt code (Ben Woosley) 9096276e0b2d5b7e19af9a5f3c144ef108ee55e0 Don't use zero as null pointer constant (-Wzero-as-null-pointer-constant) (practicalswift) --- Pull request description: This corrects all violations of `-Wzero-as-null-pointer-constant` identified in the Qt codebase. These changes are extracted from #15112 as suggested by @MarcoFalke to ease review. This is in service of enabling `-Wzero-as-null-pointer-constant`, which should eliminate this as a concern going forward. Note there are 2 non-Qt changes: `src/test/allocator_tests.cpp` and `src/wallet/db.cpp`. --- This is a backport from Core [[bitcoin/bitcoin#15114 | PR15114]] (bitcoin/bitcoin#15114) Test Plan: ninja check ninja check-functional Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D5341
3a0e76f Replace remaining 0 with nullptr in Qt code (Ben Woosley) 9096276 Don't use zero as null pointer constant (-Wzero-as-null-pointer-constant) (practicalswift) Pull request description: This corrects all violations of `-Wzero-as-null-pointer-constant` identified in the Qt codebase. These changes are extracted from bitcoin#15112 as suggested by @MarcoFalke to ease review. This is in service of enabling `-Wzero-as-null-pointer-constant`, which should eliminate this as a concern going forward. Note there are 2 non-Qt changes: `src/test/allocator_tests.cpp` and `src/wallet/db.cpp`. Tree-SHA512: 206bd668802147ba42bc413c2d7d259cb59aca9ec1da74a6bf2ca3932e60ae492faacbc61bcee0fd6b4b49a4d59d075b7e5404f0526b36c47718f9b0587e7768
3a0e76f Replace remaining 0 with nullptr in Qt code (Ben Woosley) 9096276 Don't use zero as null pointer constant (-Wzero-as-null-pointer-constant) (practicalswift) Pull request description: This corrects all violations of `-Wzero-as-null-pointer-constant` identified in the Qt codebase. These changes are extracted from bitcoin#15112 as suggested by @MarcoFalke to ease review. This is in service of enabling `-Wzero-as-null-pointer-constant`, which should eliminate this as a concern going forward. Note there are 2 non-Qt changes: `src/test/allocator_tests.cpp` and `src/wallet/db.cpp`. Tree-SHA512: 206bd668802147ba42bc413c2d7d259cb59aca9ec1da74a6bf2ca3932e60ae492faacbc61bcee0fd6b4b49a4d59d075b7e5404f0526b36c47718f9b0587e7768
This corrects all violations of
-Wzero-as-null-pointer-constantidentified in the Qt codebase.These changes are extracted from #15112 as suggested by @MarcoFalke to ease review. This is in service of enabling
-Wzero-as-null-pointer-constant, which should eliminate this as a concern going forward.Note there are 2 non-Qt changes:
src/test/allocator_tests.cppandsrc/wallet/db.cpp.