Skip to content

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Apr 29, 2022

Only single spaces are used, so no need for boost.

Can be tested with:

diff --git a/src/test/getarg_tests.cpp b/src/test/getarg_tests.cpp
index c877105fe7..a834830490 100644
--- a/src/test/getarg_tests.cpp
+++ b/src/test/getarg_tests.cpp
@@ -21,8 +21,11 @@ BOOST_FIXTURE_TEST_SUITE(getarg_tests, BasicTestingSetup)
 void ResetArgs(ArgsManager& local_args, const std::string& strArg)
 {
     std::vector<std::string> vecArg;
-    if (strArg.size())
+    if (strArg.size()) {
         boost::split(vecArg, strArg, IsSpace, boost::token_compress_on);
+        auto vecArg2{SplitString(strArg, ' ')};
+        assert(vecArg2 == vecArg);
+    }
 
     // Insert dummy executable name:
     vecArg.insert(vecArg.begin(), "testbitcoin");

Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

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

utACK fafa727 - After this, the last usage of <boost/algorithm/string.hpp> is in httprpc.cpp.

@DrahtBot DrahtBot added the Tests label Apr 29, 2022
@fanquake fanquake merged commit 23daa86 into bitcoin:master Apr 30, 2022
@maflcko maflcko deleted the 2204-boost-split-less-🚔 branch April 30, 2022 09:54
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Apr 30, 2022
fafa727 test: Remove boost::split from getarg_tests.cpp (MacroFake)

Pull request description:

  Only single spaces are used, so no need for boost.

  Can be tested with:

  ```diff
  diff --git a/src/test/getarg_tests.cpp b/src/test/getarg_tests.cpp
  index c877105..a834830490 100644
  --- a/src/test/getarg_tests.cpp
  +++ b/src/test/getarg_tests.cpp
  @@ -21,8 +21,11 @@ BOOST_FIXTURE_TEST_SUITE(getarg_tests, BasicTestingSetup)
   void ResetArgs(ArgsManager& local_args, const std::string& strArg)
   {
       std::vector<std::string> vecArg;
  -    if (strArg.size())
  +    if (strArg.size()) {
           boost::split(vecArg, strArg, IsSpace, boost::token_compress_on);
  +        auto vecArg2{SplitString(strArg, ' ')};
  +        assert(vecArg2 == vecArg);
  +    }

       // Insert dummy executable name:
       vecArg.insert(vecArg.begin(), "testbitcoin");

ACKs for top commit:
  fanquake:
    utACK fafa727 - After this, the last usage of `<boost/algorithm/string.hpp>` is in `httprpc.cpp`.

Tree-SHA512: 038af095cfb5240216305919cdeeb12d8e3ff0424520b99785bff5353a47dfcacdc049b927d7316b13e17a3c19b5f7549c9db7c4b5f2fa78ff1816515ca28d9d
kwvg added a commit to kwvg/dash that referenced this pull request Jan 19, 2023
@bitcoin bitcoin locked and limited conversation to collaborators Apr 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants