mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-07 10:21:11 +02:00
refactor: remove use of boost::algorithm::replace_first
This commit is contained in:
parent
d67883d01e
commit
6f4e393646
@ -15,7 +15,6 @@
|
|||||||
#include <version.h>
|
#include <version.h>
|
||||||
|
|
||||||
#include <boost/algorithm/string/classification.hpp>
|
#include <boost/algorithm/string/classification.hpp>
|
||||||
#include <boost/algorithm/string/replace.hpp>
|
|
||||||
#include <boost/algorithm/string/split.hpp>
|
#include <boost/algorithm/string/split.hpp>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@ -40,8 +39,9 @@ CScript ParseScript(const std::string& s)
|
|||||||
continue;
|
continue;
|
||||||
mapOpNames[strName] = static_cast<opcodetype>(op);
|
mapOpNames[strName] = static_cast<opcodetype>(op);
|
||||||
// Convenience: OP_ADD and just ADD are both recognized:
|
// Convenience: OP_ADD and just ADD are both recognized:
|
||||||
boost::algorithm::replace_first(strName, "OP_", "");
|
if (strName.compare(0, 3, "OP_") == 0) { // strName starts with "OP_"
|
||||||
mapOpNames[strName] = static_cast<opcodetype>(op);
|
mapOpNames[strName.substr(3)] = static_cast<opcodetype>(op);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user