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

[Cleanup] Use C++11 nullptr instead of NULL #2266

Merged
merged 1 commit into from
Mar 6, 2023

Conversation

Fuzzbawls
Copy link
Collaborator

Scripted diff to replace all NULL macros with the C++11 nullptr keyword

-BEGIN VERIFY SCRIPT-
sed -i 's/\<NULL\>/nullptr/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h src/qt/*/*.cpp src/qt/*/*.h src/qt/pivx/*/*.cpp src/qt/pivx/*/*.h src/wallet/*/*.cpp src/test/*/*.cpp src/wallet/*/*.h
sed -i 's/Prefer nullptr, otherwise SAFECOOKIE./Prefer NULL, otherwise SAFECOOKIE./g' src/torcontrol.cpp
sed -i 's/tor: Using nullptr authentication/tor: Using NULL authentication/g' src/torcontrol.cpp
sed -i 's/METHODS=nullptr/METHODS=NULL/g' src/test/torcontrol_tests.cpp src/torcontrol.cpp
sed -i 's/nullptr certificates/NULL certificates/g' src/qt/paymentserver.cpp
sed -i 's/"nullptr"/"NULL"/g' src/torcontrol.cpp src/test/torcontrol_tests.cpp
-END VERIFY SCRIPT-

@Fuzzbawls Fuzzbawls added this to the Future milestone Mar 25, 2021
@Fuzzbawls Fuzzbawls self-assigned this Mar 25, 2021
@random-zebra random-zebra modified the milestones: Future, 6.0.0 Mar 25, 2021
random-zebra
random-zebra previously approved these changes Apr 3, 2021
Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK a3346e2

@furszy furszy modified the milestones: 5.3.0, 6.0.0 Jul 30, 2021
PeterL73
PeterL73 previously approved these changes Nov 7, 2022
Copy link

@PeterL73 PeterL73 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK 54e1168

Nit: src/qt/paymentserver.cpp does not contain NULL certificates so sed -i 's/nullptr certificates/NULL certificates/g' src/qt/paymentserver.cpp could be skipped

panleone
panleone previously approved these changes Mar 4, 2023
Copy link

@panleone panleone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK a3346e2

-BEGIN VERIFY SCRIPT-
sed -i 's/\<NULL\>/nullptr/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h src/qt/*/*.cpp src/qt/*/*.h src/qt/pivx/*/*.cpp src/qt/pivx/*/*.h src/wallet/*/*.cpp src/test/*/*.cpp src/wallet/*/*.h
sed -i 's/Prefer nullptr, otherwise SAFECOOKIE./Prefer NULL, otherwise SAFECOOKIE./g' src/torcontrol.cpp
sed -i 's/tor: Using nullptr authentication/tor: Using NULL authentication/g' src/torcontrol.cpp
sed -i 's/METHODS=nullptr/METHODS=NULL/g' src/test/torcontrol_tests.cpp src/torcontrol.cpp
sed -i 's/nullptr certificates/NULL certificates/g' src/qt/paymentserver.cpp
sed -i 's/"nullptr"/"NULL"/g' src/torcontrol.cpp src/test/torcontrol_tests.cpp
-END VERIFY SCRIPT-
@Fuzzbawls
Copy link
Collaborator Author

rebased on current master branch to resolve conflicts. lets prioritize this one so I don't have to keep rebasing it further. Scripted-diff single commit should be an easy review.

Copy link

@panleone panleone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-utACK 58e254e
changes are consistent with the script

Copy link
Member

@Liquid369 Liquid369 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK 58e254e

@Fuzzbawls Fuzzbawls merged commit 8b98370 into PIVX-Project:master Mar 6, 2023
@Fuzzbawls Fuzzbawls modified the milestones: 6.0.0, 5.6.0 Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants