From 9af3760ae31b5be146e2f5731761635168a873d7 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kittywhiskers@users.noreply.github.com> Date: Sat, 3 Oct 2020 12:55:15 +0200 Subject: [PATCH] merge #20067: remove use of boost::algorithm::replace_first --- src/core_read.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core_read.cpp b/src/core_read.cpp index 0eba29a5cd..a98e9e046a 100644 --- a/src/core_read.cpp +++ b/src/core_read.cpp @@ -16,7 +16,6 @@ #include #include -#include #include #include @@ -41,8 +40,9 @@ CScript ParseScript(const std::string& s) std::string strName(name); mapOpNames[strName] = static_cast(op); // Convenience: OP_ADD and just ADD are both recognized: - boost::algorithm::replace_first(strName, "OP_", ""); - mapOpNames[strName] = static_cast(op); + if (strName.compare(0, 3, "OP_") == 0) { // strName starts with "OP_" + mapOpNames[strName.substr(3)] = static_cast(op); + } } }