Skip to content

Commit

Permalink
Prefer make_unique over new
Browse files Browse the repository at this point in the history
  • Loading branch information
tcoyvwac committed Oct 15, 2021
1 parent 1e630fc commit ba0c09e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libsolidity/formal/CHC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ void CHC::resetSourceAnalysis()
if (usesZ3)
{
/// z3::fixedpoint does not have a reset mechanism, so we need to create another.
m_interface.reset(new Z3CHCInterface(m_settings.timeout));
m_interface = std::make_unique<Z3CHCInterface>(m_settings.timeout);
auto z3Interface = dynamic_cast<Z3CHCInterface const*>(m_interface.get());
solAssert(z3Interface, "");
m_context.setSolver(z3Interface->z3Interface());
Expand Down
2 changes: 1 addition & 1 deletion tools/solidityUpgrade/SourceUpgrade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ void SourceUpgrade::resetCompiler()

void SourceUpgrade::resetCompiler(ReadCallback::Callback const& _callback)
{
m_compiler.reset(new CompilerStack(_callback));
m_compiler = std::make_unique<CompilerStack>(_callback);
m_compiler->setSources(m_sourceCodes);
m_compiler->setParserErrorRecovery(true);
}

0 comments on commit ba0c09e

Please sign in to comment.