diff --git a/src/base58.cpp b/src/base58.cpp index f9165ed55f..cab99f0cb5 100644 --- a/src/base58.cpp +++ b/src/base58.cpp @@ -139,7 +139,7 @@ std::string EncodeBase58Check(Span input) // add 4-byte hash check to the end std::vector vch(input.begin(), input.end()); uint256 hash = Hash(vch); - vch.insert(vch.end(), (unsigned char*)&hash, (unsigned char*)&hash + 4); + vch.insert(vch.end(), hash.data(), hash.data() + 4); return EncodeBase58(vch); } diff --git a/src/script/miniscript.h b/src/script/miniscript.h index e739d8031f..75f978457c 100644 --- a/src/script/miniscript.h +++ b/src/script/miniscript.h @@ -1798,7 +1798,7 @@ inline NodeRef Parse(Span in, const Ctx& ctx) // Get threshold int next_comma = FindNextChar(in, ','); if (next_comma < 1) return false; - const auto k_to_integral{ToIntegral(std::string_view(in.begin(), next_comma))}; + const auto k_to_integral{ToIntegral(std::string_view(in.data(), next_comma))}; if (!k_to_integral.has_value()) return false; const int64_t k{k_to_integral.value()}; in = in.subspan(next_comma + 1); @@ -1954,7 +1954,7 @@ inline NodeRef Parse(Span in, const Ctx& ctx) } else if (Const("after(", in)) { int arg_size = FindNextChar(in, ')'); if (arg_size < 1) return {}; - const auto num{ToIntegral(std::string_view(in.begin(), arg_size))}; + const auto num{ToIntegral(std::string_view(in.data(), arg_size))}; if (!num.has_value() || *num < 1 || *num >= 0x80000000L) return {}; constructed.push_back(MakeNodeRef(internal::NoDupCheck{}, ctx.MsContext(), Fragment::AFTER, *num)); in = in.subspan(arg_size + 1); @@ -1962,7 +1962,7 @@ inline NodeRef Parse(Span in, const Ctx& ctx) } else if (Const("older(", in)) { int arg_size = FindNextChar(in, ')'); if (arg_size < 1) return {}; - const auto num{ToIntegral(std::string_view(in.begin(), arg_size))}; + const auto num{ToIntegral(std::string_view(in.data(), arg_size))}; if (!num.has_value() || *num < 1 || *num >= 0x80000000L) return {}; constructed.push_back(MakeNodeRef(internal::NoDupCheck{}, ctx.MsContext(), Fragment::OLDER, *num)); in = in.subspan(arg_size + 1); @@ -1974,7 +1974,7 @@ inline NodeRef Parse(Span in, const Ctx& ctx) } else if (Const("thresh(", in)) { int next_comma = FindNextChar(in, ','); if (next_comma < 1) return {}; - const auto k{ToIntegral(std::string_view(in.begin(), next_comma))}; + const auto k{ToIntegral(std::string_view(in.data(), next_comma))}; if (!k.has_value() || *k < 1) return {}; in = in.subspan(next_comma + 1); // n = 1 here because we read the first WRAPPED_EXPR before reaching THRESH diff --git a/src/script/solver.h b/src/script/solver.h index 5a7b685a6f..5b945477c9 100644 --- a/src/script/solver.h +++ b/src/script/solver.h @@ -10,6 +10,7 @@ #include #include