From 073b03d90c8f0648ba135f0b30d8e72fd871478f Mon Sep 17 00:00:00 2001 From: Christian Parpart Date: Fri, 30 Nov 2018 14:34:08 +0100 Subject: liblangutil: refactor SourceReferenceFormatter, splitting out retrieval and making use of new SourceLocation's CharStream knowledge --- solc/CommandLineInterface.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'solc') diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 38e778c6..bda1b78a 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -858,8 +858,7 @@ bool CommandLineInterface::processInput() m_compiler.reset(new CompilerStack(fileReader)); - auto scannerFromSourceName = [&](string const& _sourceName) -> Scanner const& { return m_compiler->scanner(_sourceName); }; - SourceReferenceFormatter formatter(serr(false), scannerFromSourceName); + SourceReferenceFormatter formatter(serr(false)); try { @@ -1222,8 +1221,7 @@ bool CommandLineInterface::assemble( for (auto const& sourceAndStack: assemblyStacks) { auto const& stack = sourceAndStack.second; - auto scannerFromSourceName = [&](string const&) -> Scanner const& { return stack.scanner(); }; - SourceReferenceFormatter formatter(serr(false), scannerFromSourceName); + SourceReferenceFormatter formatter(serr(false)); for (auto const& error: stack.errors()) { -- cgit v1.2.3 From 62fe57479e7d8949e4ed2e0efb31238d5d8d6d0a Mon Sep 17 00:00:00 2001 From: Christian Parpart Date: Wed, 12 Dec 2018 14:51:22 +0100 Subject: make use of C++ `= default` constructor declarations as well as more non-static member initialization syntax. --- solc/CommandLineInterface.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'solc') diff --git a/solc/CommandLineInterface.h b/solc/CommandLineInterface.h index 0b22ca29..ff294adc 100644 --- a/solc/CommandLineInterface.h +++ b/solc/CommandLineInterface.h @@ -41,8 +41,6 @@ enum class DocumentationType: uint8_t; class CommandLineInterface { public: - CommandLineInterface() {} - /// Parse command line arguments and return false if we should not continue bool parseArguments(int _argc, char** _argv); /// Parse the files and create source code objects -- cgit v1.2.3