mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Misc small refactors: Superfluous std::, trailing commas in lists, whitespace, missing breaks, import order
This commit is contained in:
committed by
Kamil Śliwak
parent
a77d4e281f
commit
2f78e9549a
@@ -92,7 +92,7 @@ namespace
|
||||
|
||||
set<frontend::InputMode> const CompilerInputModes{
|
||||
frontend::InputMode::Compiler,
|
||||
frontend::InputMode::CompilerWithASTImport
|
||||
frontend::InputMode::CompilerWithASTImport,
|
||||
};
|
||||
|
||||
} // anonymous namespace
|
||||
@@ -202,7 +202,7 @@ void CommandLineInterface::handleOpcode(string const& _contract)
|
||||
else
|
||||
{
|
||||
sout() << "Opcodes:" << endl;
|
||||
sout() << std::uppercase << evmasm::disassemble(m_compiler->object(_contract).bytecode, m_options.output.evmVersion);
|
||||
sout() << uppercase << evmasm::disassemble(m_compiler->object(_contract).bytecode, m_options.output.evmVersion);
|
||||
sout() << endl;
|
||||
}
|
||||
}
|
||||
@@ -351,8 +351,8 @@ void CommandLineInterface::handleNatspec(bool _natspecDev, string const& _contra
|
||||
solAssert(CompilerInputModes.count(m_options.input.mode) == 1);
|
||||
|
||||
bool enabled = false;
|
||||
std::string suffix;
|
||||
std::string title;
|
||||
string suffix;
|
||||
string title;
|
||||
|
||||
if (_natspecDev)
|
||||
{
|
||||
@@ -369,7 +369,7 @@ void CommandLineInterface::handleNatspec(bool _natspecDev, string const& _contra
|
||||
|
||||
if (enabled)
|
||||
{
|
||||
std::string output = jsonPrint(
|
||||
string output = jsonPrint(
|
||||
removeNullMembers(
|
||||
_natspecDev ?
|
||||
m_compiler->natspecDev(_contract) :
|
||||
@@ -461,7 +461,7 @@ void CommandLineInterface::readInputFiles()
|
||||
for (boost::filesystem::path const& allowedDirectory: m_options.input.allowedDirectories)
|
||||
m_fileReader.allowDirectory(allowedDirectory);
|
||||
|
||||
map<std::string, set<boost::filesystem::path>> collisions =
|
||||
map<string, set<boost::filesystem::path>> collisions =
|
||||
m_fileReader.detectSourceUnitNameCollisions(m_options.input.paths);
|
||||
if (!collisions.empty())
|
||||
{
|
||||
@@ -551,7 +551,7 @@ map<string, Json::Value> CommandLineInterface::parseAstFromInput()
|
||||
|
||||
for (auto& src: ast["sources"].getMemberNames())
|
||||
{
|
||||
std::string astKey = ast["sources"][src].isMember("ast") ? "ast" : "AST";
|
||||
string astKey = ast["sources"][src].isMember("ast") ? "ast" : "AST";
|
||||
|
||||
astAssert(ast["sources"][src].isMember(astKey), "astkey is not member");
|
||||
astAssert(ast["sources"][src][astKey]["nodeType"].asString() == "SourceUnit", "Top-level node should be a 'SourceUnit'");
|
||||
@@ -671,6 +671,7 @@ void CommandLineInterface::processInput()
|
||||
case InputMode::CompilerWithASTImport:
|
||||
compile();
|
||||
outputCompilationResults();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user