Skip to content

Commit df1f5ee

Browse files
wechmancameel
authored andcommitted
UsingForDirective: Rename m_functions to m_functionsOrLibrary
1 parent 52bfb8b commit df1f5ee

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

libsolidity/ast/AST.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -663,13 +663,13 @@ class UsingForDirective: public ASTNode
663663
UsingForDirective(
664664
int64_t _id,
665665
SourceLocation const& _location,
666-
std::vector<ASTPointer<IdentifierPath>> _functions,
666+
std::vector<ASTPointer<IdentifierPath>> _functionsOrLibrary,
667667
bool _usesBraces,
668668
ASTPointer<TypeName> _typeName,
669669
bool _global
670670
):
671671
ASTNode(_id, _location),
672-
m_functions(_functions),
672+
m_functionsOrLibrary(std::move(_functionsOrLibrary)),
673673
m_usesBraces(_usesBraces),
674674
m_typeName(std::move(_typeName)),
675675
m_global{_global}
@@ -683,13 +683,13 @@ class UsingForDirective: public ASTNode
683683
TypeName const* typeName() const { return m_typeName.get(); }
684684

685685
/// @returns a list of functions or the single library.
686-
std::vector<ASTPointer<IdentifierPath>> const& functionsOrLibrary() const { return m_functions; }
686+
std::vector<ASTPointer<IdentifierPath>> const& functionsOrLibrary() const { return m_functionsOrLibrary; }
687687
bool usesBraces() const { return m_usesBraces; }
688688
bool global() const { return m_global; }
689689

690690
private:
691691
/// Either the single library or a list of functions.
692-
std::vector<ASTPointer<IdentifierPath>> m_functions;
692+
std::vector<ASTPointer<IdentifierPath>> m_functionsOrLibrary;
693693
bool m_usesBraces;
694694
ASTPointer<TypeName> m_typeName;
695695
bool m_global = false;

libsolidity/ast/AST_accept.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ void UsingForDirective::accept(ASTVisitor& _visitor)
194194
{
195195
if (_visitor.visit(*this))
196196
{
197-
listAccept(functionsOrLibrary(), _visitor);
197+
listAccept(m_functionsOrLibrary, _visitor);
198198
if (m_typeName)
199199
m_typeName->accept(_visitor);
200200
}
@@ -205,7 +205,7 @@ void UsingForDirective::accept(ASTConstVisitor& _visitor) const
205205
{
206206
if (_visitor.visit(*this))
207207
{
208-
listAccept(functionsOrLibrary(), _visitor);
208+
listAccept(m_functionsOrLibrary, _visitor);
209209
if (m_typeName)
210210
m_typeName->accept(_visitor);
211211
}

0 commit comments

Comments
 (0)