mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Apply modernize-pass-by-value.
This commit is contained in:
@@ -68,6 +68,7 @@
|
||||
#include <json/json.h>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <utility>
|
||||
|
||||
using namespace std;
|
||||
using namespace solidity;
|
||||
@@ -79,8 +80,8 @@ using solidity::util::toHex;
|
||||
|
||||
static int g_compilerStackCounts = 0;
|
||||
|
||||
CompilerStack::CompilerStack(ReadCallback::Callback const& _readFile):
|
||||
m_readFile{_readFile},
|
||||
CompilerStack::CompilerStack(ReadCallback::Callback _readFile):
|
||||
m_readFile{std::move(_readFile)},
|
||||
m_enabledSMTSolvers{smt::SMTSolverChoice::All()},
|
||||
m_generateIR{false},
|
||||
m_generateEwasm{false},
|
||||
|
||||
@@ -108,7 +108,7 @@ public:
|
||||
/// Creates a new compiler stack.
|
||||
/// @param _readFile callback used to read files for import statements. Must return
|
||||
/// and must not emit exceptions.
|
||||
explicit CompilerStack(ReadCallback::Callback const& _readFile = ReadCallback::Callback());
|
||||
explicit CompilerStack(ReadCallback::Callback _readFile = ReadCallback::Callback());
|
||||
|
||||
~CompilerStack();
|
||||
|
||||
|
||||
@@ -591,7 +591,7 @@ boost::variant<StandardCompiler::InputsAndSettings, Json::Value> StandardCompile
|
||||
));
|
||||
else
|
||||
{
|
||||
ret.sources[sourceName] = result.responseOrErrorMessage;
|
||||
ret.sources[sourceName] = result.responseOrErrorMessage;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -24,8 +24,9 @@
|
||||
|
||||
#include <libsolidity/interface/CompilerStack.h>
|
||||
|
||||
#include <optional>
|
||||
#include <boost/variant.hpp>
|
||||
#include <optional>
|
||||
#include <utility>
|
||||
|
||||
namespace solidity::frontend
|
||||
{
|
||||
@@ -40,8 +41,8 @@ public:
|
||||
/// Creates a new StandardCompiler.
|
||||
/// @param _readFile callback used to read files for import statements. Must return
|
||||
/// and must not emit exceptions.
|
||||
explicit StandardCompiler(ReadCallback::Callback const& _readFile = ReadCallback::Callback()):
|
||||
m_readFile(_readFile)
|
||||
explicit StandardCompiler(ReadCallback::Callback _readFile = ReadCallback::Callback()):
|
||||
m_readFile(std::move(_readFile))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user