From a5ed732fd383dee196931badcb3c69ffb048a14b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Mon, 11 Oct 2021 13:03:51 +0200 Subject: [PATCH] CommandLineInterface: Rename m_error to m_outputFailed --- solc/CommandLineInterface.cpp | 6 +++--- solc/CommandLineInterface.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 3b26b6c83..dc07b499d 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -553,7 +553,7 @@ void CommandLineInterface::createFile(string const& _fileName, string const& _da if (fs::exists(pathName) && !m_options.output.overwriteFiles) { serr() << "Refusing to overwrite existing file \"" << pathName << "\" (use --overwrite to force)." << endl; - m_error = true; + m_outputFailed = true; return; } ofstream outFile(pathName); @@ -561,7 +561,7 @@ void CommandLineInterface::createFile(string const& _fileName, string const& _da if (!outFile) { serr() << "Could not write to file \"" << pathName << "\"." << endl; - m_error = true; + m_outputFailed = true; return; } } @@ -855,7 +855,7 @@ bool CommandLineInterface::actOnInput() solAssert(m_options.input.mode == InputMode::Compiler || m_options.input.mode == InputMode::CompilerWithASTImport, ""); outputCompilationResults(); } - return !m_error; + return !m_outputFailed; } bool CommandLineInterface::link() diff --git a/solc/CommandLineInterface.h b/solc/CommandLineInterface.h index 5504e51bb..1ca40568c 100644 --- a/solc/CommandLineInterface.h +++ b/solc/CommandLineInterface.h @@ -121,7 +121,7 @@ private: std::ostream& m_sout; std::ostream& m_serr; bool m_hasOutput = false; - bool m_error = false; ///< If true, some error occurred. + bool m_outputFailed = false; ///< If true, creation or write to some of the output files failed. FileReader m_fileReader; std::optional m_standardJsonInput; std::unique_ptr m_compiler;