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

scripted-diff: Remove BOOST_FOREACH, Q_FOREACH and PAIRTYPE #10502

Merged
merged 4 commits into from Jun 14, 2017

Conversation

6 participants
@jtimon
Copy link
Member

jtimon commented Jun 1, 2017

Separated from #10193 since the reverse iterator isn't working there, as suggested in #10193 (comment) (but without removing #include <boost/foreach.hpp> everywhere except where BOOST_REVERSE_FOREACH is needed).

Seems to compete with #10497

@practicalswift

This comment has been minimized.

Copy link
Member

practicalswift commented Jun 1, 2017

utACK 9eafbf2

Excellent work! I ❤️ modern C++

@jtimon jtimon force-pushed the jtimon:b15-boost-foreach branch Jun 1, 2017

@jtimon

This comment has been minimized.

Copy link
Member Author

jtimon commented Jun 1, 2017

Added one small preparation commit since not all environments where passing travis.

@fanquake fanquake added this to In progress in Boost → C++11 migration Jun 2, 2017

@jtimon jtimon force-pushed the jtimon:b15-boost-foreach branch Jun 2, 2017

@jtimon

This comment has been minimized.

Copy link
Member Author

jtimon commented Jun 2, 2017

Needed rebase after #10195. Just run the sed scripts again. Review should be as simple as it was, more or less.

jtimon added some commits Jun 1, 2017

scripted-diff: Fully remove BOOST_FOREACH
-BEGIN VERIFY SCRIPT-
sed -i 's/BOOST_FOREACH *(\(.*\),/for (\1 :/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ;
-END VERIFY SCRIPT-
scripted-diff: Remove Q_FOREACH
-BEGIN VERIFY SCRIPT-
sed -i 's/Q_FOREACH *(\(.*\),/for (\1 :/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ;
-END VERIFY SCRIPT-
scripted-diff: Remove PAIRTYPE
-BEGIN VERIFY SCRIPT-
sed -i 's/PAIRTYPE(\([^,]*\), \([^\)]*\))/std::pair<\1, \2>/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ;
sed -i ':a;N;$!ba;s/#define std::pair<t1, t2>    std::pair<t1, t2>\n//' ./src/utilstrencodings.h ;
-END VERIFY SCRIPT-

@jtimon jtimon force-pushed the jtimon:b15-boost-foreach branch to 1238f13 Jun 5, 2017

@jtimon

This comment has been minimized.

Copy link
Member Author

jtimon commented Jun 5, 2017

Needed rebase again(2)

@sipa

This comment has been minimized.

Copy link
Member

sipa commented Jun 5, 2017

Concept ACK. Nit: you can add a commit that removes the #include <boost/foreach.hpp> directives.

@jtimon

This comment has been minimized.

Copy link
Member Author

jtimon commented Jun 5, 2017

you can add a commit that removes the #include <boost/foreach.hpp> directives.

But not in the whole project yet, because I'm not able to remove BOOST_REVERSE_FOREACH yet, see #10193 on top of this one. I can remove it only on the files that I can for now.

@ryanofsky
Copy link
Contributor

ryanofsky left a comment

utACK 1238f13. Seems fine to remove includes in a followup pr as long as some of them are still needed for reverse iteration.

@theuni

This comment has been minimized.

Copy link
Member

theuni commented Jun 13, 2017

nice, utACK 1238f13.

@sipa sipa merged commit 1238f13 into bitcoin:master Jun 14, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

sipa added a commit that referenced this pull request Jun 14, 2017

Merge #10502: scripted-diff: Remove BOOST_FOREACH, Q_FOREACH and PAIR…
…TYPE

1238f13 scripted-diff: Remove PAIRTYPE (Jorge Timón)
18dc3c3 scripted-diff: Remove Q_FOREACH (Jorge Timón)
7c00c26 scripted-diff: Fully remove BOOST_FOREACH (Jorge Timón)
a5410ac Small preparations for Q_FOREACH, PAIRTYPE and #include <boost/foreach.hpp> removal (Jorge Timón)

Tree-SHA512: d3ab4a173366402e7dcef31608977b757d4aa07abbbad2ee1bcbcfa311e994a4552f24e5a55272cb22c2dcf89a4b0495e02e9d9aceae4b08c0bab668f20e324c
@sipa

This comment has been minimized.

Copy link
Member

sipa commented Jun 14, 2017

utACK 1238f13

@fanquake fanquake moved this from In progress to Done in Boost → C++11 migration Jun 14, 2017

@jtimon jtimon referenced this pull request Jun 14, 2017

Merged

Util: Remove redundant calls to argsGlobal.IsArgSet() #10118

1 of 1 task complete

@jtimon jtimon deleted the jtimon:b15-boost-foreach branch Jun 14, 2017

@jtimon jtimon referenced this pull request Jul 13, 2017

Closed

TODO for release notes 0.15.0 #9889

12 of 12 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.