Skip to content

Commit d82c41b

Browse files
committed
Style (NO_ARRAY_INDEXING).
1 parent 8636005 commit d82c41b

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/chain/script.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ namespace chain {
4747
using namespace bc::system::machine;
4848

4949
BC_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
//*************************************************************************
5960
bool 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
403402
const 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

412408
script_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()
551548
BC_POP_WARNING()
552549

553550
// JSON value convertors.

0 commit comments

Comments
 (0)