File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ namespace chain {
4747using namespace bc ::system::machine;
4848
4949BC_PUSH_WARNING (NO_THROW_IN_NOEXCEPT)
50+ BC_PUSH_WARNING (NO_ARRAY_INDEXING)
5051
5152// static
5253// TODO: would be inlined but machine is a circular include.
@@ -58,11 +59,9 @@ BC_PUSH_WARNING(NO_THROW_IN_NOEXCEPT)
5859// *************************************************************************
5960bool script::is_coinbase_pattern (const operations& ops, size_t height) NOEXCEPT
6061{
61- BC_PUSH_WARNING (NO_ARRAY_INDEXING)
6262 return !ops.empty ()
6363 && ops[0 ].is_nominal_push ()
6464 && ops[0 ].data () == number::chunk::from_integer (to_unsigned (height));
65- BC_POP_WARNING ()
6665}
6766
6867// Constructors.
@@ -403,10 +402,7 @@ size_t script::serialized_size(bool prefix) const NOEXCEPT
403402const data_chunk& script::witness_program () const NOEXCEPT
404403{
405404 static const data_chunk empty{};
406-
407- BC_PUSH_WARNING (NO_ARRAY_INDEXING)
408405 return is_witness_program_pattern (ops ()) ? ops ()[1 ].data () : empty;
409- BC_POP_WARNING ()
410406}
411407
412408script_version script::version () const NOEXCEPT
@@ -548,6 +544,7 @@ bool script::is_unspendable() const NOEXCEPT
548544 return operation::is_reserved (code) || operation::is_invalid (code);
549545}
550546
547+ BC_POP_WARNING ()
551548BC_POP_WARNING ()
552549
553550// JSON value convertors.
You can’t perform that action at this time.
0 commit comments