aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast/ASTJsonConverter.h
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-08-17 08:14:15 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-08-22 17:51:46 +0800
commite2cfc9ee92158169b5dd058074f25d67959e9875 (patch)
tree90cb281b48f95bdcc9904ed12def22bffcb88fb7 /libsolidity/ast/ASTJsonConverter.h
parentc94b1f81730c27480cb5813a7a909511613c14c5 (diff)
downloaddexon-solidity-e2cfc9ee92158169b5dd058074f25d67959e9875.tar.gz
dexon-solidity-e2cfc9ee92158169b5dd058074f25d67959e9875.tar.zst
dexon-solidity-e2cfc9ee92158169b5dd058074f25d67959e9875.zip
Mark a lot of functions const (where possible)
Diffstat (limited to 'libsolidity/ast/ASTJsonConverter.h')
-rw-r--r--libsolidity/ast/ASTJsonConverter.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libsolidity/ast/ASTJsonConverter.h b/libsolidity/ast/ASTJsonConverter.h
index 70e260db..cc589d4a 100644
--- a/libsolidity/ast/ASTJsonConverter.h
+++ b/libsolidity/ast/ASTJsonConverter.h
@@ -119,7 +119,7 @@ private:
);
std::string sourceLocationToString(SourceLocation const& _location) const;
std::string namePathToString(std::vector<ASTString> const& _namePath) const;
- Json::Value idOrNull(ASTNode const* _pt)
+ Json::Value idOrNull(ASTNode const* _pt) const
{
return _pt ? Json::Value(nodeId(*_pt)) : Json::nullValue;
}
@@ -134,12 +134,12 @@ private:
std::string literalTokenKind(Token::Value _token);
std::string type(Expression const& _expression);
std::string type(VariableDeclaration const& _varDecl);
- int nodeId(ASTNode const& _node)
+ int nodeId(ASTNode const& _node) const
{
return _node.id();
}
template<class Container>
- Json::Value getContainerIds(Container const& container)
+ Json::Value getContainerIds(Container const& container) const
{
Json::Value tmp(Json::arrayValue);
for (auto const& element: container)