We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d67883d commit 6f4e393Copy full SHA for 6f4e393
src/core_read.cpp
@@ -15,7 +15,6 @@
15
#include <version.h>
16
17
#include <boost/algorithm/string/classification.hpp>
18
-#include <boost/algorithm/string/replace.hpp>
19
#include <boost/algorithm/string/split.hpp>
20
21
#include <algorithm>
@@ -40,8 +39,9 @@ CScript ParseScript(const std::string& s)
40
39
continue;
41
mapOpNames[strName] = static_cast<opcodetype>(op);
42
// Convenience: OP_ADD and just ADD are both recognized:
43
- boost::algorithm::replace_first(strName, "OP_", "");
44
- 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);
+ }
45
}
46
47
0 commit comments