aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2016-08-10 22:58:17 +0800
committerGitHub <noreply@github.com>2016-08-10 22:58:17 +0800
commit55858de1e96c6992b77ecebe3a9d055355ce476f (patch)
treec0df49b7ae70659ef8e8abb0284bbf800e85dffc
parentc0bce89133e9ad5a9395bf720698f8d082f22ecc (diff)
parentac8e7269705a8bbe5b060b63ca5943b8e5a6f789 (diff)
downloaddexon-solidity-55858de1e96c6992b77ecebe3a9d055355ce476f.tar
dexon-solidity-55858de1e96c6992b77ecebe3a9d055355ce476f.tar.gz
dexon-solidity-55858de1e96c6992b77ecebe3a9d055355ce476f.tar.bz2
dexon-solidity-55858de1e96c6992b77ecebe3a9d055355ce476f.tar.lz
dexon-solidity-55858de1e96c6992b77ecebe3a9d055355ce476f.tar.xz
dexon-solidity-55858de1e96c6992b77ecebe3a9d055355ce476f.tar.zst
dexon-solidity-55858de1e96c6992b77ecebe3a9d055355ce476f.zip
Merge pull request #794 from chriseth/fixastsource
Fix segfault in ast output.
-rw-r--r--libsolidity/ast/ASTJsonConverter.cpp2
-rw-r--r--libsolidity/ast/ASTJsonConverter.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/libsolidity/ast/ASTJsonConverter.cpp b/libsolidity/ast/ASTJsonConverter.cpp
index 6b459da4..fc43976d 100644
--- a/libsolidity/ast/ASTJsonConverter.cpp
+++ b/libsolidity/ast/ASTJsonConverter.cpp
@@ -86,7 +86,7 @@ string ASTJsonConverter::sourceLocationToString(SourceLocation const& _location)
ASTJsonConverter::ASTJsonConverter(
ASTNode const& _ast,
- map<string, unsigned> const& _sourceIndices
+ map<string, unsigned> _sourceIndices
): m_ast(&_ast), m_sourceIndices(_sourceIndices)
{
Json::Value children(Json::arrayValue);
diff --git a/libsolidity/ast/ASTJsonConverter.h b/libsolidity/ast/ASTJsonConverter.h
index 2e3046f1..ca4d9c2d 100644
--- a/libsolidity/ast/ASTJsonConverter.h
+++ b/libsolidity/ast/ASTJsonConverter.h
@@ -45,7 +45,7 @@ public:
/// @a _sourceIndices is used to abbreviate source names in source locations.
explicit ASTJsonConverter(
ASTNode const& _ast,
- std::map<std::string, unsigned> const& _sourceIndices = std::map<std::string, unsigned>()
+ std::map<std::string, unsigned> _sourceIndices = std::map<std::string, unsigned>()
);
/// Output the json representation of the AST to _stream.
void print(std::ostream& _stream);
@@ -141,7 +141,7 @@ private:
Json::Value m_astJson;
std::stack<Json::Value*> m_jsonNodePtrs;
ASTNode const* m_ast;
- std::map<std::string, unsigned> const& m_sourceIndices;
+ std::map<std::string, unsigned> m_sourceIndices;
};
}