aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r--libsolidity/analysis/NameAndTypeResolver.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libsolidity/analysis/NameAndTypeResolver.cpp b/libsolidity/analysis/NameAndTypeResolver.cpp
index ee05910c..260965ae 100644
--- a/libsolidity/analysis/NameAndTypeResolver.cpp
+++ b/libsolidity/analysis/NameAndTypeResolver.cpp
@@ -264,11 +264,11 @@ vector<Declaration const*> NameAndTypeResolver::cleanedDeclarations(
solAssert(dynamic_cast<FunctionDefinition const*>(*it) || dynamic_cast<VariableDeclaration const*>(*it),
"Found overloading involving something not a function or a variable");
- shared_ptr<FunctionType const> functionType {};
+ unique_ptr<FunctionType const> functionType {};
if (FunctionDefinition const* functionDefinition = dynamic_cast<FunctionDefinition const*>(*it))
{
- functionType = make_shared<FunctionType const>(*functionDefinition);
+ functionType = unique_ptr<FunctionType const>(new FunctionType(*functionDefinition));
for (auto parameter: functionType->parameterTypes() + functionType->returnParameterTypes())
if (!parameter)
reportFatalDeclarationError(_identifier.location(), "Function type can not be used in this context");
@@ -276,7 +276,7 @@ vector<Declaration const*> NameAndTypeResolver::cleanedDeclarations(
else
{
VariableDeclaration const* variableDeclaration = dynamic_cast<VariableDeclaration const*>(*it);
- functionType = make_shared<FunctionType const>(*variableDeclaration);
+ functionType = unique_ptr<FunctionType const>(new FunctionType(*variableDeclaration));
}
solAssert(functionType, "failed to determine the function type of the overloaded");