diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2020-10-03 12:55:15 +0200 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2020-10-25 12:29:54 +0100 |
commit | 6f4e3936461d0893250e7684928339f6cedf4d0c (patch) | |
tree | 532b9dd5fc93b86fe618152aedf1e4c584bda5c0 /src/core_read.cpp | |
parent | d67883d01e507dd22d1281f4a4860e79d6a46a47 (diff) |
refactor: remove use of boost::algorithm::replace_first
Diffstat (limited to 'src/core_read.cpp')
-rw-r--r-- | src/core_read.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core_read.cpp b/src/core_read.cpp index 121e62457c..c6416e6f07 100644 --- a/src/core_read.cpp +++ b/src/core_read.cpp @@ -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); + } } } |