From 79f1460505ffb86ec903a5989607f48864632df0 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sat, 24 Jan 2015 17:52:42 -0800 Subject: [PATCH] Minor fix. --- libsolidity/CompilerStack.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libsolidity/CompilerStack.cpp b/libsolidity/CompilerStack.cpp index 86e97ef06..229afe54d 100644 --- a/libsolidity/CompilerStack.cpp +++ b/libsolidity/CompilerStack.cpp @@ -125,7 +125,7 @@ void CompilerStack::compile(bool _optimize) } } -const map StandardSources = { +const map StandardSources = map{ /* { "Config", "contract Config{function lookup(uint256 service)constant returns(address a){}function kill(){}function unregister(uint256 id){}function register(uint256 id,address service){}}" }, { "owned", "contract owned{function owned(){owner = msg.sender;}address owner;}" }, { "mortal", "import \"owned\";\ncontract mortal is owned {function kill() { if (msg.sender == owner) suicide(owner); }}" }, @@ -134,9 +134,12 @@ const map StandardSources = { { "std", "import \"owned\";\nimport \"mortal\";\nimport \"Config\";\nimport \"NameReg\";\nimport \"named\";\n" }, */}; +////// BEGIN: TEMPORARY ONLY +/// remove once import works properly and we have genesis contracts + string CompilerStack::expanded(string const& _sourceCode) { - const map c_standardSources = { + const map c_standardSources = map{ { "Config", "contract Config{function lookup(uint256 service)constant returns(address a){}function kill(){}function unregister(uint256 id){}function register(uint256 id,address service){}}" }, { "owned", "contract owned{function owned(){owner = msg.sender;}address owner;}" }, { "mortal", "#require owned\ncontract mortal is owned {function kill() { if (msg.sender == owner) suicide(owner); }}" }, @@ -174,6 +177,8 @@ string CompilerStack::expanded(string const& _sourceCode) return sub + localExpanded(_sourceCode); } +////// END: TEMPORARY ONLY + bytes const& CompilerStack::compile(string const& _sourceCode, bool _optimize) { parse(_sourceCode);