diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2014-11-24 14:49:43 -0500 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2014-11-24 15:23:29 -0500 |
commit | 322317951f2764d3cb55eea7d34f950b9c54e01a (patch) | |
tree | a9c3499ff42a2feca15c958aa3d09688e66d804b /src/script/interpreter.cpp | |
parent | a574189e2acdaa03658bfe495740b2d722984467 (diff) |
libbitcoinconsensus: don't require any global constructors
These static objects are only used in once place, so declare them there instead.
Diffstat (limited to 'src/script/interpreter.cpp')
-rw-r--r-- | src/script/interpreter.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index 5eda23731d..a10cefcc0b 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -17,13 +17,6 @@ using namespace std; typedef vector<unsigned char> valtype; -static const valtype vchFalse(0); -static const valtype vchZero(0); -static const valtype vchTrue(1, 1); -static const CScriptNum bnZero(0); -static const CScriptNum bnOne(1); -static const CScriptNum bnFalse(0); -static const CScriptNum bnTrue(1); namespace { @@ -239,6 +232,14 @@ bool static CheckMinimalPush(const valtype& data, opcodetype opcode) { bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, unsigned int flags, const BaseSignatureChecker& checker, ScriptError* serror) { + static const CScriptNum bnZero(0); + static const CScriptNum bnOne(1); + static const CScriptNum bnFalse(0); + static const CScriptNum bnTrue(1); + static const valtype vchFalse(0); + static const valtype vchZero(0); + static const valtype vchTrue(1, 1); + CScript::const_iterator pc = script.begin(); CScript::const_iterator pend = script.end(); CScript::const_iterator pbegincodehash = script.begin(); |