diff options
author | chriseth <chris@ethereum.org> | 2017-09-02 01:58:38 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-09-06 19:52:29 +0800 |
commit | 15bdc48a73d1cbebb9f75830fd1abbd29f798c12 (patch) | |
tree | 153dae1f6330d96b8a894f18c4da92098226a120 /libsolidity/analysis | |
parent | c83768c4260979b6d30185ef19352d27b161c3b0 (diff) | |
download | dexon-solidity-15bdc48a73d1cbebb9f75830fd1abbd29f798c12.tar.gz dexon-solidity-15bdc48a73d1cbebb9f75830fd1abbd29f798c12.tar.zst dexon-solidity-15bdc48a73d1cbebb9f75830fd1abbd29f798c12.zip |
Rename and add anonymous namespace.
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r-- | libsolidity/analysis/ViewPureChecker.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libsolidity/analysis/ViewPureChecker.cpp b/libsolidity/analysis/ViewPureChecker.cpp index 705d61e8..6621edb1 100644 --- a/libsolidity/analysis/ViewPureChecker.cpp +++ b/libsolidity/analysis/ViewPureChecker.cpp @@ -27,6 +27,8 @@ using namespace std; using namespace dev; using namespace dev::solidity; +namespace +{ class AssemblyViewPureChecker: public boost::static_visitor<void> { @@ -39,7 +41,7 @@ public: { if (eth::SemanticInformation::invalidInViewFunctions(_instruction.instruction)) m_reportMutability(StateMutability::NonPayable, _instruction.location); - else if (eth::SemanticInformation::invalidInPureFunctions(_instruction.instruction)) + else if (eth::SemanticInformation::readsFromState(_instruction.instruction)) m_reportMutability(StateMutability::View, _instruction.location); } void operator()(assembly::Literal const&) {} @@ -96,6 +98,7 @@ private: std::function<void(StateMutability, SourceLocation const&)> m_reportMutability; }; +} bool ViewPureChecker::check() { |