mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
Add LIFETIMEBOUND to CScript where needed
This commit is contained in:
parent
dd097c42df
commit
fa5c896724
1 changed files with 5 additions and 4 deletions
|
@ -6,6 +6,7 @@
|
|||
#ifndef BITCOIN_SCRIPT_SCRIPT_H
|
||||
#define BITCOIN_SCRIPT_SCRIPT_H
|
||||
|
||||
#include <attributes.h>
|
||||
#include <crypto/common.h>
|
||||
#include <prevector.h>
|
||||
#include <serialize.h>
|
||||
|
@ -438,9 +439,9 @@ public:
|
|||
/** Delete non-existent operator to defend against future introduction */
|
||||
CScript& operator<<(const CScript& b) = delete;
|
||||
|
||||
CScript& operator<<(int64_t b) { return push_int64(b); }
|
||||
CScript& operator<<(int64_t b) LIFETIMEBOUND { return push_int64(b); }
|
||||
|
||||
CScript& operator<<(opcodetype opcode)
|
||||
CScript& operator<<(opcodetype opcode) LIFETIMEBOUND
|
||||
{
|
||||
if (opcode < 0 || opcode > 0xff)
|
||||
throw std::runtime_error("CScript::operator<<(): invalid opcode");
|
||||
|
@ -448,13 +449,13 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
CScript& operator<<(const CScriptNum& b)
|
||||
CScript& operator<<(const CScriptNum& b) LIFETIMEBOUND
|
||||
{
|
||||
*this << b.getvch();
|
||||
return *this;
|
||||
}
|
||||
|
||||
CScript& operator<<(const std::vector<unsigned char>& b)
|
||||
CScript& operator<<(const std::vector<unsigned char>& b) LIFETIMEBOUND
|
||||
{
|
||||
if (b.size() < OP_PUSHDATA1)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue