mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-03 09:56:38 -05:00
Merge #20067: refactor: remove use of boost::algorithm::replace_first
6f4e393646
refactor: remove use of boost::algorithm::replace_first (Sebastian Falbesoner) Pull request description: As discussed in #19851 (https://github.com/bitcoin/bitcoin/pull/19851#issuecomment-685424702), this trivial PR substitutes the (only) use of `boost::algorithm::replace_first` by a direct implementation. ACKs for top commit: laanwj: Code review ACK6f4e393646
Tree-SHA512: 2ef06498e19f864a4cbae10e8d1905e3440a2d1e8e5aae83de7597c23cdab92b4612d7fa1efbc49016e530debd127d1d50531c60ff159dbea0deaa8c836a2bfb
This commit is contained in:
commit
fbb2bee82d
1 changed files with 3 additions and 3 deletions
|
@ -15,7 +15,6 @@
|
|||
#include <version.h>
|
||||
|
||||
#include <boost/algorithm/string/classification.hpp>
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
|
@ -40,8 +39,9 @@ CScript ParseScript(const std::string& s)
|
|||
continue;
|
||||
mapOpNames[strName] = static_cast<opcodetype>(op);
|
||||
// Convenience: OP_ADD and just ADD are both recognized:
|
||||
boost::algorithm::replace_first(strName, "OP_", "");
|
||||
mapOpNames[strName] = static_cast<opcodetype>(op);
|
||||
if (strName.compare(0, 3, "OP_") == 0) { // strName starts with "OP_"
|
||||
mapOpNames[strName.substr(3)] = static_cast<opcodetype>(op);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue