miniscript: explicit cast instead of comparing integers of different signs

This commit is contained in:
Antoine Poinsot 2023-03-31 15:41:49 +02:00
parent 5c2bb2b54c
commit 9a54d88c8c
No known key found for this signature in database
GPG Key ID: E13FC145CD3F4304

View File

@ -1194,7 +1194,7 @@ public:
case Fragment::OR_I:
return subs[0] || subs[1];
case Fragment::THRESH:
return std::count(subs.begin(), subs.end(), true) >= node.k;
return static_cast<uint32_t>(std::count(subs.begin(), subs.end(), true)) >= node.k;
default: // wrappers
assert(subs.size() == 1);
return subs[0];