Merge pull request #8148 from ethereum/awayWithNew

Remove remaining instances of new.
This commit is contained in:
chriseth 2020-01-15 17:51:14 +01:00 committed by GitHub
commit 55748804a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -47,6 +47,6 @@ FunctionFlow const& CFG::functionFlow(FunctionDefinition const& _function) const
CFGNode* CFG::NodeContainer::newNode()
{
m_nodes.emplace_back(new CFGNode());
m_nodes.emplace_back(std::make_unique<CFGNode>());
return m_nodes.back().get();
}

View File

@ -210,7 +210,7 @@ pair<u256, unsigned> const* MemberList::memberStorageOffset(string const& _name)
memberTypes.reserve(m_memberTypes.size());
for (auto const& member: m_memberTypes)
memberTypes.push_back(member.type);
m_storageOffsets.reset(new StorageOffsets());
m_storageOffsets = std::make_unique<StorageOffsets>();
m_storageOffsets->computeOffsets(memberTypes);
}
for (size_t index = 0; index < m_memberTypes.size(); ++index)